syntax = "proto3"; package injective.exchange.v1beta1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "injective/oracle/v1beta1/oracle.proto"; import "injective/exchange/v1beta1/exchange.proto"; option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; 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) = "github.com/cosmos/cosmos-sdk/types.Dec", (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) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; string lost_funds_from_order_cancels = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (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 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 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) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = true ]; string mark_price = 5 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (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 DerivativeMarketOrderCancel { DerivativeMarketOrder market_order = 1 [ (gogoproto.nullable) = true ]; string cancel_quantity = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; } 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 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 { bytes market_id = 1; bool isLimitTrigger = 2; bytes triggered_order_hash = 3; bytes placed_order_hash = 4; } message EventOrderFail { bytes account = 1; repeated bytes hashes = 2; repeated uint32 flags = 3; } 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 { bytes market_id = 1; repeated Level buy_levels = 2; repeated Level sell_levels = 3; }