# Events

The exchange module emits the following events:

# Handlers

# MsgDeposit

Type Attribute Key Attribute Value
coin_received receiver
coin_received amount
coin_spent spender
coin_spent amount
EventSubaccountDeposit src_address
EventSubaccountDeposit subaccount_id
EventSubaccountDeposit amount
message action MsgDeposit
message sender
transfer recipient
transfer sender
transfer amount

# MsgWithdraw

Type Attribute Key Attribute Value
coin_received receiver
coin_received amount
coin_spent spender
coin_spent amount
EventSubaccountWithdraw subaccount_id
EventSubaccountWithdraw dst_address
EventSubaccountWithdraw amount
message action MsgWithdraw
message sender
transfer recipient
transfer sender
transfer amount

# MsgInstantSpotMarketLaunch

Type Attribute Key Attribute Value
coin_received receiver
coin_received amount
coin_spent spender
coin_spent amount
EventSpotMarketUpdate market
message action MsgInstantSpotMarketLaunch
message sender
transfer recipient
transfer sender
transfer amount

# MsgInstantPerpetualMarketLaunch

Type Attribute Key Attribute Value
coin_received receiver
coin_received amount
coin_spent spender
coin_spent amount
EventPerpetualMarketUpdate funding
EventPerpetualMarketUpdate market
EventPerpetualMarketUpdate perpetual_market_info
message action MsgInstantPerpetualMarketLaunch
message sender
transfer recipient
transfer sender
transfer amount

# MsgInstantExpiryFuturesMarketLaunch

Type Attribute Key Attribute Value
coin_received receiver
coin_received amount
coin_spent spender
coin_spent amount
EventExpiryFuturesMarketUpdate market
EventExpiryFuturesMarketUpdate expiry_futures_market_info
EventExpiryFuturesMarketUpdate market
message action MsgInstantExpiryFuturesMarketLaunch
message sender
transfer recipient
transfer sender
transfer amount

# MsgCreateSpotLimitOrder

Type Attribute Key Attribute Value
message action MsgCreateSpotLimitOrder
message sender

Note: No special event is triggered for MsgCreateSpotLimitOrder

# MsgBatchCreateSpotLimitOrders

Type Attribute Key Attribute Value
message action MsgBatchCreateSpotLimitOrders
message sender

Note: No special event is triggered for MsgBatchCreateSpotLimitOrders

# MsgCreateSpotMarketOrder

Type Attribute Key Attribute Value
message action MsgCreateSpotMarketOrder
message sender

Note: No special event is triggered for MsgBatchCreateSpotLimitOrders

# MsgCancelSpotOrder

Type Attribute Key Attribute Value
EventCancelSpotOrder market_id
EventCancelSpotOrder order
message action MsgCancelSpotOrder
message sender

# MsgBatchCancelSpotOrders

Type Attribute Key Attribute Value
message action MsgBatchCancelSpotOrders
message sender

Note: No special event is triggered for MsgBatchCancelSpotOrders

# MsgCreateDerivativeLimitOrder

Type Attribute Key Attribute Value
message action MsgCreateDerivativeLimitOrder
message sender

Note: No special event is triggered for MsgCreateDerivativeLimitOrder

# MsgBatchCreateDerivativeLimitOrders

Type Attribute Key Attribute Value
message action MsgBatchCreateDerivativeLimitOrders
message sender

Note: No special event is triggered for MsgBatchCreateDerivativeLimitOrders

# MsgCreateDerivativeMarketOrder

Type Attribute Key Attribute Value
EventBatchDerivativePosition market_id
EventBatchDerivativePosition positions
EventCancelDerivativeOrder[] market_id
EventCancelDerivativeOrder[] isLimitCancel
EventCancelDerivativeOrder[] limit_order
EventCancelDerivativeOrder[] market_order_cancel
message action MsgCreateDerivativeMarketOrder
message sender

# MsgCancelDerivativeOrder

Type Attribute Key Attribute Value
EventCancelDerivativeOrder limit_order
EventCancelDerivativeOrder market_order_cancel
EventCancelDerivativeOrder market_id
EventCancelDerivativeOrder isLimitCancel
message action MsgCancelDerivativeOrder
message sender

# MsgBatchCancelDerivativeOrders

Type Attribute Key Attribute Value
message action MsgBatchCancelDerivativeOrders
message sender

Note: No special event is triggered for MsgBatchCancelDerivativeOrders

# MsgSubaccountTransfer

Type Attribute Key Attribute Value
EventSubaccountBalanceTransfer src_subaccount_id
EventSubaccountBalanceTransfer dst_subaccount_id
EventSubaccountBalanceTransfer amount
message action MsgSubaccountTransfer
message sender

# MsgExternalTransfer

Type Attribute Key Attribute Value
EventSubaccountBalanceTransfer src_subaccount_id
EventSubaccountBalanceTransfer dst_subaccount_id
EventSubaccountBalanceTransfer amount
message action MsgSubaccountTransfer
message sender

# MsgLiquidatePosition

Type Attribute Key Attribute Value
EventBatchDerivativeExecution executionType "Market"
EventBatchDerivativeExecution trades
EventBatchDerivativeExecution market_id
EventBatchDerivativeExecution is_buy false
EventBatchDerivativeExecution is_liquidation true
EventBatchDerivativeExecution cumulative_funding null
EventInsuranceFundUpdate fund
coin_spent spender
coin_spent amount
coin_received receiver
coin_received amount
transfer recipient
transfer sender
transfer amount
message action MsgLiquidatePosition
message sender

# MsgIncreasePositionMargin

Type Attribute Key Attribute Value
message action MsgIncreasePositionMargin
message sender

Note: No special event is triggered for MsgIncreasePositionMargin

# SpotMarketLaunchProposal

Type Attribute Key Attribute Value
EventSpotMarketUpdate market

# PerpetualMarketLaunchProposal

Type Attribute Key Attribute Value
EventPerpetualMarketUpdate funding
EventPerpetualMarketUpdate market
EventPerpetualMarketUpdate perpetual_market_info

# ExpiryFuturesMarketLaunchProposal

Type Attribute Key Attribute Value
EventExpiryFuturesMarketUpdate market
EventExpiryFuturesMarketUpdate expiry_futures_market_info
EventExpiryFuturesMarketUpdate market

# ExchangeEnableProposal

Type Attribute Key Attribute Value

# SpotMarketParamUpdateProposal

Type Attribute Key Attribute Value

# DerivativeMarketParamUpdateProposal

Type Attribute Key Attribute Value

# BeginBlocker

Type Attribute Key Attribute Value
EventPerpetualMarketFundingUpdate market_id
EventPerpetualMarketFundingUpdate funding
EventPerpetualMarketFundingUpdate is_hourly_funding
EventDerivativeMarketPaused market_id
EventDerivativeMarketPaused settle_price
EventDerivativeMarketPaused total_missing_funds
EventDerivativeMarketPaused missing_funds_rate

# EndBlocker

Type Attribute Key Attribute Value
EventNewSpotOrders sell_orders
EventNewSpotOrders market_id
EventNewSpotOrders buy_orders
EventBatchDepositUpdate deposit_updates
EventNewDerivativeOrders sell_orders
EventNewDerivativeOrders market_id
EventNewDerivativeOrders buy_orders
EventCancelDerivativeOrder market_id
EventCancelDerivativeOrder is_limit_cancel
EventCancelDerivativeOrder limit_order
EventCancelDerivativeOrder market_order_cancel