Last updated
Last updated
In this section we describe the processing of the exchange messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the section.
MsgDeposit
defines a SDK message for transferring coins from the sender's bank balance into the subaccount's exchange deposits.
Fields description
Sender
field describes the address who deposits.
SubaccountId
describes the ID of a sub-account to receive a deposit.
Amount
specifies the deposit amount.
MsgWithdraw
defines a SDK message for withdrawing coins from a subaccount's deposits to the user's bank balance.
Fields description
Sender
field describes the address to receive withdrawal.
SubaccountId
describes the ID of a sub-account to withdraw from.
Amount
specifies the withdrawal amount.
MsgInstantSpotMarketLaunch
defines a SDK message for creating a new spot market by paying listing fee without governance. The fee is sent to the community spend pool.
Fields description
Sender
field describes the creator of this msg.
Ticker
describes the ticker for the spot market.
BaseDenom
specifies the type of coin to use as the base currency.
QuoteDenom
specifies the type of coin to use as the quote currency.
MinPriceTickSize
defines the minimum tick size of the order's price.
MinQuantityTickSize
defines the minimum tick size of the order's quantity.
MsgInstantPerpetualMarketLaunch
defines a SDK message for creating a new perpetual futures market by paying listing fee without governance. The fee is sent to the community spend pool.
Fields description
Sender
field describes the creator of this msg.
Ticker
field describes the ticker for the derivative market.
QuoteDenom
field describes the type of coin to use as the base currency.
OracleBase
field describes the oracle base currency.
OracleQuote
field describes the oracle quote currency.
OracleScaleFactor
field describes the scale factor for oracle prices.
OracleType
field describes the oracle type.
MakerFeeRate
field describes the trade fee rate for makers on the derivative market.
TakerFeeRate
field describes the trade fee rate for takers on the derivative market.
InitialMarginRatio
field describes the initial margin ratio for the derivative market.
MaintenanceMarginRatio
field describes the maintenance margin ratio for the derivative market.
MinPriceTickSize
field describes the minimum tick size of the order's price and margin.
MinQuantityTickSize
field describes the minimum tick size of the order's quantity.
MsgInstantExpiryFuturesMarketLaunch
defines a SDK message for creating a new expiry futures market by paying listing fee without governance. The fee is sent to the community spend pool.
Fields description
Sender
field describes the creator of this msg.
Ticker
field describes the ticker for the derivative market.
QuoteDenom
field describes the type of coin to use as the quote currency.
OracleBase
field describes the oracle base currency.
OracleQuote
field describes the oracle quote currency.
OracleScaleFactor
field describes the scale factor for oracle prices.
OracleType
field describes the oracle type.
Expiry
field describes the expiration time of the market.
MakerFeeRate
field describes the trade fee rate for makers on the derivative market.
TakerFeeRate
field describes the trade fee rate for takers on the derivative market.
InitialMarginRatio
field describes the initial margin ratio for the derivative market.
MaintenanceMarginRatio
field describes the maintenance margin ratio for the derivative market.
MinPriceTickSize
field describes the minimum tick size of the order's price and margin.
MinQuantityTickSize
field describes the minimum tick size of the order's quantity.
MsgCreateSpotLimitOrder
defines a SDK message for creating a new spot limit order.
Fields description
Sender
field describes the creator of this msg.
Order
field describes the order info.
MsgBatchCreateSpotLimitOrders
defines a SDK message for creating a new batch of spot limit orders.
Fields description
Sender
field describes the creator of this msg.
Orders
field describes the orders info.
MsgCreateSpotMarketOrder
defines a SDK message for creating a new spot market order.
Fields description
Sender
field describes the creator of this msg.
Order
field describes the order info.
MsgCancelSpotOrder
defines the message to cancel a spot order.
Fields description
Sender
field describes the creator of this msg.
MarketId
field describes the id of the market where the order is placed.
SubaccountId
field describes the subaccount id that placed the order.
OrderHash
field describes the hash of the order.
MsgBatchCancelSpotOrders
defines the message to cancel the spot orders in batch.
Fields description
Sender
field describes the creator of this msg.
Data
field describes the orders to cancel.
MsgCreateDerivativeLimitOrder
defines the message to create a derivative limit order.
Fields description
Sender
field describes the creator of this msg.
Order
field describes the order info.
MsgBatchCreateDerivativeLimitOrders
describes the batch creation of derivative limit orders.
Fields description
Sender
field describes the creator of this msg.
Orders
field describes the orders info.
MsgCreateDerivativeMarketOrder
is a message to create a derivative market order.
Fields description
Sender
field describes the creator of this msg.
Order
field describes the order info.
MsgCancelDerivativeOrder
is a message to cancel a derivative order.
Fields description
Sender
field describes the creator of this msg.
MarketId
field describes the id of the market where the order is placed.
SubaccountId
field describes the subaccount id that placed the order.
OrderHash
field describes the hash of the order.
MsgBatchCancelDerivativeOrders
is a message to cancel derivative orders in batch.
Fields description
Sender
field describes the creator of this msg.
Data
field describes the orders to cancel.
MsgSubaccountTransfer
is a message to transfer balance between sub-accounts.
Fields description
Sender
field describes the creator of this msg.
SourceSubaccountId
field describes a source subaccount to send coins from.
DestinationSubaccountId
field describes a destination subaccount to send coins to.
Amount
field describes the amount of coin to send.
MsgExternalTransfer
is a message to transfer balance from one of source account to external sub-account.
Fields description
Sender
field describes the creator of this msg.
SourceSubaccountId
field describes a source subaccount to send coins from.
DestinationSubaccountId
field describes a destination subaccount to send coins to.
Amount
field describes the amount of coin to send.
MsgLiquidatePosition
describes a message to liquidate an account's position
Fields description
Sender
field describes the creator of this msg.
SubaccountId
field describes a subaccount to receive liquidation amount.
MarketId
field describes a market where the position is in.
Order
field describes the order info.
MsgIncreasePositionMargin
describes a message to increase margin of an account.
Fields description
Sender
field describes the creator of this msg.
SourceSubaccountId
field describes a source subaccount to send balance from.
DestinationSubaccountId
field describes a destination subaccount to receive balance.
MarketId
field describes a market where positions are in.
Amount
field describes amount to increase.
MsgBatchUpdateOrders
allows for the atomic cancellation and creation of spot and derivative limit orders, along with a new order cancellation mode. Upon execution, order cancellations (if any) occur first, followed by order creations (if any).
Fields description
Sender
field describes the creator of this msg.
SubaccountId
field describes the sender's sub-account ID.
SpotMarketIdsToCancelAll
field describes a list of spot market IDs for which the sender wants to cancel all open orders.
DerivativeMarketIdsToCancelAll
field describes a list of derivative market IDs for which the sender wants to cancel all open orders.
SpotOrdersToCancel
field describes specific spot orders the sender wants to cancel.
DerivativeOrdersToCancel
field describes specific derivative orders the sender wants to cancel.
SpotOrdersToCreate
field describes spot orders the sender wants to create.
DerivativeOrdersToCreate
field describes derivative orders the sender wants to create.