Injective | Documentation
InjectiveGithub
Injective | Documentation
Injective | Documentation
  • About Injective
  • Getting Started
    • Wallet
      • Create a wallet
      • Accounts
      • Staking
      • Governance
      • Auction
    • Token Standards
      • INJ coin
      • Token Factory
      • CW20 Standard
    • Transactions
      • Gas and Fees
  • Guides
    • Create a Wallet
    • Bridge
      • From Ethereum
      • Using Wormhole
      • Using IBC
      • From Solana
    • Launch a Token
    • Launch a Market
    • Denom Metadata
    • Get INJ
  • Toolkits
    • injectived
      • Install injectived
      • Using injectived
      • Commands
    • Injective TS SDK
    • Injective Go SDK
    • Injective Python SDK
    • Injective CW SDK
    • Injective Rust
    • The Graph
  • References
  • Glossary
  • Developers
    • Getting Started
      • Guides
        • Testnet Proposals
        • Convert addresses
        • Calculations
          • Min Price Tick Size
          • Min Quantity Tick Size
        • Testnet Faucet Integration
    • Exchange Developers
      • Build a DEX
      • Provider Oracle
    • Cosmwasm Developers
      • Your First Smart Contract
      • Guides
        • Local Development
        • Mainnet Deployment
        • Whitelisting deployment address
        • Create your Swap Contract
        • Creating UIs
      • Using Injective Queries and Messages
      • CW20 Adapter
      • Injective Test Tube
    • Modules
      • Injective
        • Auction
          • State
          • Messages
          • EndBlock
          • Events
          • Params
          • Errors
        • Exchange
          • Derivative Markets Concepts
          • Spot Markets Concepts
          • Binary Option Markets Concepts
          • Other Concepts
          • State
          • State Transitions
          • Messages
          • Proposals
          • BeginBlock
          • EndBlock
          • Events
          • Params
          • MsgPrivilegedExecuteContract
          • Errors
        • Insurance
          • State
          • State Transitions
          • Messages
          • EndBlock
          • Events
          • Params
          • Improvements
          • Errors
        • OCR
          • Concepts
          • State
          • Messages
          • Proposals
          • BeginBlock
          • Hooks
          • Events
          • Params
          • Errors
        • Oracle
          • State
          • Keeper
          • Messages
          • Proposals
          • Events
          • Improvements
          • Errors
        • Peggy
          • Definitions
          • Workflow
          • State
          • Messages
          • Slashing
          • EndBlock
          • Events
          • Params
          • Relay Semantics
          • Improvements
          • Errors
        • Permissions
          • Concepts
          • State
          • State Transition
          • Errors
        • TokenFactory
          • Concepts
          • State
          • Messages
          • Events
          • Params
          • Errors
        • WasmX
          • Concepts
          • Data
          • Proposals
          • Messages
          • Params
          • Errors
        • Lanes
        • TxFees
      • Core
        • Auth
        • AuthZ
        • Bank
        • Consensus
        • Crisis
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Group
        • Mint
        • NFT
        • Params
        • Slashing
        • Staking
        • Upgrade
        • Circuit
        • Genutils
    • dApps Documentation
  • Nodes
    • Getting Started
      • Interact with a node
      • Running a node
        • Setting up the keyring
        • Join a network
        • Cosmovisor
        • Upgrade your node
    • Validators
      • Mainnet
        • Peggo
        • Canonical Chain Upgrades
          • Upgrade to 10002-rc1
          • Upgrade to 10002-rc2
          • Upgrade to 10003-rc1
          • Upgrade to 10004-rc1
          • Upgrade to 10004-rc1-patch
          • Upgrade to 10005-rc1
          • Upgrade to 10006-rc1
          • Upgrade to 10007-rc1
          • Upgrade to 10008 - Camelot
          • Upgrade to 10009
          • Upgrade to v1.10
          • Upgrade to v1.11
          • Upgrade to v1.12.0 - Volan
          • Upgrade to v1.12.1
          • Upgrade to v1.13.0 - Altaris
          • Upgrade to v1.13.2
          • Upgrade to v1.13.3
          • Upgrade to v1.14.0
          • Upgrade to v1.14.1
          • Upgrade to v1.15.0
      • Testnet
        • Testnet Peggo
    • Public Endpoints
    • Premium Endpoints
    • Injective Indexer Setup
  • Traders
    • Getting Started
    • Documentation
    • API Reference
  • Useful Links
    • Injective 101
    • Injective Hub
    • Injective Explorer
    • Chain API Reference
    • Indexer API Reference
    • Testnet Faucet
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Developers
  2. Modules
  3. Injective
  4. Exchange

Events

The exchange module emits the following events:

message EventBatchSpotExecution {
  string market_id = 1;
  bool is_buy = 2;
  ExecutionType executionType = 3;
  repeated TradeLog trades = 4;
}

message EventBatchDerivativeExecution {
  string market_id = 1;
  bool is_buy = 2;
  bool is_liquidation = 3;
  // nil for time expiry futures
  string cumulative_funding = 4 [
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = true
  ];
  ExecutionType executionType = 5;
  repeated DerivativeTradeLog trades = 6;
}

