github.com/InjectiveLabs/sdk-go@v1.53.0/proto/injective/exchange/v1beta1/tx.proto (about) 1 syntax = "proto3"; 2 package injective.exchange.v1beta1; 3 4 import "cosmos/base/v1beta1/coin.proto"; 5 import "cosmos/distribution/v1beta1/distribution.proto"; 6 import "cosmos/msg/v1/msg.proto"; 7 import "cosmos_proto/cosmos.proto"; 8 import "gogoproto/gogo.proto"; 9 import "injective/exchange/v1beta1/exchange.proto"; 10 import "injective/oracle/v1beta1/oracle.proto"; 11 import "amino/amino.proto"; 12 13 option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; 14 15 // Msg defines the exchange Msg service. 16 service Msg { 17 option (cosmos.msg.v1.service) = true; 18 19 // Deposit defines a method for transferring coins from the sender's bank 20 // balance into the subaccount's exchange deposits 21 rpc Deposit(MsgDeposit) returns (MsgDepositResponse); 22 23 // Withdraw defines a method for withdrawing coins from a subaccount's 24 // deposits to the user's bank balance 25 rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse); 26 27 // InstantSpotMarketLaunch defines method for creating a spot market by paying 28 // listing fee without governance 29 rpc InstantSpotMarketLaunch(MsgInstantSpotMarketLaunch) 30 returns (MsgInstantSpotMarketLaunchResponse); 31 32 // InstantPerpetualMarketLaunch defines a method for creating a new perpetual 33 // futures market by paying listing fee without governance 34 rpc InstantPerpetualMarketLaunch(MsgInstantPerpetualMarketLaunch) 35 returns (MsgInstantPerpetualMarketLaunchResponse); 36 37 // InstantExpiryFuturesMarketLaunch defines a method for creating a new expiry 38 // futures market by paying listing fee without governance 39 rpc InstantExpiryFuturesMarketLaunch(MsgInstantExpiryFuturesMarketLaunch) 40 returns (MsgInstantExpiryFuturesMarketLaunchResponse); 41 42 // CreateSpotLimitOrder defines a method for creating a new spot limit order. 43 rpc CreateSpotLimitOrder(MsgCreateSpotLimitOrder) 44 returns (MsgCreateSpotLimitOrderResponse); 45 46 // BatchCreateSpotLimitOrder defines a method for creating a new batch of spot 47 // limit orders. 48 rpc BatchCreateSpotLimitOrders(MsgBatchCreateSpotLimitOrders) 49 returns (MsgBatchCreateSpotLimitOrdersResponse); 50 51 // CreateSpotMarketOrder defines a method for creating a new spot market 52 // order. 53 rpc CreateSpotMarketOrder(MsgCreateSpotMarketOrder) 54 returns (MsgCreateSpotMarketOrderResponse); 55 56 // MsgCancelSpotOrder defines a method for cancelling a spot order. 57 rpc CancelSpotOrder(MsgCancelSpotOrder) returns (MsgCancelSpotOrderResponse); 58 59 // BatchCancelSpotOrders defines a method for cancelling a batch of spot 60 // orders in a given market. 61 rpc BatchCancelSpotOrders(MsgBatchCancelSpotOrders) 62 returns (MsgBatchCancelSpotOrdersResponse); 63 64 // BatchUpdateOrders defines a method for updating a batch of orders. 65 rpc BatchUpdateOrders(MsgBatchUpdateOrders) 66 returns (MsgBatchUpdateOrdersResponse); 67 68 // PrivilegedExecuteContract defines a method for executing a Cosmwasm 69 // contract from the exchange module with privileged capabilities. 70 rpc PrivilegedExecuteContract(MsgPrivilegedExecuteContract) 71 returns (MsgPrivilegedExecuteContractResponse); 72 73 // CreateDerivativeLimitOrder defines a method for creating a new derivative 74 // limit order. 75 rpc CreateDerivativeLimitOrder(MsgCreateDerivativeLimitOrder) 76 returns (MsgCreateDerivativeLimitOrderResponse); 77 78 // BatchCreateDerivativeLimitOrders defines a method for creating a new batch 79 // of derivative limit orders. 80 rpc BatchCreateDerivativeLimitOrders(MsgBatchCreateDerivativeLimitOrders) 81 returns (MsgBatchCreateDerivativeLimitOrdersResponse); 82 83 // MsgCreateDerivativeLimitOrder defines a method for creating a new 84 // derivative market order. 85 rpc CreateDerivativeMarketOrder(MsgCreateDerivativeMarketOrder) 86 returns (MsgCreateDerivativeMarketOrderResponse); 87 88 // MsgCancelDerivativeOrder defines a method for cancelling a derivative 89 // order. 90 rpc CancelDerivativeOrder(MsgCancelDerivativeOrder) 91 returns (MsgCancelDerivativeOrderResponse); 92 93 // MsgBatchCancelDerivativeOrders defines a method for cancelling a batch of 94 // derivative limit orders. 95 rpc BatchCancelDerivativeOrders(MsgBatchCancelDerivativeOrders) 96 returns (MsgBatchCancelDerivativeOrdersResponse); 97 98 // InstantBinaryOptionsMarketLaunch defines method for creating a binary 99 // options market by paying listing fee without governance 100 rpc InstantBinaryOptionsMarketLaunch(MsgInstantBinaryOptionsMarketLaunch) 101 returns (MsgInstantBinaryOptionsMarketLaunchResponse); 102 103 // CreateBinaryOptionsLimitOrder defines a method for creating a new binary 104 // options limit order. 105 rpc CreateBinaryOptionsLimitOrder(MsgCreateBinaryOptionsLimitOrder) 106 returns (MsgCreateBinaryOptionsLimitOrderResponse); 107 108 // CreateBinaryOptionsMarketOrder defines a method for creating a new binary 109 // options market order. 110 rpc CreateBinaryOptionsMarketOrder(MsgCreateBinaryOptionsMarketOrder) 111 returns (MsgCreateBinaryOptionsMarketOrderResponse); 112 113 // MsgCancelBinaryOptionsOrder defines a method for cancelling a binary 114 // options order. 115 rpc CancelBinaryOptionsOrder(MsgCancelBinaryOptionsOrder) 116 returns (MsgCancelBinaryOptionsOrderResponse); 117 118 // BatchCancelBinaryOptionsOrders defines a method for cancelling a batch of 119 // binary options limit orders. 120 rpc BatchCancelBinaryOptionsOrders(MsgBatchCancelBinaryOptionsOrders) 121 returns (MsgBatchCancelBinaryOptionsOrdersResponse); 122 123 // SubaccountTransfer defines a method for transfer between subaccounts 124 rpc SubaccountTransfer(MsgSubaccountTransfer) 125 returns (MsgSubaccountTransferResponse); 126 127 // ExternalTransfer defines a method for transfer between external accounts 128 rpc ExternalTransfer(MsgExternalTransfer) 129 returns (MsgExternalTransferResponse); 130 131 // LiquidatePosition defines a method for liquidating a position 132 rpc LiquidatePosition(MsgLiquidatePosition) 133 returns (MsgLiquidatePositionResponse); 134 135 // EmergencySettleMarket defines a method for emergency settling a market 136 rpc EmergencySettleMarket(MsgEmergencySettleMarket) 137 returns (MsgEmergencySettleMarketResponse); 138 139 // IncreasePositionMargin defines a method for increasing margin of a position 140 rpc IncreasePositionMargin(MsgIncreasePositionMargin) 141 returns (MsgIncreasePositionMarginResponse); 142 143 // DecreasePositionMargin defines a method for decreasing margin of a position 144 rpc DecreasePositionMargin(MsgDecreasePositionMargin) 145 returns (MsgDecreasePositionMarginResponse); 146 147 // RewardsOptOut defines a method for opting out of rewards 148 rpc RewardsOptOut(MsgRewardsOptOut) returns (MsgRewardsOptOutResponse); 149 150 // AdminUpdateBinaryOptionsMarket defines method for updating a binary options 151 // market by admin 152 rpc AdminUpdateBinaryOptionsMarket(MsgAdminUpdateBinaryOptionsMarket) 153 returns (MsgAdminUpdateBinaryOptionsMarketResponse); 154 155 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); 156 157 // UpdateSpotMarket modifies certain spot market fields (admin only) 158 rpc UpdateSpotMarket(MsgUpdateSpotMarket) 159 returns (MsgUpdateSpotMarketResponse); 160 161 // UpdateDerivativeMarket modifies certain derivative market fields (admin 162 // only) 163 rpc UpdateDerivativeMarket(MsgUpdateDerivativeMarket) 164 returns (MsgUpdateDerivativeMarketResponse); 165 166 rpc AuthorizeStakeGrants(MsgAuthorizeStakeGrants) 167 returns (MsgAuthorizeStakeGrantsResponse); 168 169 rpc ActivateStakeGrant(MsgActivateStakeGrant) 170 returns (MsgActivateStakeGrantResponse); 171 } 172 173 message MsgUpdateSpotMarket { 174 option (amino.name) = "exchange/MsgUpdateSpotMarket"; 175 option (gogoproto.equal) = false; 176 option (gogoproto.goproto_getters) = false; 177 option (cosmos.msg.v1.signer) = "admin"; 178 179 // current admin address of the associated market 180 string admin = 1; 181 182 // id of the market to be updated 183 string market_id = 2; 184 185 // (optional) updated ticker value 186 string new_ticker = 3; 187 188 // (optional) updated min price tick size value 189 string new_min_price_tick_size = 4 [ 190 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 191 (gogoproto.nullable) = false 192 ]; 193 194 // (optional) updated min quantity tick size value 195 string new_min_quantity_tick_size = 5 [ 196 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 197 (gogoproto.nullable) = false 198 ]; 199 200 // (optional) updated min notional 201 string new_min_notional = 6 [ 202 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 203 (gogoproto.nullable) = false 204 ]; 205 } 206 207 message MsgUpdateSpotMarketResponse {} 208 209 message MsgUpdateDerivativeMarket { 210 option (amino.name) = "exchange/MsgUpdateDerivativeMarket"; 211 option (gogoproto.equal) = false; 212 option (gogoproto.goproto_getters) = false; 213 option (cosmos.msg.v1.signer) = "admin"; 214 215 // current admin address of the associated market 216 string admin = 1; 217 218 // id of the market to be updated 219 string market_id = 2; 220 221 // (optional) updated value for ticker 222 string new_ticker = 3; 223 224 // (optional) updated value for min_price_tick_size 225 string new_min_price_tick_size = 4 [ 226 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 227 (gogoproto.nullable) = false 228 ]; 229 230 // (optional) updated value min_quantity_tick_size 231 string new_min_quantity_tick_size = 5 [ 232 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 233 (gogoproto.nullable) = false 234 ]; 235 236 // (optional) updated min notional 237 string new_min_notional = 6 [ 238 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 239 (gogoproto.nullable) = false 240 ]; 241 242 // (optional) updated value for initial_margin_ratio 243 string new_initial_margin_ratio = 7 [ 244 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 245 (gogoproto.nullable) = false 246 ]; 247 248 // (optional) updated value for maintenance_margin_ratio 249 string new_maintenance_margin_ratio = 8 [ 250 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 251 (gogoproto.nullable) = false 252 ]; 253 } 254 255 message MsgUpdateDerivativeMarketResponse {} 256 257 message MsgUpdateParams { 258 option (amino.name) = "exchange/MsgUpdateParams"; 259 option (cosmos.msg.v1.signer) = "authority"; 260 261 // authority is the address of the governance account. 262 string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; 263 264 // params defines the exchange parameters to update. 265 // 266 // NOTE: All parameters must be supplied. 267 Params params = 2 [ (gogoproto.nullable) = false ]; 268 } 269 270 message MsgUpdateParamsResponse {} 271 272 // MsgDeposit defines a SDK message for transferring coins from the sender's 273 // bank balance into the subaccount's exchange deposits 274 message MsgDeposit { 275 option (amino.name) = "exchange/MsgDeposit"; 276 option (gogoproto.equal) = false; 277 option (gogoproto.goproto_getters) = false; 278 option (cosmos.msg.v1.signer) = "sender"; 279 280 string sender = 1; 281 // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin 282 // will be deposited to the sender's default subaccount address. 283 string subaccount_id = 2; 284 cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; 285 } 286 287 // MsgDepositResponse defines the Msg/Deposit response type. 288 message MsgDepositResponse {} 289 290 // MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's 291 // deposits to the user's bank balance 292 message MsgWithdraw { 293 option (amino.name) = "exchange/MsgWithdraw"; 294 option (gogoproto.equal) = false; 295 option (gogoproto.goproto_getters) = false; 296 option (cosmos.msg.v1.signer) = "sender"; 297 298 string sender = 1; 299 // bytes32 subaccount ID to withdraw funds from 300 string subaccount_id = 2; 301 cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; 302 } 303 304 // MsgWithdraw defines the Msg/Withdraw response type. 305 message MsgWithdrawResponse {} 306 307 // MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit 308 // order. 309 message MsgCreateSpotLimitOrder { 310 option (amino.name) = "exchange/MsgCreateSpotLimitOrder"; 311 option (gogoproto.equal) = false; 312 option (gogoproto.goproto_getters) = false; 313 option (cosmos.msg.v1.signer) = "sender"; 314 315 string sender = 1; 316 SpotOrder order = 2 [ (gogoproto.nullable) = false ]; 317 } 318 319 // MsgCreateSpotLimitOrderResponse defines the Msg/CreateSpotOrder response 320 // type. 321 message MsgCreateSpotLimitOrderResponse { 322 option (gogoproto.equal) = false; 323 option (gogoproto.goproto_getters) = false; 324 325 string order_hash = 1; 326 string cid = 2; 327 } 328 329 // MsgBatchCreateSpotLimitOrders defines a SDK message for creating a new batch 330 // of spot limit orders. 331 message MsgBatchCreateSpotLimitOrders { 332 option (amino.name) = "exchange/MsgBatchCreateSpotLimitOrders"; 333 option (gogoproto.equal) = false; 334 option (gogoproto.goproto_getters) = false; 335 option (cosmos.msg.v1.signer) = "sender"; 336 337 string sender = 1; 338 repeated SpotOrder orders = 2 [ (gogoproto.nullable) = false ]; 339 } 340 341 // MsgBatchCreateSpotLimitOrdersResponse defines the 342 // Msg/BatchCreateSpotLimitOrders response type. 343 message MsgBatchCreateSpotLimitOrdersResponse { 344 option (gogoproto.equal) = false; 345 option (gogoproto.goproto_getters) = false; 346 347 repeated string order_hashes = 1; 348 repeated string created_orders_cids = 2; 349 repeated string failed_orders_cids = 3; 350 } 351 352 // MsgInstantSpotMarketLaunch defines a SDK message for creating a new spot 353 // market by paying listing fee without governance 354 message MsgInstantSpotMarketLaunch { 355 option (amino.name) = "exchange/MsgInstantSpotMarketLaunch"; 356 option (gogoproto.equal) = false; 357 option (gogoproto.goproto_getters) = false; 358 option (cosmos.msg.v1.signer) = "sender"; 359 360 string sender = 1; 361 // Ticker for the spot market. 362 string ticker = 2; 363 // type of coin to use as the base currency 364 string base_denom = 3; 365 // type of coin to use as the quote currency 366 string quote_denom = 4; 367 // min_price_tick_size defines the minimum tick size of the order's price 368 string min_price_tick_size = 5 [ 369 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 370 (gogoproto.nullable) = false 371 ]; 372 // min_quantity_tick_size defines the minimum tick size of the order's 373 // quantity 374 string min_quantity_tick_size = 6 [ 375 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 376 (gogoproto.nullable) = false 377 ]; 378 // min_notional defines the minimum notional (in quote asset) required for 379 // orders in the market 380 string min_notional = 7 [ 381 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 382 (gogoproto.nullable) = false 383 ]; 384 } 385 386 // MsgInstantSpotMarketLaunchResponse defines the Msg/InstantSpotMarketLaunch 387 // response type. 388 message MsgInstantSpotMarketLaunchResponse {} 389 390 // MsgInstantPerpetualMarketLaunch defines a SDK message for creating a new 391 // perpetual futures market by paying listing fee without governance 392 message MsgInstantPerpetualMarketLaunch { 393 option (amino.name) = "exchange/MsgInstantPerpetualMarketLaunch"; 394 option (gogoproto.equal) = false; 395 option (gogoproto.goproto_getters) = false; 396 option (cosmos.msg.v1.signer) = "sender"; 397 398 string sender = 1; 399 // Ticker for the derivative market. 400 string ticker = 2; 401 // type of coin to use as the base currency 402 string quote_denom = 3; 403 // Oracle base currency 404 string oracle_base = 4; 405 // Oracle quote currency 406 string oracle_quote = 5; 407 // Scale factor for oracle prices. 408 uint32 oracle_scale_factor = 6; 409 // Oracle type 410 injective.oracle.v1beta1.OracleType oracle_type = 7; 411 // maker_fee_rate defines the trade fee rate for makers on the perpetual 412 // market 413 string maker_fee_rate = 8 [ 414 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 415 (gogoproto.nullable) = false 416 ]; 417 418 // taker_fee_rate defines the trade fee rate for takers on the perpetual 419 // market 420 string taker_fee_rate = 9 [ 421 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 422 (gogoproto.nullable) = false 423 ]; 424 // initial_margin_ratio defines the initial margin ratio for the perpetual 425 // market 426 string initial_margin_ratio = 10 [ 427 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 428 (gogoproto.nullable) = false 429 ]; 430 // maintenance_margin_ratio defines the maintenance margin ratio for the 431 // perpetual market 432 string maintenance_margin_ratio = 11 [ 433 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 434 (gogoproto.nullable) = false 435 ]; 436 // min_price_tick_size defines the minimum tick size of the order's price and 437 // margin 438 string min_price_tick_size = 12 [ 439 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 440 (gogoproto.nullable) = false 441 ]; 442 // min_quantity_tick_size defines the minimum tick size of the order's 443 // quantity 444 string min_quantity_tick_size = 13 [ 445 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 446 (gogoproto.nullable) = false 447 ]; 448 // min_notional defines the minimum notional (in quote asset) required for 449 // orders in the market 450 string min_notional = 14 [ 451 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 452 (gogoproto.nullable) = false 453 ]; 454 } 455 456 // MsgInstantPerpetualMarketLaunchResponse defines the 457 // Msg/InstantPerpetualMarketLaunchResponse response type. 458 message MsgInstantPerpetualMarketLaunchResponse {} 459 460 // MsgInstantBinaryOptionsMarketLaunch defines a SDK message for creating a new 461 // perpetual futures market by paying listing fee without governance 462 message MsgInstantBinaryOptionsMarketLaunch { 463 option (amino.name) = "exchange/MsgInstantBinaryOptionsMarketLaunch"; 464 option (gogoproto.equal) = false; 465 option (gogoproto.goproto_getters) = false; 466 option (cosmos.msg.v1.signer) = "sender"; 467 468 string sender = 1; 469 // Ticker for the derivative contract. 470 string ticker = 2; 471 // Oracle symbol 472 string oracle_symbol = 3; 473 // Oracle Provider 474 string oracle_provider = 4; 475 // Oracle type 476 injective.oracle.v1beta1.OracleType oracle_type = 5; 477 // Scale factor for oracle prices. 478 uint32 oracle_scale_factor = 6; 479 // maker_fee_rate defines the trade fee rate for makers on the perpetual 480 // market 481 string maker_fee_rate = 7 [ 482 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 483 (gogoproto.nullable) = false 484 ]; 485 486 // taker_fee_rate defines the trade fee rate for takers on the perpetual 487 // market 488 string taker_fee_rate = 8 [ 489 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 490 (gogoproto.nullable) = false 491 ]; 492 // expiration timestamp 493 int64 expiration_timestamp = 9; 494 // expiration timestamp 495 int64 settlement_timestamp = 10; 496 // admin of the market 497 string admin = 11; 498 // Address of the quote currency denomination for the binary options contract 499 string quote_denom = 12; 500 // min_price_tick_size defines the minimum tick size that the price and margin 501 // required for orders in the market 502 string min_price_tick_size = 13 [ 503 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 504 (gogoproto.nullable) = false 505 ]; 506 // min_quantity_tick_size defines the minimum tick size of the quantity 507 // required for orders in the market 508 string min_quantity_tick_size = 14 [ 509 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 510 (gogoproto.nullable) = false 511 ]; 512 // min_notional defines the minimum notional (in quote asset) required for 513 // orders in the market 514 string min_notional = 15 [ 515 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 516 (gogoproto.nullable) = false 517 ]; 518 } 519 520 // MsgInstantBinaryOptionsMarketLaunchResponse defines the 521 // Msg/InstantBinaryOptionsMarketLaunchResponse response type. 522 message MsgInstantBinaryOptionsMarketLaunchResponse {} 523 524 // MsgInstantExpiryFuturesMarketLaunch defines a SDK message for creating a new 525 // expiry futures market by paying listing fee without governance 526 message MsgInstantExpiryFuturesMarketLaunch { 527 option (amino.name) = "exchange/MsgInstantExpiryFuturesMarketLaunch"; 528 option (gogoproto.equal) = false; 529 option (gogoproto.goproto_getters) = false; 530 option (cosmos.msg.v1.signer) = "sender"; 531 532 string sender = 1; 533 // Ticker for the derivative market. 534 string ticker = 2; 535 // type of coin to use as the quote currency 536 string quote_denom = 3; 537 // Oracle base currency 538 string oracle_base = 4; 539 // Oracle quote currency 540 string oracle_quote = 5; 541 // Oracle type 542 injective.oracle.v1beta1.OracleType oracle_type = 6; 543 // Scale factor for oracle prices. 544 uint32 oracle_scale_factor = 7; 545 // Expiration time of the market 546 int64 expiry = 8; 547 // maker_fee_rate defines the trade fee rate for makers on the expiry futures 548 // market 549 string maker_fee_rate = 9 [ 550 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 551 (gogoproto.nullable) = false 552 ]; 553 // taker_fee_rate defines the trade fee rate for takers on the expiry futures 554 // market 555 string taker_fee_rate = 10 [ 556 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 557 (gogoproto.nullable) = false 558 ]; 559 // initial_margin_ratio defines the initial margin ratio for the derivative 560 // market 561 string initial_margin_ratio = 11 [ 562 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 563 (gogoproto.nullable) = false 564 ]; 565 // maintenance_margin_ratio defines the maintenance margin ratio for the 566 // derivative market 567 string maintenance_margin_ratio = 12 [ 568 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 569 (gogoproto.nullable) = false 570 ]; 571 // min_price_tick_size defines the minimum tick size of the order's price and 572 // margin 573 string min_price_tick_size = 13 [ 574 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 575 (gogoproto.nullable) = false 576 ]; 577 // min_quantity_tick_size defines the minimum tick size of the order's 578 // quantity 579 string min_quantity_tick_size = 14 [ 580 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 581 (gogoproto.nullable) = false 582 ]; 583 // min_notional defines the minimum notional (in quote asset) required for 584 // orders in the market 585 string min_notional = 15 [ 586 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 587 (gogoproto.nullable) = false 588 ]; 589 } 590 591 // MsgInstantExpiryFuturesMarketLaunchResponse defines the 592 // Msg/InstantExpiryFuturesMarketLaunch response type. 593 message MsgInstantExpiryFuturesMarketLaunchResponse {} 594 595 // MsgCreateSpotMarketOrder defines a SDK message for creating a new spot market 596 // order. 597 message MsgCreateSpotMarketOrder { 598 option (amino.name) = "exchange/MsgCreateSpotMarketOrder"; 599 option (gogoproto.equal) = false; 600 option (gogoproto.goproto_getters) = false; 601 option (cosmos.msg.v1.signer) = "sender"; 602 603 string sender = 1; 604 SpotOrder order = 2 [ (gogoproto.nullable) = false ]; 605 } 606 607 // MsgCreateSpotMarketOrderResponse defines the Msg/CreateSpotMarketLimitOrder 608 // response type. 609 message MsgCreateSpotMarketOrderResponse { 610 option (gogoproto.equal) = false; 611 option (gogoproto.goproto_getters) = false; 612 613 string order_hash = 1; 614 615 SpotMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; 616 617 string cid = 3; 618 } 619 620 message SpotMarketOrderResults { 621 option (gogoproto.equal) = false; 622 option (gogoproto.goproto_getters) = false; 623 624 string quantity = 1 [ 625 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 626 (gogoproto.nullable) = false 627 ]; 628 string price = 2 [ 629 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 630 (gogoproto.nullable) = false 631 ]; 632 string fee = 3 [ 633 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 634 (gogoproto.nullable) = false 635 ]; 636 } 637 638 // A Cosmos-SDK MsgCreateDerivativeLimitOrder 639 message MsgCreateDerivativeLimitOrder { 640 option (amino.name) = "exchange/MsgCreateDerivativeLimitOrder"; 641 option (gogoproto.goproto_getters) = false; 642 option (cosmos.msg.v1.signer) = "sender"; 643 644 string sender = 1; 645 DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; 646 } 647 648 // MsgCreateDerivativeLimitOrderResponse defines the 649 // Msg/CreateDerivativeMarketOrder response type. 650 message MsgCreateDerivativeLimitOrderResponse { 651 option (gogoproto.equal) = false; 652 option (gogoproto.goproto_getters) = false; 653 654 string order_hash = 1; 655 string cid = 2; 656 } 657 658 // A Cosmos-SDK MsgCreateBinaryOptionsLimitOrder 659 message MsgCreateBinaryOptionsLimitOrder { 660 option (amino.name) = "exchange/MsgCreateBinaryOptionsLimitOrder"; 661 option (gogoproto.goproto_getters) = false; 662 option (cosmos.msg.v1.signer) = "sender"; 663 664 string sender = 1; 665 DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; 666 } 667 668 // MsgCreateBinaryOptionsLimitOrderResponse defines the 669 // Msg/CreateBinaryOptionsLimitOrder response type. 670 message MsgCreateBinaryOptionsLimitOrderResponse { 671 option (gogoproto.equal) = false; 672 option (gogoproto.goproto_getters) = false; 673 674 string order_hash = 1; 675 string cid = 2; 676 } 677 678 // A Cosmos-SDK MsgBatchCreateDerivativeLimitOrders 679 message MsgBatchCreateDerivativeLimitOrders { 680 option (amino.name) = "exchange/MsgBatchCreateDerivativeLimitOrders"; 681 option (gogoproto.goproto_getters) = false; 682 option (cosmos.msg.v1.signer) = "sender"; 683 684 string sender = 1; 685 repeated DerivativeOrder orders = 2 [ (gogoproto.nullable) = false ]; 686 } 687 688 // MsgBatchCreateDerivativeLimitOrdersResponse defines the 689 // Msg/BatchCreateDerivativeLimitOrders response type. 690 message MsgBatchCreateDerivativeLimitOrdersResponse { 691 option (gogoproto.equal) = false; 692 option (gogoproto.goproto_getters) = false; 693 694 repeated string order_hashes = 1; 695 repeated string created_orders_cids = 2; 696 repeated string failed_orders_cids = 3; 697 } 698 699 // MsgCancelSpotOrder defines the Msg/CancelSpotOrder response type. 700 message MsgCancelSpotOrder { 701 option (amino.name) = "exchange/MsgCancelSpotOrder"; 702 option (gogoproto.goproto_getters) = false; 703 option (cosmos.msg.v1.signer) = "sender"; 704 705 string sender = 1; 706 string market_id = 2; 707 string subaccount_id = 3; 708 string order_hash = 4; 709 string cid = 5; 710 } 711 712 // MsgCancelSpotOrderResponse defines the Msg/CancelSpotOrder response type. 713 message MsgCancelSpotOrderResponse {} 714 715 // MsgBatchCancelSpotOrders defines the Msg/BatchCancelSpotOrders response type. 716 message MsgBatchCancelSpotOrders { 717 option (amino.name) = "exchange/MsgBatchCancelSpotOrders"; 718 option (gogoproto.goproto_getters) = false; 719 option (cosmos.msg.v1.signer) = "sender"; 720 721 string sender = 1; 722 repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; 723 } 724 725 // MsgBatchCancelSpotOrdersResponse defines the Msg/BatchCancelSpotOrders 726 // response type. 727 message MsgBatchCancelSpotOrdersResponse { 728 option (gogoproto.equal) = false; 729 option (gogoproto.goproto_getters) = false; 730 731 repeated bool success = 1; 732 } 733 734 // MsgBatchCancelBinaryOptionsOrders defines the 735 // Msg/BatchCancelBinaryOptionsOrders response type. 736 message MsgBatchCancelBinaryOptionsOrders { 737 option (amino.name) = "exchange/MsgBatchCancelBinaryOptionsOrders"; 738 option (gogoproto.goproto_getters) = false; 739 option (cosmos.msg.v1.signer) = "sender"; 740 741 string sender = 1; 742 repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; 743 } 744 745 // BatchCancelBinaryOptionsOrdersResponse defines the 746 // Msg/BatchCancelBinaryOptionsOrders response type. 747 message MsgBatchCancelBinaryOptionsOrdersResponse { 748 option (gogoproto.equal) = false; 749 option (gogoproto.goproto_getters) = false; 750 751 repeated bool success = 1; 752 } 753 754 // MsgBatchUpdateOrders defines the Msg/BatchUpdateOrders response type. 755 message MsgBatchUpdateOrders { 756 option (amino.name) = "exchange/MsgBatchUpdateOrders"; 757 option (gogoproto.goproto_getters) = false; 758 option (cosmos.msg.v1.signer) = "sender"; 759 760 string sender = 1; 761 // subaccount_id only used for the spot_market_ids_to_cancel_all and 762 // derivative_market_ids_to_cancel_all. 763 string subaccount_id = 2; 764 repeated string spot_market_ids_to_cancel_all = 3; 765 repeated string derivative_market_ids_to_cancel_all = 4; 766 repeated OrderData spot_orders_to_cancel = 5 [ (gogoproto.nullable) = true ]; 767 repeated OrderData derivative_orders_to_cancel = 6 768 [ (gogoproto.nullable) = true ]; 769 repeated SpotOrder spot_orders_to_create = 7 [ (gogoproto.nullable) = true ]; 770 repeated DerivativeOrder derivative_orders_to_create = 8 771 [ (gogoproto.nullable) = true ]; 772 repeated OrderData binary_options_orders_to_cancel = 9 773 [ (gogoproto.nullable) = true ]; 774 repeated string binary_options_market_ids_to_cancel_all = 10; 775 repeated DerivativeOrder binary_options_orders_to_create = 11 776 [ (gogoproto.nullable) = true ]; 777 } 778 779 // MsgBatchUpdateOrdersResponse defines the Msg/BatchUpdateOrders response type. 780 message MsgBatchUpdateOrdersResponse { 781 option (gogoproto.equal) = false; 782 option (gogoproto.goproto_getters) = false; 783 784 repeated bool spot_cancel_success = 1; 785 repeated bool derivative_cancel_success = 2; 786 repeated string spot_order_hashes = 3; 787 repeated string derivative_order_hashes = 4; 788 repeated bool binary_options_cancel_success = 5; 789 repeated string binary_options_order_hashes = 6; 790 repeated string created_spot_orders_cids = 7; 791 repeated string failed_spot_orders_cids = 8; 792 repeated string created_derivative_orders_cids = 9; 793 repeated string failed_derivative_orders_cids = 10; 794 repeated string created_binary_options_orders_cids = 11; 795 repeated string failed_binary_options_orders_cids = 12; 796 } 797 798 // A Cosmos-SDK MsgCreateDerivativeMarketOrder 799 message MsgCreateDerivativeMarketOrder { 800 option (amino.name) = "exchange/MsgCreateDerivativeMarketOrder"; 801 option (gogoproto.goproto_getters) = false; 802 option (cosmos.msg.v1.signer) = "sender"; 803 804 string sender = 1; 805 DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; 806 } 807 808 // MsgCreateDerivativeMarketOrderResponse defines the 809 // Msg/CreateDerivativeMarketOrder response type. 810 message MsgCreateDerivativeMarketOrderResponse { 811 option (gogoproto.equal) = false; 812 option (gogoproto.goproto_getters) = false; 813 814 string order_hash = 1; 815 816 DerivativeMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; 817 818 string cid = 3; 819 } 820 821 message DerivativeMarketOrderResults { 822 option (gogoproto.equal) = false; 823 option (gogoproto.goproto_getters) = false; 824 825 string quantity = 1 [ 826 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 827 (gogoproto.nullable) = false 828 ]; 829 string price = 2 [ 830 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 831 (gogoproto.nullable) = false 832 ]; 833 string fee = 3 [ 834 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 835 (gogoproto.nullable) = false 836 ]; 837 PositionDelta position_delta = 4 [ (gogoproto.nullable) = false ]; 838 string payout = 5 [ 839 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 840 (gogoproto.nullable) = false 841 ]; 842 } 843 844 // A Cosmos-SDK MsgCreateBinaryOptionsMarketOrder 845 message MsgCreateBinaryOptionsMarketOrder { 846 option (amino.name) = "exchange/MsgCreateBinaryOptionsMarketOrder"; 847 option (gogoproto.goproto_getters) = false; 848 option (cosmos.msg.v1.signer) = "sender"; 849 850 string sender = 1; 851 DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; 852 } 853 854 // MsgCreateBinaryOptionsMarketOrderResponse defines the 855 // Msg/CreateBinaryOptionsMarketOrder response type. 856 message MsgCreateBinaryOptionsMarketOrderResponse { 857 option (gogoproto.equal) = false; 858 option (gogoproto.goproto_getters) = false; 859 860 string order_hash = 1; 861 862 DerivativeMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; 863 864 string cid = 3; 865 } 866 867 // MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. 868 message MsgCancelDerivativeOrder { 869 option (amino.name) = "exchange/MsgCancelDerivativeOrder"; 870 option (gogoproto.goproto_getters) = false; 871 option (cosmos.msg.v1.signer) = "sender"; 872 873 string sender = 1; 874 string market_id = 2; 875 string subaccount_id = 3; 876 string order_hash = 4; 877 int32 order_mask = 5; // bitwise combination of OrderMask enum values 878 string cid = 6; 879 } 880 881 // MsgCancelDerivativeOrderResponse defines the 882 // Msg/CancelDerivativeOrderResponse response type. 883 message MsgCancelDerivativeOrderResponse {} 884 885 // MsgCancelBinaryOptionsOrder defines the Msg/CancelBinaryOptionsOrder response 886 // type. 887 message MsgCancelBinaryOptionsOrder { 888 option (amino.name) = "exchange/MsgCancelBinaryOptionsOrder"; 889 option (gogoproto.goproto_getters) = false; 890 option (cosmos.msg.v1.signer) = "sender"; 891 892 string sender = 1; 893 string market_id = 2; 894 string subaccount_id = 3; 895 string order_hash = 4; 896 int32 order_mask = 5; // bitwise combination of OrderMask enum values 897 string cid = 6; 898 } 899 900 // MsgCancelBinaryOptionsOrderResponse defines the 901 // Msg/CancelBinaryOptionsOrderResponse response type. 902 message MsgCancelBinaryOptionsOrderResponse {} 903 904 message OrderData { 905 string market_id = 1; 906 string subaccount_id = 2; 907 string order_hash = 3; 908 int32 order_mask = 4; // bitwise combination of OrderMask enum values 909 string cid = 5; 910 } 911 912 // MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders 913 // response type. 914 message MsgBatchCancelDerivativeOrders { 915 option (amino.name) = "exchange/MsgBatchCancelDerivativeOrders"; 916 option (gogoproto.goproto_getters) = false; 917 option (cosmos.msg.v1.signer) = "sender"; 918 919 string sender = 1; 920 repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; 921 } 922 923 // MsgBatchCancelDerivativeOrdersResponse defines the 924 // Msg/CancelDerivativeOrderResponse response type. 925 message MsgBatchCancelDerivativeOrdersResponse { 926 option (gogoproto.equal) = false; 927 option (gogoproto.goproto_getters) = false; 928 929 repeated bool success = 1; 930 } 931 932 // A Cosmos-SDK MsgSubaccountTransfer 933 message MsgSubaccountTransfer { 934 option (amino.name) = "exchange/MsgSubaccountTransfer"; 935 option (cosmos.msg.v1.signer) = "sender"; 936 937 string sender = 1; 938 string source_subaccount_id = 2; 939 string destination_subaccount_id = 3; 940 cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; 941 } 942 943 // MsgSubaccountTransferResponse defines the Msg/SubaccountTransfer response 944 // type. 945 message MsgSubaccountTransferResponse {} 946 947 // A Cosmos-SDK MsgExternalTransfer 948 message MsgExternalTransfer { 949 option (amino.name) = "exchange/MsgExternalTransfer"; 950 option (cosmos.msg.v1.signer) = "sender"; 951 952 string sender = 1; 953 string source_subaccount_id = 2; 954 string destination_subaccount_id = 3; 955 cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; 956 } 957 958 // MsgExternalTransferResponse defines the Msg/ExternalTransfer response type. 959 message MsgExternalTransferResponse {} 960 961 // A Cosmos-SDK MsgLiquidatePosition 962 message MsgLiquidatePosition { 963 option (amino.name) = "exchange/MsgLiquidatePosition"; 964 option (cosmos.msg.v1.signer) = "sender"; 965 966 string sender = 1; 967 string subaccount_id = 2; 968 string market_id = 3; 969 970 // optional order to provide for liquidation 971 DerivativeOrder order = 4 [ (gogoproto.nullable) = true ]; 972 } 973 974 // MsgLiquidatePositionResponse defines the Msg/LiquidatePosition response type. 975 message MsgLiquidatePositionResponse {} 976 977 // A Cosmos-SDK MsgEmergencySettleMarket 978 message MsgEmergencySettleMarket { 979 option (amino.name) = "exchange/MsgEmergencySettleMarket"; 980 option (cosmos.msg.v1.signer) = "sender"; 981 982 string sender = 1; 983 string subaccount_id = 2; 984 string market_id = 3; 985 } 986 987 // MsgEmergencySettleMarketResponse defines the Msg/EmergencySettleMarket 988 // response type. 989 message MsgEmergencySettleMarketResponse {} 990 991 // A Cosmos-SDK MsgIncreasePositionMargin 992 message MsgIncreasePositionMargin { 993 option (amino.name) = "exchange/MsgIncreasePositionMargin"; 994 option (cosmos.msg.v1.signer) = "sender"; 995 996 string sender = 1; 997 string source_subaccount_id = 2; 998 string destination_subaccount_id = 3; 999 string market_id = 4; 1000 // amount defines the amount of margin to add to the position 1001 string amount = 5 [ 1002 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 1003 (gogoproto.nullable) = false 1004 ]; 1005 } 1006 1007 // MsgIncreasePositionMarginResponse defines the Msg/IncreasePositionMargin 1008 // response type. 1009 message MsgIncreasePositionMarginResponse { 1010 } // A Cosmos-SDK MsgIncreasePositionMargin 1011 1012 // A Cosmos-SDK MsgDecreasePositionMargin 1013 message MsgDecreasePositionMargin { 1014 option (amino.name) = "exchange/MsgDecreasePositionMargin"; 1015 option (cosmos.msg.v1.signer) = "sender"; 1016 1017 string sender = 1; 1018 string source_subaccount_id = 2; 1019 string destination_subaccount_id = 3; 1020 string market_id = 4; 1021 // amount defines the amount of margin to withdraw from the position 1022 string amount = 5 [ 1023 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 1024 (gogoproto.nullable) = false 1025 ]; 1026 } 1027 1028 // MsgDecreasePositionMarginResponse defines the Msg/MsgDecreasePositionMargin 1029 // response type. 1030 message MsgDecreasePositionMarginResponse {} 1031 1032 // MsgPrivilegedExecuteContract defines the Msg/Exec message type 1033 message MsgPrivilegedExecuteContract { 1034 option (amino.name) = "exchange/MsgPrivilegedExecuteContract"; 1035 option (cosmos.msg.v1.signer) = "sender"; 1036 1037 option (gogoproto.equal) = false; 1038 option (gogoproto.goproto_getters) = false; 1039 string sender = 1; 1040 1041 // funds defines the user's bank coins used to fund the execution (e.g. 1042 // 100inj). 1043 string funds = 2; 1044 1045 // contract_address defines the contract address to execute 1046 string contract_address = 3; 1047 1048 // data defines the call data used when executing the contract 1049 string data = 4; 1050 } 1051 1052 // MsgPrivilegedExecuteContractResponse defines the Msg/Exec response type. 1053 message MsgPrivilegedExecuteContractResponse { 1054 option (gogoproto.equal) = false; 1055 option (gogoproto.goproto_getters) = false; 1056 option (cosmos.msg.v1.signer) = "sender"; 1057 1058 repeated cosmos.base.v1beta1.Coin funds_diff = 1 [ 1059 (gogoproto.nullable) = false, 1060 (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" 1061 ]; 1062 } 1063 1064 // A Cosmos-SDK MsgRewardsOptOut 1065 message MsgRewardsOptOut { 1066 option (amino.name) = "exchange/MsgRewardsOptOut"; 1067 option (cosmos.msg.v1.signer) = "sender"; 1068 option (gogoproto.equal) = false; 1069 option (gogoproto.goproto_getters) = false; 1070 1071 string sender = 1; 1072 } 1073 1074 // MsgRewardsOptOutResponse defines the Msg/RewardsOptOut response type. 1075 message MsgRewardsOptOutResponse {} 1076 1077 // A Cosmos-SDK MsgReclaimLockedFunds 1078 message MsgReclaimLockedFunds { 1079 option (amino.name) = "exchange/MsgReclaimLockedFunds"; 1080 option (cosmos.msg.v1.signer) = "sender"; 1081 1082 string sender = 1; 1083 bytes lockedAccountPubKey = 2; 1084 bytes signature = 3; 1085 } 1086 1087 // MsgReclaimLockedFundsResponse defines the Msg/ReclaimLockedFunds response 1088 // type. 1089 message MsgReclaimLockedFundsResponse {} 1090 1091 // MsgSignData defines an arbitrary, general-purpose, off-chain message 1092 message MsgSignData { 1093 // Signer is the sdk.AccAddress of the message signer 1094 bytes Signer = 1 [ 1095 (gogoproto.jsontag) = "signer", 1096 (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" 1097 ]; 1098 // Data represents the raw bytes of the content that is signed (text, json, 1099 // etc) 1100 bytes Data = 2 [ (gogoproto.jsontag) = "data" ]; 1101 } 1102 1103 // MsgSignDoc defines an arbitrary, general-purpose, off-chain message 1104 message MsgSignDoc { 1105 string sign_type = 1 [ (gogoproto.jsontag) = "type" ]; 1106 MsgSignData value = 2 [ (gogoproto.nullable) = false ]; 1107 } 1108 1109 // MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the 1110 // market 1111 message MsgAdminUpdateBinaryOptionsMarket { 1112 option (amino.name) = "exchange/MsgAdminUpdateBinaryOptionsMarket"; 1113 option (cosmos.msg.v1.signer) = "sender"; 1114 1115 string sender = 1; 1116 string market_id = 2; 1117 // new price at which market will be settled 1118 string settlement_price = 3 [ 1119 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 1120 (gogoproto.nullable) = true 1121 ]; 1122 // expiration timestamp 1123 int64 expiration_timestamp = 4; 1124 // expiration timestamp 1125 int64 settlement_timestamp = 5; 1126 // Status of the market 1127 MarketStatus status = 6; 1128 } 1129 1130 // MsgAdminUpdateBinaryOptionsMarketResponse is the response for 1131 // AdminUpdateBinaryOptionsMarket rpc method 1132 message MsgAdminUpdateBinaryOptionsMarketResponse {} 1133 1134 // MsgAuthorizeStakeGrants grants stakes to grantees. 1135 message MsgAuthorizeStakeGrants { 1136 option (amino.name) = "exchange/MsgAuthorizeStakeGrants"; 1137 option (cosmos.msg.v1.signer) = "sender"; 1138 1139 string sender = 1; 1140 repeated GrantAuthorization grants = 2; 1141 } 1142 1143 message MsgAuthorizeStakeGrantsResponse {} 1144 1145 // MsgActivateStakeGrant allows a grantee to activate a stake grant. 1146 message MsgActivateStakeGrant { 1147 option (amino.name) = "exchange/MsgActivateStakeGrant"; 1148 option (cosmos.msg.v1.signer) = "sender"; 1149 1150 string sender = 1; 1151 string granter = 2; 1152 } 1153 1154 message MsgActivateStakeGrantResponse {}