github.com/InjectiveLabs/sdk-go@v1.53.0/proto/injective/exchange/v1beta1/events.proto (about) 1 syntax = "proto3"; 2 package injective.exchange.v1beta1; 3 4 import "gogoproto/gogo.proto"; 5 import "cosmos/base/v1beta1/coin.proto"; 6 import "injective/oracle/v1beta1/oracle.proto"; 7 import "injective/exchange/v1beta1/exchange.proto"; 8 9 option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; 10 11 message EventBatchSpotExecution { 12 string market_id = 1; 13 bool is_buy = 2; 14 ExecutionType executionType = 3; 15 repeated TradeLog trades = 4; 16 } 17 18 message EventBatchDerivativeExecution { 19 string market_id = 1; 20 bool is_buy = 2; 21 bool is_liquidation = 3; 22 // nil for time expiry futures 23 string cumulative_funding = 4 [ 24 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 25 (gogoproto.nullable) = true 26 ]; 27 ExecutionType executionType = 5; 28 repeated DerivativeTradeLog trades = 6; 29 } 30 31 message EventLostFundsFromLiquidation { 32 string market_id = 1; 33 bytes subaccount_id = 2; 34 string lost_funds_from_available_during_payout = 3 [ 35 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 36 (gogoproto.nullable) = false 37 ]; 38 string lost_funds_from_order_cancels = 4 [ 39 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 40 (gogoproto.nullable) = false 41 ]; 42 } 43 44 message EventBatchDerivativePosition { 45 string market_id = 1; 46 repeated SubaccountPosition positions = 2; 47 } 48 49 message EventDerivativeMarketPaused { 50 string market_id = 1; 51 string settle_price = 2; 52 string total_missing_funds = 3; 53 string missing_funds_rate = 4; 54 } 55 56 message EventMarketBeyondBankruptcy { 57 string market_id = 1; 58 string settle_price = 2; 59 string missing_market_funds = 3; 60 } 61 62 message EventAllPositionsHaircut { 63 string market_id = 1; 64 string settle_price = 2; 65 string missing_funds_rate = 3; 66 } 67 68 message EventBinaryOptionsMarketUpdate { 69 BinaryOptionsMarket market = 1 [ (gogoproto.nullable) = false ]; 70 } 71 72 message EventNewSpotOrders { 73 string market_id = 1; 74 repeated SpotLimitOrder buy_orders = 2; 75 repeated SpotLimitOrder sell_orders = 3; 76 } 77 78 message EventNewDerivativeOrders { 79 string market_id = 1; 80 repeated DerivativeLimitOrder buy_orders = 2; 81 repeated DerivativeLimitOrder sell_orders = 3; 82 } 83 84 message EventCancelSpotOrder { 85 string market_id = 1; 86 SpotLimitOrder order = 2 [ (gogoproto.nullable) = false ]; 87 } 88 89 message EventSpotMarketUpdate { 90 SpotMarket market = 1 [ (gogoproto.nullable) = false ]; 91 } 92 93 message EventPerpetualMarketUpdate { 94 DerivativeMarket market = 1 [ (gogoproto.nullable) = false ]; 95 PerpetualMarketInfo perpetual_market_info = 2 [ (gogoproto.nullable) = true ]; 96 PerpetualMarketFunding funding = 3 [ (gogoproto.nullable) = true ]; 97 } 98 99 message EventExpiryFuturesMarketUpdate { 100 DerivativeMarket market = 1 [ (gogoproto.nullable) = false ]; 101 ExpiryFuturesMarketInfo expiry_futures_market_info = 3 102 [ (gogoproto.nullable) = true ]; 103 } 104 105 message EventPerpetualMarketFundingUpdate { 106 string market_id = 1; 107 PerpetualMarketFunding funding = 2 [ (gogoproto.nullable) = false ]; 108 bool is_hourly_funding = 3; 109 string funding_rate = 4 [ 110 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 111 (gogoproto.nullable) = true 112 ]; 113 string mark_price = 5 [ 114 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 115 (gogoproto.nullable) = true 116 ]; 117 } 118 119 message EventSubaccountDeposit { 120 string src_address = 1; 121 bytes subaccount_id = 2; 122 cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; 123 } 124 125 message EventSubaccountWithdraw { 126 bytes subaccount_id = 1; 127 string dst_address = 2; 128 cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; 129 } 130 131 message EventSubaccountBalanceTransfer { 132 string src_subaccount_id = 1; 133 string dst_subaccount_id = 2; 134 cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; 135 } 136 137 message EventBatchDepositUpdate { repeated DepositUpdate deposit_updates = 1; } 138 139 message DerivativeMarketOrderCancel { 140 DerivativeMarketOrder market_order = 1 [ (gogoproto.nullable) = true ]; 141 string cancel_quantity = 2 [ 142 (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", 143 (gogoproto.nullable) = false 144 ]; 145 } 146 147 message EventCancelDerivativeOrder { 148 string market_id = 1; 149 bool isLimitCancel = 2; 150 DerivativeLimitOrder limit_order = 3 [ (gogoproto.nullable) = true ]; 151 DerivativeMarketOrderCancel market_order_cancel = 4 152 [ (gogoproto.nullable) = true ]; 153 } 154 155 message EventFeeDiscountSchedule { FeeDiscountSchedule schedule = 1; } 156 157 message EventTradingRewardCampaignUpdate { 158 TradingRewardCampaignInfo campaign_info = 1; 159 repeated CampaignRewardPool campaign_reward_pools = 2; 160 } 161 162 message EventTradingRewardDistribution { 163 repeated AccountRewards account_rewards = 1; 164 } 165 166 message EventNewConditionalDerivativeOrder { 167 string market_id = 1; 168 DerivativeOrder order = 2; 169 bytes hash = 3; 170 bool is_market = 4; 171 } 172 173 message EventCancelConditionalDerivativeOrder { 174 string market_id = 1; 175 bool isLimitCancel = 2; 176 DerivativeLimitOrder limit_order = 3 [ (gogoproto.nullable) = true ]; 177 DerivativeMarketOrder market_order = 4 [ (gogoproto.nullable) = true ]; 178 } 179 180 message EventConditionalDerivativeOrderTrigger { 181 bytes market_id = 1; 182 bool isLimitTrigger = 2; 183 bytes triggered_order_hash = 3; 184 bytes placed_order_hash = 4; 185 string triggered_order_cid = 5; 186 } 187 188 message EventOrderFail { 189 bytes account = 1; 190 repeated bytes hashes = 2; 191 repeated uint32 flags = 3; 192 repeated string cids = 4; 193 } 194 195 message EventAtomicMarketOrderFeeMultipliersUpdated { 196 repeated MarketFeeMultiplier market_fee_multipliers = 1; 197 } 198 199 message EventOrderbookUpdate { 200 repeated OrderbookUpdate spot_updates = 1; 201 repeated OrderbookUpdate derivative_updates = 2; 202 } 203 204 message OrderbookUpdate { 205 uint64 seq = 1; 206 Orderbook orderbook = 2; 207 } 208 209 message Orderbook { 210 bytes market_id = 1; 211 repeated Level buy_levels = 2; 212 repeated Level sell_levels = 3; 213 } 214 215 message EventGrantAuthorizations { 216 string granter = 1; 217 repeated GrantAuthorization grants = 2; 218 } 219 220 message EventGrantActivation { 221 string grantee = 1; 222 string granter = 2; 223 string amount = 3 [ 224 (gogoproto.customtype) = "cosmossdk.io/math.Int", 225 (gogoproto.nullable) = false 226 ]; 227 } 228 229 message EventInvalidGrant { 230 string grantee = 1; 231 string granter = 2; 232 } 233 234 message EventOrderCancelFail { 235 string market_id = 1; 236 string subaccount_id = 2; 237 string order_hash = 3; 238 string cid = 4; 239 string description = 5; 240 }