message EventLostFundsFromLiquidation {
  string market_id = 1;
  bytes subaccount_id = 2;
  string lost_funds_from_available_during_payout = 3 [
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  string lost_funds_from_order_cancels = 4 [
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}

message EventBatchDerivativePosition {
  string market_id = 1;
  repeated SubaccountPosition positions = 2;
}

message EventDerivativeMarketPaused {
  string market_id = 1;
  string settle_price = 2;
  string total_missing_funds = 3;
  string missing_funds_rate = 4;
}

message EventBinaryOptionsMarketUpdate {
  BinaryOptionsMarket market = 1 [
    (gogoproto.nullable) = false
  ];
}

message EventNewSpotOrders {
  string market_id = 1;
  repeated SpotLimitOrder buy_orders = 2;
  repeated SpotLimitOrder sell_orders = 3;
}

message EventNewDerivativeOrders {
  string market_id = 1;
  repeated DerivativeLimitOrder buy_orders = 2;
  repeated DerivativeLimitOrder sell_orders = 3;
}

message EventCancelSpotOrder {
  string market_id = 1;
  SpotLimitOrder order = 2 [
    (gogoproto.nullable) = false
  ];
}

message EventSpotMarketUpdate {
  SpotMarket market = 1 [
    (gogoproto.nullable) = false
  ];
}

message EventPerpetualMarketUpdate {
  DerivativeMarket market = 1 [
    (gogoproto.nullable) = false
  ];
  PerpetualMarketInfo perpetual_market_info = 2[
    (gogoproto.nullable) = true
  ];
  PerpetualMarketFunding funding = 3[
    (gogoproto.nullable) = true
  ];
}

message EventExpiryFuturesMarketUpdate {
  DerivativeMarket market = 1 [
    (gogoproto.nullable) = false
  ];
  ExpiryFuturesMarketInfo expiry_futures_market_info = 3[
    (gogoproto.nullable) = true
  ];
}

message EventPerpetualMarketFundingUpdate {
  string market_id = 1;
  PerpetualMarketFunding funding = 2[
    (gogoproto.nullable) = false
  ];
  bool is_hourly_funding = 3;
  string funding_rate = 4 [
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = true
  ];
  string mark_price = 5 [
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = true
  ];
}

message EventSubaccountDeposit {
  string src_address = 1;
  bytes subaccount_id = 2;
  cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
}

message EventSubaccountWithdraw {
  bytes subaccount_id = 1;
  string dst_address = 2;
  cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
}

message EventSubaccountBalanceTransfer {
  string src_subaccount_id = 1;
  string dst_subaccount_id = 2;
  cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
}

message EventBatchDepositUpdate {
  repeated DepositUpdate deposit_updates = 1;
}

message EventCancelDerivativeOrder {
  string market_id = 1;
  bool isLimitCancel = 2;
  DerivativeLimitOrder limit_order = 3 [
    (gogoproto.nullable) = true
  ];
  DerivativeMarketOrderCancel market_order_cancel = 4 [
    (gogoproto.nullable) = true
  ];
}

message EventFeeDiscountSchedule {
  FeeDiscountSchedule schedule = 1;
}

message EventTradingRewardCampaignUpdate {
  TradingRewardCampaignInfo campaign_info = 1;
  repeated CampaignRewardPool campaign_reward_pools = 2;
}

message EventTradingRewardDistribution {
  repeated AccountRewards account_rewards = 1;
}

message EventMarketBeyondBankruptcy {
  string market_id = 1;
  string settle_price = 2;
  string missing_market_funds = 3;
}

message EventAllPositionsHaircut {
  string market_id = 1;
  string settle_price = 2;
  string missing_funds_rate = 3;
}

message EventNewConditionalDerivativeOrder {
  string market_id = 1;
  DerivativeOrder order = 2;
  bytes hash = 3;
  bool is_market = 4;
}

message EventCancelConditionalDerivativeOrder {
  string market_id = 1;
  bool isLimitCancel = 2;
  DerivativeLimitOrder limit_order = 3 [ (gogoproto.nullable) = true ];
  DerivativeMarketOrder market_order = 4 [ (gogoproto.nullable) = true ];
}

message EventConditionalDerivativeOrderTrigger {
  string market_id = 1;
  bool isLimitTrigger = 2;
  bytes triggered_order_hash = 3;
  bytes placed_order_hash = 4;
  string triggered_order_cid = 5;
}

message EventOrderFail {
  bytes account = 1;
  repeated bytes hashes = 2;
  repeated uint32 flags = 3;
  repeated string cids = 4;
}

message EventAtomicMarketOrderFeeMultipliersUpdated {
  repeated MarketFeeMultiplier market_fee_multipliers = 1;
}

message EventOrderbookUpdate {
  repeated OrderbookUpdate spot_updates = 1;
  repeated OrderbookUpdate derivative_updates = 2;
}

message OrderbookUpdate {
  uint64 seq = 1;
  Orderbook orderbook = 2;
}

message Orderbook {
  string market_id = 1;
  repeated Level buy_levels = 2;
  repeated Level sell_levels = 3;
}

message EventGrantAuthorizations {
  string granter = 1;
  repeated GrantAuthorization grants = 2;
}

message EventGrantActivation {
  string grantee = 1;
  string granter = 2;
  string amount = 3 [
    (gogoproto.customtype) = "cosmossdk.io/math.Int",
    (gogoproto.nullable) = false
  ];
}

message EventInvalidGrant {
  string grantee = 1;
  string granter = 2;
}

message EventOrderCancelFail {
  string market_id = 1;
  string subaccount_id = 2;
  string order_hash = 3;
  string cid = 4;
  string description = 5;
}
PreviousEndBlockNextParams

Last updated 1 month ago