diff --git a/Makefile b/Makefile index e374d7d6..1686cc09 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ all: clone-injective-indexer: - git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.16.20 --depth 1 --single-branch + git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.16.54 --depth 1 --single-branch clone-injective-core: - git clone https://github.com/InjectiveLabs/injective-core.git -b v1.16.0-beta.3 --depth 1 --single-branch + git clone https://github.com/InjectiveLabs/injective-core.git -b v1.16.0 --depth 1 --single-branch copy-exchange-client: clone-injective-indexer rm -rf exchange/* diff --git a/chain/auction/types/tx.pb.go b/chain/auction/types/tx.pb.go index 28135196..e3147635 100644 --- a/chain/auction/types/tx.pb.go +++ b/chain/auction/types/tx.pb.go @@ -34,6 +34,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Bid defines a SDK message for placing a bid for an auction type MsgBid struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // amount of the bid in INJ tokens BidAmount types.Coin `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount"` diff --git a/chain/evm/types/key.go b/chain/evm/types/key.go index 62a3e497..5962c890 100644 --- a/chain/evm/types/key.go +++ b/chain/evm/types/key.go @@ -62,13 +62,6 @@ func StateKey(address common.Address, key []byte) []byte { return append(AddressStoragePrefix(address), key...) } -func ObjectGasUsedKey(txIndex int) []byte { - var key [1 + 8]byte - key[0] = prefixObjectGasUsed - binary.BigEndian.PutUint64(key[1:], uint64(txIndex)) - return key[:] -} - func ObjectBloomKey(txIndex, msgIndex int) []byte { var key [1 + 8 + 8]byte key[0] = prefixObjectBloom diff --git a/chain/exchange/types/authz.pb.go b/chain/exchange/types/authz.pb.go index ef1ed4be..2ac3e247 100644 --- a/chain/exchange/types/authz.pb.go +++ b/chain/exchange/types/authz.pb.go @@ -29,8 +29,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // spot authz messages type CreateSpotLimitOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateSpotLimitOrderAuthz) Reset() { *m = CreateSpotLimitOrderAuthz{} } @@ -81,8 +83,10 @@ func (m *CreateSpotLimitOrderAuthz) GetMarketIds() []string { } type CreateSpotMarketOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateSpotMarketOrderAuthz) Reset() { *m = CreateSpotMarketOrderAuthz{} } @@ -133,8 +137,10 @@ func (m *CreateSpotMarketOrderAuthz) GetMarketIds() []string { } type BatchCreateSpotLimitOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCreateSpotLimitOrdersAuthz) Reset() { *m = BatchCreateSpotLimitOrdersAuthz{} } @@ -185,8 +191,10 @@ func (m *BatchCreateSpotLimitOrdersAuthz) GetMarketIds() []string { } type CancelSpotOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CancelSpotOrderAuthz) Reset() { *m = CancelSpotOrderAuthz{} } @@ -237,8 +245,10 @@ func (m *CancelSpotOrderAuthz) GetMarketIds() []string { } type BatchCancelSpotOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCancelSpotOrdersAuthz) Reset() { *m = BatchCancelSpotOrdersAuthz{} } @@ -290,8 +300,10 @@ func (m *BatchCancelSpotOrdersAuthz) GetMarketIds() []string { // derivative authz messages type CreateDerivativeLimitOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateDerivativeLimitOrderAuthz) Reset() { *m = CreateDerivativeLimitOrderAuthz{} } @@ -342,8 +354,10 @@ func (m *CreateDerivativeLimitOrderAuthz) GetMarketIds() []string { } type CreateDerivativeMarketOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateDerivativeMarketOrderAuthz) Reset() { *m = CreateDerivativeMarketOrderAuthz{} } @@ -394,8 +408,10 @@ func (m *CreateDerivativeMarketOrderAuthz) GetMarketIds() []string { } type BatchCreateDerivativeLimitOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCreateDerivativeLimitOrdersAuthz) Reset() { *m = BatchCreateDerivativeLimitOrdersAuthz{} } @@ -551,8 +567,11 @@ func (m *BatchCancelDerivativeOrdersAuthz) GetMarketIds() []string { // common authz message used in both spot & derivative markets type BatchUpdateOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - SpotMarkets []string `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the spot market IDs + SpotMarkets []string `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + // the derivative market IDs DerivativeMarkets []string `protobuf:"bytes,3,rep,name=derivative_markets,json=derivativeMarkets,proto3" json:"derivative_markets,omitempty"` } diff --git a/chain/exchange/types/exchange.pb.go b/chain/exchange/types/exchange.pb.go index dde8283e..981257cc 100644 --- a/chain/exchange/types/exchange.pb.go +++ b/chain/exchange/types/exchange.pb.go @@ -510,13 +510,13 @@ type DerivativeMarket struct { // Status of the market Status MarketStatus `protobuf:"varint,14,opt,name=status,proto3,enum=injective.exchange.v1beta1.MarketStatus" json:"status,omitempty"` // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in chain format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in chain format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in chain format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // current market admin Admin string `protobuf:"bytes,18,opt,name=admin,proto3" json:"admin,omitempty"` @@ -651,10 +651,10 @@ type ExpiryFuturesMarketInfo struct { // calculation window TwapStartTimestamp int64 `protobuf:"varint,3,opt,name=twap_start_timestamp,json=twapStartTimestamp,proto3" json:"twap_start_timestamp,omitempty"` // expiration_twap_start_price_cumulative defines the cumulative price for the - // start of the TWAP window + // start of the TWAP window (in chain format) ExpirationTwapStartPriceCumulative cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=expiration_twap_start_price_cumulative,json=expirationTwapStartPriceCumulative,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expiration_twap_start_price_cumulative"` // settlement_price defines the settlement price for a time expiry futures - // market. + // market (in chain format) SettlementPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price"` } @@ -786,9 +786,10 @@ type PerpetualMarketFunding struct { // cumulative_funding defines the cumulative funding of a perpetual market. CumulativeFunding cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=cumulative_funding,json=cumulativeFunding,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding"` // cumulative_price defines the cumulative price for the current hour up to - // the last timestamp + // the last timestamp (in chain format) CumulativePrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=cumulative_price,json=cumulativePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_price"` - LastTimestamp int64 `protobuf:"varint,3,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` + // the last timestamp in seconds + LastTimestamp int64 `protobuf:"varint,3,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` } func (m *PerpetualMarketFunding) Reset() { *m = PerpetualMarketFunding{} } @@ -923,11 +924,11 @@ func (m *NextFundingTimestamp) GetNextTimestamp() int64 { } type MidPriceAndTOB struct { - // mid price of the market + // mid price of the market (in chain format) MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` - // best buy price of the market + // best buy price of the market (in chain format) BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` - // best sell price of the market + // best sell price of the market (in chain format) BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` } @@ -985,13 +986,13 @@ type SpotMarket struct { // Status of the market Status MarketStatus `protobuf:"varint,8,opt,name=status,proto3,enum=injective.exchange.v1beta1.MarketStatus" json:"status,omitempty"` // min_price_tick_size defines the minimum tick size that the price required - // for orders in the market + // for orders in the market (in chain format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in chain format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in chain format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // current market admin Admin string `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` @@ -1514,16 +1515,20 @@ func (m *DerivativeOrder) GetOrderType() OrderType { } type SubaccountOrderbookMetadata struct { - VanillaLimitOrderCount uint32 `protobuf:"varint,1,opt,name=vanilla_limit_order_count,json=vanillaLimitOrderCount,proto3" json:"vanilla_limit_order_count,omitempty"` + // The number of vanilla limit orders + VanillaLimitOrderCount uint32 `protobuf:"varint,1,opt,name=vanilla_limit_order_count,json=vanillaLimitOrderCount,proto3" json:"vanilla_limit_order_count,omitempty"` + // The number of reduce-only limit orders ReduceOnlyLimitOrderCount uint32 `protobuf:"varint,2,opt,name=reduce_only_limit_order_count,json=reduceOnlyLimitOrderCount,proto3" json:"reduce_only_limit_order_count,omitempty"` - // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the - // subaccount's reduce-only limit orders in the given direction. + // The aggregate quantity of the subaccount's reduce-only limit orders (in + // chain format) AggregateReduceOnlyQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=aggregate_reduce_only_quantity,json=aggregateReduceOnlyQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_reduce_only_quantity"` - // AggregateVanillaQuantity is the aggregate fillable quantity of the - // subaccount's vanilla limit orders in the given direction. - AggregateVanillaQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=aggregate_vanilla_quantity,json=aggregateVanillaQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_vanilla_quantity"` - VanillaConditionalOrderCount uint32 `protobuf:"varint,5,opt,name=vanilla_conditional_order_count,json=vanillaConditionalOrderCount,proto3" json:"vanilla_conditional_order_count,omitempty"` - ReduceOnlyConditionalOrderCount uint32 `protobuf:"varint,6,opt,name=reduce_only_conditional_order_count,json=reduceOnlyConditionalOrderCount,proto3" json:"reduce_only_conditional_order_count,omitempty"` + // The aggregate quantity of the subaccount's vanilla limit orders (in chain + // format) + AggregateVanillaQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=aggregate_vanilla_quantity,json=aggregateVanillaQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_vanilla_quantity"` + // The number of vanilla conditional orders + VanillaConditionalOrderCount uint32 `protobuf:"varint,5,opt,name=vanilla_conditional_order_count,json=vanillaConditionalOrderCount,proto3" json:"vanilla_conditional_order_count,omitempty"` + // The number of reduce-only conditional orders + ReduceOnlyConditionalOrderCount uint32 `protobuf:"varint,6,opt,name=reduce_only_conditional_order_count,json=reduceOnlyConditionalOrderCount,proto3" json:"reduce_only_conditional_order_count,omitempty"` } func (m *SubaccountOrderbookMetadata) Reset() { *m = SubaccountOrderbookMetadata{} } @@ -1832,10 +1837,15 @@ func (m *DerivativeMarketOrder) GetOrderHash() []byte { } type Position struct { - IsLong bool `protobuf:"varint,1,opt,name=isLong,proto3" json:"isLong,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` - Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // True if the position is long. False if the position is short. + IsLong bool `protobuf:"varint,1,opt,name=isLong,proto3" json:"isLong,omitempty"` + // The quantity of the position (in chain format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // The entry price of the position (in chain format) + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // The margin of the position (in chain format) + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // The cumulative funding CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` } @@ -2519,10 +2529,14 @@ func (m *TradingRewardCampaignInfo) GetDisqualifiedMarketIds() []string { } type FeeDiscountTierInfo struct { + // the maker discount rate MakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_discount_rate,json=makerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_discount_rate"` + // the taker discount rate TakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_discount_rate,json=takerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_discount_rate"` - StakedAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"staked_amount"` - Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` + // the staked amount required to qualify for the discount (in chain format) + StakedAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"staked_amount"` + // the volume required to qualify for the discount (in chain format) + Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` } func (m *FeeDiscountTierInfo) Reset() { *m = FeeDiscountTierInfo{} } @@ -2878,9 +2892,12 @@ func (m *SubaccountIDs) GetSubaccountIds() [][]byte { } type TradeRecord struct { - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the timestamp of the trade + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // the price of the trade (in chain format) + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the quantity of the trade (in chain format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` } func (m *TradeRecord) Reset() { *m = TradeRecord{} } @@ -2924,9 +2941,9 @@ func (m *TradeRecord) GetTimestamp() int64 { } type Level struct { - // price + // price (in chain format) P cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=p,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p"` - // quantity + // quantity (in chain format) Q cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=q,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"q"` } @@ -2964,7 +2981,9 @@ func (m *Level) XXX_DiscardUnknown() { var xxx_messageInfo_Level proto.InternalMessageInfo type AggregateSubaccountVolumeRecord struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount volumes for each market MarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` } @@ -3315,7 +3334,9 @@ func (m *EffectiveGrant) GetIsValid() bool { } type DenomMinNotional struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the denom of the token + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the minimum notional value for the token (in chain format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` } diff --git a/chain/exchange/types/genesis.pb.go b/chain/exchange/types/genesis.pb.go index 58ab2e8f..092dbd4d 100644 --- a/chain/exchange/types/genesis.pb.go +++ b/chain/exchange/types/genesis.pb.go @@ -823,9 +823,12 @@ func (m *ConditionalDerivativeOrderBook) XXX_DiscardUnknown() { var xxx_messageInfo_ConditionalDerivativeOrderBook proto.InternalMessageInfo type Balance struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Deposits *Deposit `protobuf:"bytes,3,opt,name=deposits,proto3" json:"deposits,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the token deposits details + Deposits *Deposit `protobuf:"bytes,3,opt,name=deposits,proto3" json:"deposits,omitempty"` } func (m *Balance) Reset() { *m = Balance{} } @@ -862,9 +865,12 @@ func (m *Balance) XXX_DiscardUnknown() { var xxx_messageInfo_Balance proto.InternalMessageInfo type DerivativePosition struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the position details + Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` } func (m *DerivativePosition) Reset() { *m = DerivativePosition{} } @@ -901,7 +907,9 @@ func (m *DerivativePosition) XXX_DiscardUnknown() { var xxx_messageInfo_DerivativePosition proto.InternalMessageInfo type SubaccountNonce struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount trade nonce SubaccountTradeNonce SubaccountTradeNonce `protobuf:"bytes,2,opt,name=subaccount_trade_nonce,json=subaccountTradeNonce,proto3" json:"subaccount_trade_nonce"` } diff --git a/chain/exchange/types/key.go b/chain/exchange/types/key.go index ca3d8551..bc4bd211 100644 --- a/chain/exchange/types/key.go +++ b/chain/exchange/types/key.go @@ -426,7 +426,7 @@ func OrdersByMarketDirectionPriceOrderHashPrefix(marketID, orderHash common.Hash return append(ordersByMarketDirectionPricePrefix(marketID, price, isLong), orderHash.Bytes()...) } -// ordersByMarketDirectionPricePrefix allows to obtain prefix of exchange against a particular marketID, direction and price +// orderIndexByMarketDirectionSubaccountPrefix allows to obtain prefix of exchange against a particular marketID, direction and price func ordersByMarketDirectionPricePrefix(marketID common.Hash, price *big.Int, isLong bool) []byte { return append(MarketDirectionPrefix(marketID, isLong), common.LeftPadBytes(price.Bytes(), 32)...) } diff --git a/chain/exchange/types/query.pb.go b/chain/exchange/types/query.pb.go index 1520d52f..9b2bc4da 100644 --- a/chain/exchange/types/query.pb.go +++ b/chain/exchange/types/query.pb.go @@ -145,8 +145,10 @@ func (m *Subaccount) GetSubaccountNonce() uint32 { } type QuerySubaccountOrdersRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountOrdersRequest) Reset() { *m = QuerySubaccountOrdersRequest{} } @@ -249,9 +251,12 @@ func (m *QuerySubaccountOrdersResponse) GetSellOrders() []*SubaccountOrderData { } type SubaccountOrderbookMetadataWithMarket struct { + // the subaccount orderbook metadata Metadata *SubaccountOrderbookMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,3,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // true if the order is for buy orders + IsBuy bool `protobuf:"varint,3,opt,name=isBuy,proto3" json:"isBuy,omitempty"` } func (m *SubaccountOrderbookMetadataWithMarket) Reset() { *m = SubaccountOrderbookMetadataWithMarket{} } @@ -395,8 +400,10 @@ func (m *QueryExchangeParamsResponse) GetParams() Params { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. type QuerySubaccountDepositsRequest struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Subaccount *Subaccount `protobuf:"bytes,2,opt,name=subaccount,proto3" json:"subaccount,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // subaccount details + Subaccount *Subaccount `protobuf:"bytes,2,opt,name=subaccount,proto3" json:"subaccount,omitempty"` } func (m *QuerySubaccountDepositsRequest) Reset() { *m = QuerySubaccountDepositsRequest{} } @@ -1154,8 +1161,10 @@ func (m *QueryAggregateMarketVolumesResponse) GetVolumes() []*MarketVolume { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. type QuerySubaccountDepositRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } func (m *QuerySubaccountDepositRequest) Reset() { *m = QuerySubaccountDepositRequest{} } @@ -1450,10 +1459,16 @@ func (m *QuerySpotMarketResponse) GetMarket() *SpotMarket { // method. type QuerySpotOrderbookRequest struct { // Market ID for the market - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - OrderSide OrderSide `protobuf:"varint,3,opt,name=order_side,json=orderSide,proto3,enum=injective.exchange.v1beta1.OrderSide" json:"order_side,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the maximum number of orderbook entries to return per side (optional) + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + // the order side to return the orderbook entries for (optional) + OrderSide OrderSide `protobuf:"varint,3,opt,name=order_side,json=orderSide,proto3,enum=injective.exchange.v1beta1.OrderSide" json:"order_side,omitempty"` + // limits the number of entries to return per side based on the cumulative + // notional (in chain format) LimitCumulativeNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=limit_cumulative_notional,json=limitCumulativeNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_notional,omitempty"` + // limits the number of entries to return per side based on the cumulative + // quantity (in chain format) LimitCumulativeQuantity *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=limit_cumulative_quantity,json=limitCumulativeQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_quantity,omitempty"` } @@ -2058,16 +2073,18 @@ func (m *QueryAccountAddressSpotOrdersRequest) GetAccountAddress() string { } type TrimmedSpotLimitOrder struct { - // price of the order + // price of the order (in chain format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in chain format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in chain format) Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` // true if the order is a buy - IsBuy bool `protobuf:"varint,4,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + IsBuy bool `protobuf:"varint,4,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + // the order hash (optional) OrderHash string `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedSpotLimitOrder) Reset() { *m = TrimmedSpotLimitOrder{} } @@ -2266,11 +2283,11 @@ func (m *QuerySpotMidPriceAndTOBRequest) GetMarketId() string { // QuerySpotMidPriceAndTOBResponse is the response type for the // Query/SpotMidPriceAndTOB RPC method. type QuerySpotMidPriceAndTOBResponse struct { - // mid price of the market + // mid price of the market (in chain format) MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` - // best buy price of the market + // best buy price of the market (in chain format) BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` - // best sell price of the market + // best sell price of the market (in chain format) BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` } @@ -2775,18 +2792,20 @@ func (m *QueryAccountAddressDerivativeOrdersRequest) GetAccountAddress() string } type TrimmedDerivativeLimitOrder struct { - // price of the order + // price of the order (in chain format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in chain format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // margin of the order + // margin of the order (in chain format) Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in chain format) Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` // true if the order is a buy - IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + // the order hash (optional) OrderHash string `protobuf:"bytes,6,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedDerivativeLimitOrder) Reset() { *m = TrimmedDerivativeLimitOrder{} } @@ -3208,11 +3227,15 @@ func (m *PerpetualMarketState) GetFundingInfo() *PerpetualMarketFunding { } type FullDerivativeMarket struct { + // derivative market details Market *DerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // perpetual market state or expiry futures market state + // // Types that are valid to be assigned to Info: // *FullDerivativeMarket_PerpetualInfo // *FullDerivativeMarket_FuturesInfo - Info isFullDerivativeMarket_Info `protobuf_oneof:"info"` + Info isFullDerivativeMarket_Info `protobuf_oneof:"info"` + // mark price (in chain format) MarkPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=mark_price,json=markPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mark_price"` // mid_price_and_tob defines the mid price for this market and the best ask // and bid orders @@ -3556,6 +3579,7 @@ func (m *QueryDerivativeMarketAddressResponse) GetSubaccountId() string { // QuerySubaccountTradeNonceRequest is the request type for the // Query/SubaccountTradeNonce RPC method. type QuerySubaccountTradeNonceRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3602,6 +3626,7 @@ func (m *QuerySubaccountTradeNonceRequest) GetSubaccountId() string { // QuerySubaccountPositionsRequest is the request type for the // Query/SubaccountPositions RPC method. type QuerySubaccountPositionsRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3648,8 +3673,10 @@ func (m *QuerySubaccountPositionsRequest) GetSubaccountId() string { // QuerySubaccountPositionInMarketRequest is the request type for the // Query/SubaccountPositionInMarket RPC method. type QuerySubaccountPositionInMarketRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountPositionInMarketRequest) Reset() { @@ -3704,8 +3731,10 @@ func (m *QuerySubaccountPositionInMarketRequest) GetMarketId() string { // QuerySubaccountEffectivePositionInMarketRequest is the request type for the // Query/SubaccountEffectivePositionInMarket RPC method. type QuerySubaccountEffectivePositionInMarketRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountEffectivePositionInMarketRequest) Reset() { @@ -3762,6 +3791,7 @@ func (m *QuerySubaccountEffectivePositionInMarketRequest) GetMarketId() string { // QuerySubaccountOrderMetadataRequest is the request type for the // Query/SubaccountOrderMetadata RPC method. type QuerySubaccountOrderMetadataRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3900,9 +3930,13 @@ func (m *QuerySubaccountPositionInMarketResponse) GetState() *Position { } type EffectivePosition struct { - IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // whether the position is long or short + IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` + // the quantity of the position (in chain format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the entry price of the position (in chain format) + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // the effective margin of the position (in chain format) EffectiveMargin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=effective_margin,json=effectiveMargin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"effective_margin"` } @@ -5143,13 +5177,20 @@ func (m *QueryBalanceMismatchesRequest) GetDustFactor() int64 { } type BalanceMismatch struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` - Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` - BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the available balance + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + // the total balance + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + // the balance hold + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the expected total balance ExpectedTotal cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=expected_total,json=expectedTotal,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expected_total"` - Difference cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=difference,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"difference"` + // the difference between the total balance and the expected total balance + Difference cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=difference,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"difference"` } func (m *BalanceMismatch) Reset() { *m = BalanceMismatch{} } @@ -5284,11 +5325,16 @@ func (m *QueryBalanceWithBalanceHoldsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest proto.InternalMessageInfo type BalanceWithMarginHold struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` - Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` - BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the available balance + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + // the total balance + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + // the balance on hold + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` } func (m *BalanceWithMarginHold) Reset() { *m = BalanceWithMarginHold{} } @@ -5563,10 +5609,14 @@ var xxx_messageInfo_MitoVaultInfosRequest proto.InternalMessageInfo // MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC // method. type MitoVaultInfosResponse struct { - MasterAddresses []string `protobuf:"bytes,1,rep,name=master_addresses,json=masterAddresses,proto3" json:"master_addresses,omitempty"` + // list of master addresses + MasterAddresses []string `protobuf:"bytes,1,rep,name=master_addresses,json=masterAddresses,proto3" json:"master_addresses,omitempty"` + // list of derivative addresses DerivativeAddresses []string `protobuf:"bytes,2,rep,name=derivative_addresses,json=derivativeAddresses,proto3" json:"derivative_addresses,omitempty"` - SpotAddresses []string `protobuf:"bytes,3,rep,name=spot_addresses,json=spotAddresses,proto3" json:"spot_addresses,omitempty"` - Cw20Addresses []string `protobuf:"bytes,4,rep,name=cw20_addresses,json=cw20Addresses,proto3" json:"cw20_addresses,omitempty"` + // list of spot addresses + SpotAddresses []string `protobuf:"bytes,3,rep,name=spot_addresses,json=spotAddresses,proto3" json:"spot_addresses,omitempty"` + // list of cw20 addresses + Cw20Addresses []string `protobuf:"bytes,4,rep,name=cw20_addresses,json=cw20Addresses,proto3" json:"cw20_addresses,omitempty"` } func (m *MitoVaultInfosResponse) Reset() { *m = MitoVaultInfosResponse{} } @@ -6093,8 +6143,10 @@ func (m *QueryBinaryMarketsResponse) GetMarkets() []*BinaryOptionsMarket { // QueryConditionalOrdersRequest is the request type for the // Query/ConditionalOrders RPC method. type QueryTraderDerivativeConditionalOrdersRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QueryTraderDerivativeConditionalOrdersRequest) Reset() { @@ -6149,19 +6201,22 @@ func (m *QueryTraderDerivativeConditionalOrdersRequest) GetMarketId() string { } type TrimmedDerivativeConditionalOrder struct { - // price of the order + // price of the order (in chain format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in chain format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // margin of the order + // margin of the order (in chain format) Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` - // price to trigger the order + // price to trigger the order (in chain format) TriggerPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"triggerPrice"` // true if the order is a buy - IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` - IsLimit bool `protobuf:"varint,6,opt,name=isLimit,proto3" json:"isLimit"` + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + // true if the order is a limit order + IsLimit bool `protobuf:"varint,6,opt,name=isLimit,proto3" json:"isLimit"` + // the order hash OrderHash string `protobuf:"bytes,7,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,8,opt,name=cid,proto3" json:"cid,omitempty"` + // the client ID + Cid string `protobuf:"bytes,8,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedDerivativeConditionalOrder) Reset() { *m = TrimmedDerivativeConditionalOrder{} } @@ -6470,11 +6525,14 @@ func (m *QueryFullDerivativeOrderbookResponse) GetAsks() []*TrimmedLimitOrder { } type TrimmedLimitOrder struct { + // the price of the order (in chain format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the quantity of the order (in chain format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the order hash + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } func (m *TrimmedLimitOrder) Reset() { *m = TrimmedLimitOrder{} } @@ -6525,6 +6583,7 @@ func (m *TrimmedLimitOrder) GetSubaccountId() string { } type QueryMarketAtomicExecutionFeeMultiplierRequest struct { + // the market ID MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } @@ -7146,6 +7205,7 @@ func (m *QueryDenomMinNotionalRequest) GetDenom() string { } type QueryDenomMinNotionalResponse struct { + // the minimum notional amount for the denom (in chain format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } diff --git a/chain/exchange/types/tx.pb.go b/chain/exchange/types/tx.pb.go index 97b884eb..a3f42454 100644 --- a/chain/exchange/types/tx.pb.go +++ b/chain/exchange/types/tx.pb.go @@ -324,11 +324,13 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgDeposit defines a SDK message for transferring coins from the sender's // bank balance into the subaccount's exchange deposits type MsgDeposit struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin - // will be deposited to the sender's default subaccount address. - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + // will be deposited to the sender's default subaccount address + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the amount of the deposit (in chain format) + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } @@ -404,10 +406,12 @@ var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo // MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's // deposits to the user's bank balance type MsgWithdraw struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // bytes32 subaccount ID to withdraw funds from - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + // the subaccount ID to withdraw funds from + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the amount of the withdrawal (in chain format) + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } @@ -483,8 +487,10 @@ var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo // MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit // order. type MsgCreateSpotLimitOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the spot order to create + Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateSpotLimitOrder) Reset() { *m = MsgCreateSpotLimitOrder{} } @@ -523,8 +529,10 @@ var xxx_messageInfo_MsgCreateSpotLimitOrder proto.InternalMessageInfo // MsgCreateSpotLimitOrderResponse defines the Msg/CreateSpotOrder response // type. type MsgCreateSpotLimitOrderResponse struct { + // the order hash OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCreateSpotLimitOrderResponse) Reset() { *m = MsgCreateSpotLimitOrderResponse{} } @@ -563,7 +571,9 @@ var xxx_messageInfo_MsgCreateSpotLimitOrderResponse proto.InternalMessageInfo // MsgBatchCreateSpotLimitOrders defines a SDK message for creating a new batch // of spot limit orders. type MsgBatchCreateSpotLimitOrders struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the spot orders details Orders []SpotOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders"` } @@ -603,9 +613,12 @@ var xxx_messageInfo_MsgBatchCreateSpotLimitOrders proto.InternalMessageInfo // MsgBatchCreateSpotLimitOrdersResponse defines the // Msg/BatchCreateSpotLimitOrders response type. type MsgBatchCreateSpotLimitOrdersResponse struct { - OrderHashes []string `protobuf:"bytes,1,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` + // the order hashes + OrderHashes []string `protobuf:"bytes,1,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` + // the client order IDs CreatedOrdersCids []string `protobuf:"bytes,2,rep,name=created_orders_cids,json=createdOrdersCids,proto3" json:"created_orders_cids,omitempty"` - FailedOrdersCids []string `protobuf:"bytes,3,rep,name=failed_orders_cids,json=failedOrdersCids,proto3" json:"failed_orders_cids,omitempty"` + // the failed client order IDs + FailedOrdersCids []string `protobuf:"bytes,3,rep,name=failed_orders_cids,json=failedOrdersCids,proto3" json:"failed_orders_cids,omitempty"` } func (m *MsgBatchCreateSpotLimitOrdersResponse) Reset() { *m = MsgBatchCreateSpotLimitOrdersResponse{} } @@ -644,10 +657,11 @@ var xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse proto.InternalMessageI // MsgInstantSpotMarketLaunch defines a SDK message for creating a new spot // market by paying listing fee without governance type MsgInstantSpotMarketLaunch struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // Ticker for the spot market. + // the ticker for the spot market Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` - // type of coin to use as the base currency + // the type of coin to use as the base currency BaseDenom string `protobuf:"bytes,3,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` // type of coin to use as the quote currency QuoteDenom string `protobuf:"bytes,4,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` @@ -739,12 +753,13 @@ var xxx_messageInfo_MsgInstantSpotMarketLaunchResponse proto.InternalMessageInfo // MsgInstantBinaryOptionsMarketLaunch defines a SDK message for creating a new // perpetual futures market by paying listing fee without governance type MsgInstantBinaryOptionsMarketLaunch struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // Ticker for the derivative contract. + // the ticker for the derivative contract Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` - // Oracle symbol + // the oracle symbol OracleSymbol string `protobuf:"bytes,3,opt,name=oracle_symbol,json=oracleSymbol,proto3" json:"oracle_symbol,omitempty"` - // Oracle Provider + // the oracle provider OracleProvider string `protobuf:"bytes,4,opt,name=oracle_provider,json=oracleProvider,proto3" json:"oracle_provider,omitempty"` // Oracle type OracleType types1.OracleType `protobuf:"varint,5,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` @@ -1456,19 +1471,29 @@ var xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse proto.InternalMess // MsgBatchUpdateOrders defines the Msg/BatchUpdateOrders response type. type MsgBatchUpdateOrders struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // subaccount_id only used for the spot_market_ids_to_cancel_all and - // derivative_market_ids_to_cancel_all. - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - SpotMarketIdsToCancelAll []string `protobuf:"bytes,3,rep,name=spot_market_ids_to_cancel_all,json=spotMarketIdsToCancelAll,proto3" json:"spot_market_ids_to_cancel_all,omitempty"` - DerivativeMarketIdsToCancelAll []string `protobuf:"bytes,4,rep,name=derivative_market_ids_to_cancel_all,json=derivativeMarketIdsToCancelAll,proto3" json:"derivative_market_ids_to_cancel_all,omitempty"` - SpotOrdersToCancel []*OrderData `protobuf:"bytes,5,rep,name=spot_orders_to_cancel,json=spotOrdersToCancel,proto3" json:"spot_orders_to_cancel,omitempty"` - DerivativeOrdersToCancel []*OrderData `protobuf:"bytes,6,rep,name=derivative_orders_to_cancel,json=derivativeOrdersToCancel,proto3" json:"derivative_orders_to_cancel,omitempty"` - SpotOrdersToCreate []*SpotOrder `protobuf:"bytes,7,rep,name=spot_orders_to_create,json=spotOrdersToCreate,proto3" json:"spot_orders_to_create,omitempty"` - DerivativeOrdersToCreate []*DerivativeOrder `protobuf:"bytes,8,rep,name=derivative_orders_to_create,json=derivativeOrdersToCreate,proto3" json:"derivative_orders_to_create,omitempty"` - BinaryOptionsOrdersToCancel []*OrderData `protobuf:"bytes,9,rep,name=binary_options_orders_to_cancel,json=binaryOptionsOrdersToCancel,proto3" json:"binary_options_orders_to_cancel,omitempty"` - BinaryOptionsMarketIdsToCancelAll []string `protobuf:"bytes,10,rep,name=binary_options_market_ids_to_cancel_all,json=binaryOptionsMarketIdsToCancelAll,proto3" json:"binary_options_market_ids_to_cancel_all,omitempty"` - BinaryOptionsOrdersToCreate []*DerivativeOrder `protobuf:"bytes,11,rep,name=binary_options_orders_to_create,json=binaryOptionsOrdersToCreate,proto3" json:"binary_options_orders_to_create,omitempty"` + // the subaccount ID only used for the spot_market_ids_to_cancel_all and + // derivative_market_ids_to_cancel_all + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the spot market IDs to cancel all + SpotMarketIdsToCancelAll []string `protobuf:"bytes,3,rep,name=spot_market_ids_to_cancel_all,json=spotMarketIdsToCancelAll,proto3" json:"spot_market_ids_to_cancel_all,omitempty"` + // the derivative market IDs to cancel all + DerivativeMarketIdsToCancelAll []string `protobuf:"bytes,4,rep,name=derivative_market_ids_to_cancel_all,json=derivativeMarketIdsToCancelAll,proto3" json:"derivative_market_ids_to_cancel_all,omitempty"` + // the spot orders to cancel + SpotOrdersToCancel []*OrderData `protobuf:"bytes,5,rep,name=spot_orders_to_cancel,json=spotOrdersToCancel,proto3" json:"spot_orders_to_cancel,omitempty"` + // the derivative orders to cancel + DerivativeOrdersToCancel []*OrderData `protobuf:"bytes,6,rep,name=derivative_orders_to_cancel,json=derivativeOrdersToCancel,proto3" json:"derivative_orders_to_cancel,omitempty"` + // the spot orders to create + SpotOrdersToCreate []*SpotOrder `protobuf:"bytes,7,rep,name=spot_orders_to_create,json=spotOrdersToCreate,proto3" json:"spot_orders_to_create,omitempty"` + // the derivative orders to create + DerivativeOrdersToCreate []*DerivativeOrder `protobuf:"bytes,8,rep,name=derivative_orders_to_create,json=derivativeOrdersToCreate,proto3" json:"derivative_orders_to_create,omitempty"` + // the binary options orders to cancel + BinaryOptionsOrdersToCancel []*OrderData `protobuf:"bytes,9,rep,name=binary_options_orders_to_cancel,json=binaryOptionsOrdersToCancel,proto3" json:"binary_options_orders_to_cancel,omitempty"` + // the binary options market IDs to cancel all + BinaryOptionsMarketIdsToCancelAll []string `protobuf:"bytes,10,rep,name=binary_options_market_ids_to_cancel_all,json=binaryOptionsMarketIdsToCancelAll,proto3" json:"binary_options_market_ids_to_cancel_all,omitempty"` + // the binary options orders to create + BinaryOptionsOrdersToCreate []*DerivativeOrder `protobuf:"bytes,11,rep,name=binary_options_orders_to_create,json=binaryOptionsOrdersToCreate,proto3" json:"binary_options_orders_to_create,omitempty"` } func (m *MsgBatchUpdateOrders) Reset() { *m = MsgBatchUpdateOrders{} } @@ -1762,12 +1787,18 @@ var xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse proto.InternalMess // MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. type MsgCancelDerivativeOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCancelDerivativeOrder) Reset() { *m = MsgCancelDerivativeOrder{} } @@ -1844,12 +1875,18 @@ var xxx_messageInfo_MsgCancelDerivativeOrderResponse proto.InternalMessageInfo // MsgCancelBinaryOptionsOrder defines the Msg/CancelBinaryOptionsOrder response // type. type MsgCancelBinaryOptionsOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask (bitwise combination of OrderMask enum values) + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCancelBinaryOptionsOrder) Reset() { *m = MsgCancelBinaryOptionsOrder{} } @@ -1924,11 +1961,16 @@ func (m *MsgCancelBinaryOptionsOrderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse proto.InternalMessageInfo type OrderData struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,4,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask (bitwise combination of OrderMask enum values) + OrderMask int32 `protobuf:"varint,4,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *OrderData) Reset() { *m = OrderData{} } @@ -2002,8 +2044,10 @@ func (m *OrderData) GetCid() string { // MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders // response type. type MsgBatchCancelDerivativeOrders struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Data []OrderData `protobuf:"bytes,2,rep,name=data,proto3" json:"data"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // orders details + Data []OrderData `protobuf:"bytes,2,rep,name=data,proto3" json:"data"` } func (m *MsgBatchCancelDerivativeOrders) Reset() { *m = MsgBatchCancelDerivativeOrders{} } @@ -2082,10 +2126,14 @@ var xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse proto.InternalMessage // A Cosmos-SDK MsgSubaccountTransfer type MsgSubaccountTransfer struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` - DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the source subaccount ID + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the destination subaccount ID + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + // the amount of the transfer + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` } func (m *MsgSubaccountTransfer) Reset() { *m = MsgSubaccountTransfer{} } @@ -2295,9 +2343,12 @@ var xxx_messageInfo_MsgExternalTransferResponse proto.InternalMessageInfo // A Cosmos-SDK MsgLiquidatePosition type MsgLiquidatePosition struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // optional order to provide for liquidation Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } @@ -2402,9 +2453,12 @@ var xxx_messageInfo_MsgLiquidatePositionResponse proto.InternalMessageInfo // A Cosmos-SDK MsgEmergencySettleMarket type MsgEmergencySettleMarket struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *MsgEmergencySettleMarket) Reset() { *m = MsgEmergencySettleMarket{} } @@ -2501,11 +2555,16 @@ var xxx_messageInfo_MsgEmergencySettleMarketResponse proto.InternalMessageInfo // A Cosmos-SDK MsgIncreasePositionMargin type MsgIncreasePositionMargin struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID sending the funds + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the subaccount ID the position belongs to DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // amount defines the amount of margin to add to the position + // the market ID + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to add to the position (in chain + // format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } @@ -2610,11 +2669,16 @@ var xxx_messageInfo_MsgIncreasePositionMarginResponse proto.InternalMessageInfo // A Cosmos-SDK MsgDecreasePositionMargin type MsgDecreasePositionMargin struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID sending the funds + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the subaccount ID the position belongs to DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // amount defines the amount of margin to withdraw from the position + // the market ID + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to withdraw from the position (in chain + // format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } diff --git a/chain/exchange/types/v2/authz.pb.go b/chain/exchange/types/v2/authz.pb.go index 33fb02fc..666e9970 100644 --- a/chain/exchange/types/v2/authz.pb.go +++ b/chain/exchange/types/v2/authz.pb.go @@ -29,8 +29,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // spot authz messages type CreateSpotLimitOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateSpotLimitOrderAuthz) Reset() { *m = CreateSpotLimitOrderAuthz{} } @@ -81,8 +83,10 @@ func (m *CreateSpotLimitOrderAuthz) GetMarketIds() []string { } type CreateSpotMarketOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateSpotMarketOrderAuthz) Reset() { *m = CreateSpotMarketOrderAuthz{} } @@ -133,8 +137,10 @@ func (m *CreateSpotMarketOrderAuthz) GetMarketIds() []string { } type BatchCreateSpotLimitOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCreateSpotLimitOrdersAuthz) Reset() { *m = BatchCreateSpotLimitOrdersAuthz{} } @@ -185,8 +191,10 @@ func (m *BatchCreateSpotLimitOrdersAuthz) GetMarketIds() []string { } type CancelSpotOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CancelSpotOrderAuthz) Reset() { *m = CancelSpotOrderAuthz{} } @@ -237,8 +245,10 @@ func (m *CancelSpotOrderAuthz) GetMarketIds() []string { } type BatchCancelSpotOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCancelSpotOrdersAuthz) Reset() { *m = BatchCancelSpotOrdersAuthz{} } @@ -290,8 +300,10 @@ func (m *BatchCancelSpotOrdersAuthz) GetMarketIds() []string { // derivative authz messages type CreateDerivativeLimitOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateDerivativeLimitOrderAuthz) Reset() { *m = CreateDerivativeLimitOrderAuthz{} } @@ -342,8 +354,10 @@ func (m *CreateDerivativeLimitOrderAuthz) GetMarketIds() []string { } type CreateDerivativeMarketOrderAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *CreateDerivativeMarketOrderAuthz) Reset() { *m = CreateDerivativeMarketOrderAuthz{} } @@ -394,8 +408,10 @@ func (m *CreateDerivativeMarketOrderAuthz) GetMarketIds() []string { } type BatchCreateDerivativeLimitOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCreateDerivativeLimitOrdersAuthz) Reset() { *m = BatchCreateDerivativeLimitOrdersAuthz{} } @@ -498,8 +514,10 @@ func (m *CancelDerivativeOrderAuthz) GetMarketIds() []string { } type BatchCancelDerivativeOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *BatchCancelDerivativeOrdersAuthz) Reset() { *m = BatchCancelDerivativeOrdersAuthz{} } @@ -551,8 +569,11 @@ func (m *BatchCancelDerivativeOrdersAuthz) GetMarketIds() []string { // common authz message used in both spot & derivative markets type BatchUpdateOrdersAuthz struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - SpotMarkets []string `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the spot market IDs + SpotMarkets []string `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + // the derivative market IDs DerivativeMarkets []string `protobuf:"bytes,3,rep,name=derivative_markets,json=derivativeMarkets,proto3" json:"derivative_markets,omitempty"` } diff --git a/chain/exchange/types/v2/exchange.pb.go b/chain/exchange/types/v2/exchange.pb.go index 9feca62d..b61c3e60 100644 --- a/chain/exchange/types/v2/exchange.pb.go +++ b/chain/exchange/types/v2/exchange.pb.go @@ -334,11 +334,11 @@ func (m *NextFundingTimestamp) GetNextTimestamp() int64 { } type MidPriceAndTOB struct { - // mid price of the market + // mid price of the market (in human readable format) MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` - // best buy price of the market + // best buy price of the market (in human readable format) BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` - // best sell price of the market + // best sell price of the market (in human readable format) BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` } @@ -377,8 +377,10 @@ var xxx_messageInfo_MidPriceAndTOB proto.InternalMessageInfo // A subaccount's deposit for a given base currency type Deposit struct { + // the available balance (in chain format) AvailableBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=available_balance,json=availableBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available_balance"` - TotalBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=total_balance,json=totalBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total_balance"` + // the total balance (in chain format) + TotalBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=total_balance,json=totalBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total_balance"` } func (m *Deposit) Reset() { *m = Deposit{} } @@ -567,10 +569,15 @@ func (m *SubaccountOrderData) GetOrderHash() []byte { } type Position struct { - IsLong bool `protobuf:"varint,1,opt,name=isLong,proto3" json:"isLong,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` - Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // True if the position is long. False if the position is short. + IsLong bool `protobuf:"varint,1,opt,name=isLong,proto3" json:"isLong,omitempty"` + // The quantity of the position (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // The entry price of the position (in human readable format) + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // The margin of the position (in human readable format) + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // The cumulative funding CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` } @@ -615,9 +622,12 @@ func (m *Position) GetIsLong() bool { } type Balance struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Deposits *Deposit `protobuf:"bytes,3,opt,name=deposits,proto3" json:"deposits,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the token deposits details + Deposits *Deposit `protobuf:"bytes,3,opt,name=deposits,proto3" json:"deposits,omitempty"` } func (m *Balance) Reset() { *m = Balance{} } @@ -654,9 +664,12 @@ func (m *Balance) XXX_DiscardUnknown() { var xxx_messageInfo_Balance proto.InternalMessageInfo type DerivativePosition struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the position details + Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` } func (m *DerivativePosition) Reset() { *m = DerivativePosition{} } @@ -1206,6 +1219,7 @@ func (m *TradingRewardCampaignBoostInfo) GetDerivativeMarketMultipliers() []Poin } type CampaignRewardPool struct { + // the campaign start timestamp in seconds StartTimestamp int64 `protobuf:"varint,1,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` // max_campaign_rewards are the maximum reward amounts to be disbursed at the // end of the campaign @@ -1332,10 +1346,14 @@ func (m *TradingRewardCampaignInfo) GetDisqualifiedMarketIds() []string { } type FeeDiscountTierInfo struct { + // the maker discount rate MakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_discount_rate,json=makerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_discount_rate"` + // the taker discount rate TakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_discount_rate,json=takerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_discount_rate"` - StakedAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"staked_amount"` - Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` + // the staked amount required to qualify for the discount (in chain format) + StakedAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"staked_amount"` + // the volume required to qualify for the discount (in human readable format) + Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` } func (m *FeeDiscountTierInfo) Reset() { *m = FeeDiscountTierInfo{} } @@ -1372,8 +1390,10 @@ func (m *FeeDiscountTierInfo) XXX_DiscardUnknown() { var xxx_messageInfo_FeeDiscountTierInfo proto.InternalMessageInfo type FeeDiscountSchedule struct { - BucketCount uint64 `protobuf:"varint,1,opt,name=bucket_count,json=bucketCount,proto3" json:"bucket_count,omitempty"` - BucketDuration int64 `protobuf:"varint,2,opt,name=bucket_duration,json=bucketDuration,proto3" json:"bucket_duration,omitempty"` + // the bucket number + BucketCount uint64 `protobuf:"varint,1,opt,name=bucket_count,json=bucketCount,proto3" json:"bucket_count,omitempty"` + // the bucket duration in seconds + BucketDuration int64 `protobuf:"varint,2,opt,name=bucket_duration,json=bucketDuration,proto3" json:"bucket_duration,omitempty"` // the trading fee quote denoms which will be counted for the fee paid // contribution QuoteDenoms []string `protobuf:"bytes,3,rep,name=quote_denoms,json=quoteDenoms,proto3" json:"quote_denoms,omitempty"` @@ -1453,8 +1473,10 @@ func (m *FeeDiscountSchedule) GetDisqualifiedMarketIds() []string { } type FeeDiscountTierTTL struct { - Tier uint64 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` - TtlTimestamp int64 `protobuf:"varint,2,opt,name=ttl_timestamp,json=ttlTimestamp,proto3" json:"ttl_timestamp,omitempty"` + // the tier number + Tier uint64 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + // the TTL timestamp in seconds + TtlTimestamp int64 `protobuf:"varint,2,opt,name=ttl_timestamp,json=ttlTimestamp,proto3" json:"ttl_timestamp,omitempty"` } func (m *FeeDiscountTierTTL) Reset() { *m = FeeDiscountTierTTL{} } @@ -1653,9 +1675,12 @@ func (m *SubaccountIDs) GetSubaccountIds() [][]byte { } type TradeRecord struct { - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the timestamp of the trade + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // the price of the trade (in human readable format) + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the quantity of the trade (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` } func (m *TradeRecord) Reset() { *m = TradeRecord{} } @@ -1699,9 +1724,9 @@ func (m *TradeRecord) GetTimestamp() int64 { } type Level struct { - // price + // price (in human readable format) P cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=p,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p"` - // quantity + // quantity (in human readable format) Q cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=q,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"q"` } @@ -1739,7 +1764,9 @@ func (m *Level) XXX_DiscardUnknown() { var xxx_messageInfo_Level proto.InternalMessageInfo type AggregateSubaccountVolumeRecord struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount volumes for each market MarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` } @@ -1791,7 +1818,9 @@ func (m *AggregateSubaccountVolumeRecord) GetMarketVolumes() []*MarketVolume { } type AggregateAccountVolumeRecord struct { - Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // account the volume belongs to + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // the aggregate volumes for each market MarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` } @@ -1843,7 +1872,9 @@ func (m *AggregateAccountVolumeRecord) GetMarketVolumes() []*MarketVolume { } type DenomDecimals struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the denom of the token + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the decimals of the token Decimals uint64 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` } @@ -1895,8 +1926,10 @@ func (m *DenomDecimals) GetDecimals() uint64 { } type GrantAuthorization struct { - Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + // the grantee address + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + // the amount of stake granted (INJ in chain format) + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` } func (m *GrantAuthorization) Reset() { *m = GrantAuthorization{} } @@ -2038,7 +2071,9 @@ func (m *EffectiveGrant) GetIsValid() bool { } type DenomMinNotional struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the denom of the token + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the minimum notional value for the token (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` } diff --git a/chain/exchange/types/v2/genesis.pb.go b/chain/exchange/types/v2/genesis.pb.go index ceab6e41..cd54048d 100644 --- a/chain/exchange/types/v2/genesis.pb.go +++ b/chain/exchange/types/v2/genesis.pb.go @@ -701,7 +701,9 @@ func (m *TradingRewardCampaignAccountPendingPoints) GetAccountPoints() []*Tradin } type SubaccountNonce struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount trade nonce SubaccountTradeNonce SubaccountTradeNonce `protobuf:"bytes,2,opt,name=subaccount_trade_nonce,json=subaccountTradeNonce,proto3" json:"subaccount_trade_nonce"` } diff --git a/chain/exchange/types/v2/market.pb.go b/chain/exchange/types/v2/market.pb.go index 32ff08d5..c7bd3cfa 100644 --- a/chain/exchange/types/v2/market.pb.go +++ b/chain/exchange/types/v2/market.pb.go @@ -118,13 +118,13 @@ type SpotMarket struct { // Status of the market Status MarketStatus `protobuf:"varint,8,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` // min_price_tick_size defines the minimum tick size that the price required - // for orders in the market + // for orders in the market (in human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // current market admin Admin string `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` @@ -264,14 +264,16 @@ type BinaryOptionsMarket struct { // Status of the market Status MarketStatus `protobuf:"varint,14,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` - SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` + // required for orders in the market (in human readable format) + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // settlement_price defines the settlement price of the binary options market + // (in human readable format) + SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // level of admin permissions AdminPermissions uint32 `protobuf:"varint,19,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` @@ -347,13 +349,13 @@ type DerivativeMarket struct { // Status of the market Status MarketStatus `protobuf:"varint,14,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // current market admin Admin string `protobuf:"bytes,18,opt,name=admin,proto3" json:"admin,omitempty"` @@ -446,8 +448,10 @@ func (m *DerivativeMarketSettlementInfo) GetMarketId() string { } type MarketVolume struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Volume VolumeRecord `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market volume + Volume VolumeRecord `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume"` } func (m *MarketVolume) Reset() { *m = MarketVolume{} } @@ -498,7 +502,9 @@ func (m *MarketVolume) GetVolume() VolumeRecord { } type VolumeRecord struct { + // the market's maker volume (in human readable format) MakerVolume cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_volume,json=makerVolume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_volume"` + // the market's taker volume (in human readable format) TakerVolume cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_volume,json=takerVolume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_volume"` } @@ -649,10 +655,10 @@ type ExpiryFuturesMarketInfo struct { // calculation window TwapStartTimestamp int64 `protobuf:"varint,3,opt,name=twap_start_timestamp,json=twapStartTimestamp,proto3" json:"twap_start_timestamp,omitempty"` // expiration_twap_start_price_cumulative defines the cumulative price for the - // start of the TWAP window + // start of the TWAP window (in human readable format) ExpirationTwapStartPriceCumulative cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=expiration_twap_start_price_cumulative,json=expirationTwapStartPriceCumulative,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expiration_twap_start_price_cumulative"` // settlement_price defines the settlement price for a time expiry futures - // market. + // market (in human readable format) SettlementPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price"` } @@ -784,9 +790,10 @@ type PerpetualMarketFunding struct { // cumulative_funding defines the cumulative funding of a perpetual market. CumulativeFunding cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=cumulative_funding,json=cumulativeFunding,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding"` // cumulative_price defines the cumulative price for the current hour up to - // the last timestamp + // the last timestamp (in human readable format) CumulativePrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=cumulative_price,json=cumulativePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_price"` - LastTimestamp int64 `protobuf:"varint,3,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` + // the last funding timestamp in seconds + LastTimestamp int64 `protobuf:"varint,3,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` } func (m *PerpetualMarketFunding) Reset() { *m = PerpetualMarketFunding{} } diff --git a/chain/exchange/types/v2/order.pb.go b/chain/exchange/types/v2/order.pb.go index c88ae1b7..d235e0ac 100644 --- a/chain/exchange/types/v2/order.pb.go +++ b/chain/exchange/types/v2/order.pb.go @@ -156,11 +156,12 @@ type OrderInfo struct { SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // address fee_recipient address that will receive fees for the order FeeRecipient string `protobuf:"bytes,2,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty"` - // price of the order + // price of the order (in human readable format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in human readable format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *OrderInfo) Reset() { *m = OrderInfo{} } @@ -224,7 +225,8 @@ type SpotOrder struct { OrderInfo OrderInfo `protobuf:"bytes,2,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` // order types OrderType OrderType `protobuf:"varint,3,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` - // trigger_price is the trigger price used by stop/take orders + // trigger_price is the trigger price used by stop/take orders (in human + // readable format) (optional) TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` // expiration block is the block number at which the order will expire ExpirationBlock int64 `protobuf:"varint,5,opt,name=expiration_block,json=expirationBlock,proto3" json:"expiration_block,omitempty"` @@ -441,9 +443,10 @@ type DerivativeOrder struct { OrderInfo OrderInfo `protobuf:"bytes,2,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` // order types OrderType OrderType `protobuf:"varint,3,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` - // margin is the margin used by the limit order + // margin is the margin used by the limit order (in human readable format) Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` - // trigger_price is the trigger price used by stop/take orders + // trigger_price is the trigger price used by stop/take orders (in human + // readable format) (optional) TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` // expiration block is the block number at which the order will expire ExpirationBlock int64 `protobuf:"varint,6,opt,name=expiration_block,json=expirationBlock,proto3" json:"expiration_block,omitempty"` diff --git a/chain/exchange/types/v2/orderbook.pb.go b/chain/exchange/types/v2/orderbook.pb.go index 5e4a02c1..5b13829c 100644 --- a/chain/exchange/types/v2/orderbook.pb.go +++ b/chain/exchange/types/v2/orderbook.pb.go @@ -147,16 +147,20 @@ func (m *ConditionalDerivativeOrderBook) XXX_DiscardUnknown() { var xxx_messageInfo_ConditionalDerivativeOrderBook proto.InternalMessageInfo type SubaccountOrderbookMetadata struct { - VanillaLimitOrderCount uint32 `protobuf:"varint,1,opt,name=vanilla_limit_order_count,json=vanillaLimitOrderCount,proto3" json:"vanilla_limit_order_count,omitempty"` + // The number of vanilla limit orders + VanillaLimitOrderCount uint32 `protobuf:"varint,1,opt,name=vanilla_limit_order_count,json=vanillaLimitOrderCount,proto3" json:"vanilla_limit_order_count,omitempty"` + // The number of reduce-only limit orders ReduceOnlyLimitOrderCount uint32 `protobuf:"varint,2,opt,name=reduce_only_limit_order_count,json=reduceOnlyLimitOrderCount,proto3" json:"reduce_only_limit_order_count,omitempty"` - // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the - // subaccount's reduce-only limit orders in the given direction. + // The aggregate quantity of the subaccount's reduce-only limit orders (in + // human readable format) AggregateReduceOnlyQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=aggregate_reduce_only_quantity,json=aggregateReduceOnlyQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_reduce_only_quantity"` - // AggregateVanillaQuantity is the aggregate fillable quantity of the - // subaccount's vanilla limit orders in the given direction. - AggregateVanillaQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=aggregate_vanilla_quantity,json=aggregateVanillaQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_vanilla_quantity"` - VanillaConditionalOrderCount uint32 `protobuf:"varint,5,opt,name=vanilla_conditional_order_count,json=vanillaConditionalOrderCount,proto3" json:"vanilla_conditional_order_count,omitempty"` - ReduceOnlyConditionalOrderCount uint32 `protobuf:"varint,6,opt,name=reduce_only_conditional_order_count,json=reduceOnlyConditionalOrderCount,proto3" json:"reduce_only_conditional_order_count,omitempty"` + // The aggregate quantity of the subaccount's vanilla limit orders (in human + // readable format) + AggregateVanillaQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=aggregate_vanilla_quantity,json=aggregateVanillaQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_vanilla_quantity"` + // The number of vanilla conditional orders + VanillaConditionalOrderCount uint32 `protobuf:"varint,5,opt,name=vanilla_conditional_order_count,json=vanillaConditionalOrderCount,proto3" json:"vanilla_conditional_order_count,omitempty"` + // The number of reduce-only conditional orders + ReduceOnlyConditionalOrderCount uint32 `protobuf:"varint,6,opt,name=reduce_only_conditional_order_count,json=reduceOnlyConditionalOrderCount,proto3" json:"reduce_only_conditional_order_count,omitempty"` } func (m *SubaccountOrderbookMetadata) Reset() { *m = SubaccountOrderbookMetadata{} } diff --git a/chain/exchange/types/v2/proposal.go b/chain/exchange/types/v2/proposal.go index 85a45a01..0bde0882 100644 --- a/chain/exchange/types/v2/proposal.go +++ b/chain/exchange/types/v2/proposal.go @@ -885,7 +885,7 @@ func (p *PerpetualMarketLaunchProposal) ValidateBasic() error { if p.MakerFeeRate.GT(p.TakerFeeRate) { return types.ErrFeeRatesRelation } - if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) { + if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) { return types.ErrMarginsRelation } if p.ReduceMarginRatio.LT(p.InitialMarginRatio) { @@ -988,7 +988,7 @@ func (p *ExpiryFuturesMarketLaunchProposal) ValidateBasic() error { if p.MakerFeeRate.GT(p.TakerFeeRate) { return types.ErrFeeRatesRelation } - if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) { + if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) { return types.ErrMarginsRelation } if p.ReduceMarginRatio.LT(p.InitialMarginRatio) { diff --git a/chain/exchange/types/v2/query.pb.go b/chain/exchange/types/v2/query.pb.go index c0f9f73d..b3e1a31f 100644 --- a/chain/exchange/types/v2/query.pb.go +++ b/chain/exchange/types/v2/query.pb.go @@ -93,7 +93,9 @@ func (CancellationStrategy) EnumDescriptor() ([]byte, []int) { } type Subaccount struct { - Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty"` + // the subaccount's trader address + Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty"` + // the subaccount's nonce number SubaccountNonce uint32 `protobuf:"varint,2,opt,name=subaccount_nonce,json=subaccountNonce,proto3" json:"subaccount_nonce,omitempty"` } @@ -145,8 +147,10 @@ func (m *Subaccount) GetSubaccountNonce() uint32 { } type QuerySubaccountOrdersRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountOrdersRequest) Reset() { *m = QuerySubaccountOrdersRequest{} } @@ -249,9 +253,12 @@ func (m *QuerySubaccountOrdersResponse) GetSellOrders() []*SubaccountOrderData { } type SubaccountOrderbookMetadataWithMarket struct { + // the subaccount orderbook details Metadata *SubaccountOrderbookMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,3,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // true if the orderbook is for a buy orders + IsBuy bool `protobuf:"varint,3,opt,name=isBuy,proto3" json:"isBuy,omitempty"` } func (m *SubaccountOrderbookMetadataWithMarket) Reset() { *m = SubaccountOrderbookMetadataWithMarket{} } @@ -395,8 +402,10 @@ func (m *QueryExchangeParamsResponse) GetParams() Params { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. type QuerySubaccountDepositsRequest struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Subaccount *Subaccount `protobuf:"bytes,2,opt,name=subaccount,proto3" json:"subaccount,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the subaccount details + Subaccount *Subaccount `protobuf:"bytes,2,opt,name=subaccount,proto3" json:"subaccount,omitempty"` } func (m *QuerySubaccountDepositsRequest) Reset() { *m = QuerySubaccountDepositsRequest{} } @@ -1154,8 +1163,10 @@ func (m *QueryAggregateMarketVolumesResponse) GetVolumes() []*MarketVolume { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. type QuerySubaccountDepositRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the token denom + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } func (m *QuerySubaccountDepositRequest) Reset() { *m = QuerySubaccountDepositRequest{} } @@ -1450,10 +1461,16 @@ func (m *QuerySpotMarketResponse) GetMarket() *SpotMarket { // method. type QuerySpotOrderbookRequest struct { // Market ID for the market - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - OrderSide OrderSide `protobuf:"varint,3,opt,name=order_side,json=orderSide,proto3,enum=injective.exchange.v2.OrderSide" json:"order_side,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the maximum number of orderbook entries to return per side (optional) + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + // the order side to return the orderbook entries for (optional) + OrderSide OrderSide `protobuf:"varint,3,opt,name=order_side,json=orderSide,proto3,enum=injective.exchange.v2.OrderSide" json:"order_side,omitempty"` + // limits the number of entries to return per side based on the cumulative + // notional (in human readable format) LimitCumulativeNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=limit_cumulative_notional,json=limitCumulativeNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_notional,omitempty"` + // limits the number of entries to return per side based on the cumulative + // quantity (in human readable format) LimitCumulativeQuantity *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=limit_cumulative_quantity,json=limitCumulativeQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_quantity,omitempty"` } @@ -1566,6 +1583,7 @@ func (m *QuerySpotOrderbookResponse) GetSellsPriceLevel() []*Level { } type FullSpotMarket struct { + // spot market details Market *SpotMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` // mid_price_and_tob defines the mid price for this market and the best ask // and bid orders @@ -2058,16 +2076,18 @@ func (m *QueryAccountAddressSpotOrdersRequest) GetAccountAddress() string { } type TrimmedSpotLimitOrder struct { - // price of the order + // price of the order (in human readable format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in human readable format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in human readable format) Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` // true if the order is a buy - IsBuy bool `protobuf:"varint,4,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + IsBuy bool `protobuf:"varint,4,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + // the order hash (optional) OrderHash string `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedSpotLimitOrder) Reset() { *m = TrimmedSpotLimitOrder{} } @@ -2266,9 +2286,9 @@ func (m *QuerySpotMidPriceAndTOBRequest) GetMarketId() string { // QuerySpotMidPriceAndTOBResponse is the response type for the // Query/SpotMidPriceAndTOB RPC method. type QuerySpotMidPriceAndTOBResponse struct { - // mid price of the market + // mid price of the market (in human readable format) MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` - // best buy price of the market + // best buy price of the market (in human readable format) BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` // best sell price of the market BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` @@ -2775,18 +2795,20 @@ func (m *QueryAccountAddressDerivativeOrdersRequest) GetAccountAddress() string } type TrimmedDerivativeLimitOrder struct { - // price of the order + // price of the order (in human readable format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in human readable format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // margin of the order + // margin of the order (in human readable format) Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in human readable format) Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` // true if the order is a buy - IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + // the order hash (optional) OrderHash string `protobuf:"bytes,6,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedDerivativeLimitOrder) Reset() { *m = TrimmedDerivativeLimitOrder{} } @@ -3208,11 +3230,15 @@ func (m *PerpetualMarketState) GetFundingInfo() *PerpetualMarketFunding { } type FullDerivativeMarket struct { + // derivative market details Market *DerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // perpetual market state or expiry futures market state + // // Types that are valid to be assigned to Info: // *FullDerivativeMarket_PerpetualInfo // *FullDerivativeMarket_FuturesInfo - Info isFullDerivativeMarket_Info `protobuf_oneof:"info"` + Info isFullDerivativeMarket_Info `protobuf_oneof:"info"` + // mark price (in human readable format) MarkPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=mark_price,json=markPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mark_price"` // mid_price_and_tob defines the mid price for this market and the best ask // and bid orders @@ -3556,6 +3582,7 @@ func (m *QueryDerivativeMarketAddressResponse) GetSubaccountId() string { // QuerySubaccountTradeNonceRequest is the request type for the // Query/SubaccountTradeNonce RPC method. type QuerySubaccountTradeNonceRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3694,6 +3721,7 @@ func (m *QueryPositionsInMarketResponse) GetState() []*DerivativePosition { // QuerySubaccountPositionsRequest is the request type for the // Query/SubaccountPositions RPC method. type QuerySubaccountPositionsRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3740,8 +3768,10 @@ func (m *QuerySubaccountPositionsRequest) GetSubaccountId() string { // QuerySubaccountPositionInMarketRequest is the request type for the // Query/SubaccountPositionInMarket RPC method. type QuerySubaccountPositionInMarketRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountPositionInMarketRequest) Reset() { @@ -3796,8 +3826,10 @@ func (m *QuerySubaccountPositionInMarketRequest) GetMarketId() string { // QuerySubaccountEffectivePositionInMarketRequest is the request type for the // Query/SubaccountEffectivePositionInMarket RPC method. type QuerySubaccountEffectivePositionInMarketRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QuerySubaccountEffectivePositionInMarketRequest) Reset() { @@ -3854,6 +3886,7 @@ func (m *QuerySubaccountEffectivePositionInMarketRequest) GetMarketId() string { // QuerySubaccountOrderMetadataRequest is the request type for the // Query/SubaccountOrderMetadata RPC method. type QuerySubaccountOrderMetadataRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } @@ -3992,9 +4025,13 @@ func (m *QuerySubaccountPositionInMarketResponse) GetState() *Position { } type EffectivePosition struct { - IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // whether the position is long or short + IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` + // the quantity of the position (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the entry price of the position (in human readable format) + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // the effective margin of the position (in human readable format) EffectiveMargin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=effective_margin,json=effectiveMargin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"effective_margin"` } @@ -5235,13 +5272,20 @@ func (m *QueryBalanceMismatchesRequest) GetDustFactor() int64 { } type BalanceMismatch struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` - Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` - BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the available balance + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + // the total balance + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + // the balance hold + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the expected total balance ExpectedTotal cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=expected_total,json=expectedTotal,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expected_total"` - Difference cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=difference,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"difference"` + // the difference between the total balance and the expected total balance + Difference cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=difference,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"difference"` } func (m *BalanceMismatch) Reset() { *m = BalanceMismatch{} } @@ -5376,11 +5420,16 @@ func (m *QueryBalanceWithBalanceHoldsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest proto.InternalMessageInfo type BalanceWithMarginHold struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` - Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` - BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + // the denom of the balance + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the available balance + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + // the total balance + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + // the balance on hold + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` } func (m *BalanceWithMarginHold) Reset() { *m = BalanceWithMarginHold{} } @@ -5655,10 +5704,14 @@ var xxx_messageInfo_MitoVaultInfosRequest proto.InternalMessageInfo // MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC // method. type MitoVaultInfosResponse struct { - MasterAddresses []string `protobuf:"bytes,1,rep,name=master_addresses,json=masterAddresses,proto3" json:"master_addresses,omitempty"` + // list of master addresses + MasterAddresses []string `protobuf:"bytes,1,rep,name=master_addresses,json=masterAddresses,proto3" json:"master_addresses,omitempty"` + // list of derivative addresses DerivativeAddresses []string `protobuf:"bytes,2,rep,name=derivative_addresses,json=derivativeAddresses,proto3" json:"derivative_addresses,omitempty"` - SpotAddresses []string `protobuf:"bytes,3,rep,name=spot_addresses,json=spotAddresses,proto3" json:"spot_addresses,omitempty"` - Cw20Addresses []string `protobuf:"bytes,4,rep,name=cw20_addresses,json=cw20Addresses,proto3" json:"cw20_addresses,omitempty"` + // list of spot addresses + SpotAddresses []string `protobuf:"bytes,3,rep,name=spot_addresses,json=spotAddresses,proto3" json:"spot_addresses,omitempty"` + // list of cw20 addresses + Cw20Addresses []string `protobuf:"bytes,4,rep,name=cw20_addresses,json=cw20Addresses,proto3" json:"cw20_addresses,omitempty"` } func (m *MitoVaultInfosResponse) Reset() { *m = MitoVaultInfosResponse{} } @@ -5983,7 +6036,9 @@ func (m *TradeHistoryOptions) GetIncludeMetadata() bool { // QueryMarketVolatilityRequest are the request params for the // Query/MarketVolatility RPC method. type QueryMarketVolatilityRequest struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID to query volatility for + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the trade history options TradeHistoryOptions *TradeHistoryOptions `protobuf:"bytes,2,opt,name=trade_history_options,json=tradeHistoryOptions,proto3" json:"trade_history_options,omitempty"` } @@ -6185,8 +6240,10 @@ func (m *QueryBinaryMarketsResponse) GetMarkets() []*BinaryOptionsMarket { // QueryConditionalOrdersRequest is the request type for the // Query/ConditionalOrders RPC method. type QueryTraderDerivativeConditionalOrdersRequest struct { + // the subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *QueryTraderDerivativeConditionalOrdersRequest) Reset() { @@ -6241,19 +6298,22 @@ func (m *QueryTraderDerivativeConditionalOrdersRequest) GetMarketId() string { } type TrimmedDerivativeConditionalOrder struct { - // price of the order + // price of the order (in human readable format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order + // quantity of the order (in human readable format) Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - // margin of the order + // margin of the order (in human readable format) Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` - // price to trigger the order + // price to trigger the order (in human readable format) TriggerPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"triggerPrice"` // true if the order is a buy - IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` - IsLimit bool `protobuf:"varint,6,opt,name=isLimit,proto3" json:"isLimit"` + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + // true if the order is a limit order + IsLimit bool `protobuf:"varint,6,opt,name=isLimit,proto3" json:"isLimit"` + // the order hash OrderHash string `protobuf:"bytes,7,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,8,opt,name=cid,proto3" json:"cid,omitempty"` + // the client ID + Cid string `protobuf:"bytes,8,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *TrimmedDerivativeConditionalOrder) Reset() { *m = TrimmedDerivativeConditionalOrder{} } @@ -6562,11 +6622,14 @@ func (m *QueryFullDerivativeOrderbookResponse) GetAsks() []*TrimmedLimitOrder { } type TrimmedLimitOrder struct { + // price of the order (in human readable format) Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // quantity of the order - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // quantity of the order (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the order hash + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` } func (m *TrimmedLimitOrder) Reset() { *m = TrimmedLimitOrder{} } @@ -7149,8 +7212,10 @@ func (m *QueryMarketBalancesResponse) GetBalances() []*MarketBalance { } type MarketBalance struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Balance cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the current balance of the market + Balance cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance"` } func (m *MarketBalance) Reset() { *m = MarketBalance{} } @@ -7238,6 +7303,7 @@ func (m *QueryDenomMinNotionalRequest) GetDenom() string { } type QueryDenomMinNotionalResponse struct { + // the minimum notional amount for the denom (in human readable format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } diff --git a/chain/exchange/types/v2/tx.pb.go b/chain/exchange/types/v2/tx.pb.go index a31f62c7..e66f8b46 100644 --- a/chain/exchange/types/v2/tx.pb.go +++ b/chain/exchange/types/v2/tx.pb.go @@ -43,11 +43,11 @@ type MsgUpdateSpotMarket struct { MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // (optional) updated ticker value NewTicker string `protobuf:"bytes,3,opt,name=new_ticker,json=newTicker,proto3" json:"new_ticker,omitempty"` - // (optional) updated min price tick size value + // (optional) updated min price tick size value (in human readable format) NewMinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=new_min_price_tick_size,json=newMinPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_price_tick_size"` - // (optional) updated min quantity tick size value + // (optional) updated min quantity tick size value (in human readable format) NewMinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=new_min_quantity_tick_size,json=newMinQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_quantity_tick_size"` - // (optional) updated min notional + // (optional) updated min notional (in human readable format) NewMinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=new_min_notional,json=newMinNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_notional"` } @@ -148,11 +148,11 @@ type MsgUpdateDerivativeMarket struct { MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // (optional) updated value for ticker NewTicker string `protobuf:"bytes,3,opt,name=new_ticker,json=newTicker,proto3" json:"new_ticker,omitempty"` - // (optional) updated value for min_price_tick_size + // (optional) updated value for min_price_tick_size (in human readable format) NewMinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=new_min_price_tick_size,json=newMinPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_price_tick_size"` - // (optional) updated value min_quantity_tick_size + // (optional) updated value min_quantity_tick_size (in human readable format) NewMinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=new_min_quantity_tick_size,json=newMinQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_quantity_tick_size"` - // (optional) updated min notional + // (optional) updated min notional (in human readable format) NewMinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=new_min_notional,json=newMinNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_notional"` // (optional) updated value for initial_margin_ratio NewInitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=new_initial_margin_ratio,json=newInitialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_initial_margin_ratio"` @@ -326,11 +326,13 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgDeposit defines a SDK message for transferring coins from the sender's // bank balance into the subaccount's exchange deposits type MsgDeposit struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin + // (Optional) the subaccount ID to deposit funds into. If empty, the coin // will be deposited to the sender's default subaccount address. - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the amount of the deposit (in chain format) + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } @@ -406,10 +408,12 @@ var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo // MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's // deposits to the user's bank balance type MsgWithdraw struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // bytes32 subaccount ID to withdraw funds from - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + // the subaccount ID to withdraw funds from + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the amount of the withdrawal (in chain format) + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } @@ -485,8 +489,10 @@ var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo // MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit // order. type MsgCreateSpotLimitOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateSpotLimitOrder) Reset() { *m = MsgCreateSpotLimitOrder{} } @@ -646,6 +652,7 @@ var xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse proto.InternalMessageI // MsgInstantSpotMarketLaunch defines a SDK message for creating a new spot // market by paying listing fee without governance type MsgInstantSpotMarketLaunch struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Ticker for the spot market. Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` @@ -653,13 +660,14 @@ type MsgInstantSpotMarketLaunch struct { BaseDenom string `protobuf:"bytes,3,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` // type of coin to use as the quote currency QuoteDenom string `protobuf:"bytes,4,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` - // min_price_tick_size defines the minimum tick size of the order's price + // min_price_tick_size defines the minimum tick size of the order's price (in + // human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the order's - // quantity + // quantity (in human readable format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // base token decimals BaseDecimals uint32 `protobuf:"varint,8,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` @@ -741,6 +749,7 @@ var xxx_messageInfo_MsgInstantSpotMarketLaunchResponse proto.InternalMessageInfo // MsgInstantPerpetualMarketLaunch defines a SDK message for creating a new // perpetual futures market by paying listing fee without governance type MsgInstantPerpetualMarketLaunch struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Ticker for the derivative market. Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` @@ -767,13 +776,13 @@ type MsgInstantPerpetualMarketLaunch struct { // perpetual market MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` // min_price_tick_size defines the minimum tick size of the order's price and - // margin + // margin (in human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the order's - // quantity + // quantity (in human readable format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // reduce_margin_ratio defines the ratio of the margin that is reduced ReduceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=reduce_margin_ratio,json=reduceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reduce_margin_ratio"` @@ -881,13 +890,13 @@ type MsgInstantBinaryOptionsMarketLaunch struct { // Address of the quote currency denomination for the binary options contract QuoteDenom string `protobuf:"bytes,12,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` } @@ -1087,8 +1096,10 @@ var xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunchResponse proto.InternalMe // MsgCreateSpotMarketOrder defines a SDK message for creating a new spot market // order. type MsgCreateSpotMarketOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateSpotMarketOrder) Reset() { *m = MsgCreateSpotMarketOrder{} } @@ -1206,8 +1217,10 @@ var xxx_messageInfo_SpotMarketOrderResults proto.InternalMessageInfo // A Cosmos-SDK MsgCreateDerivativeLimitOrder type MsgCreateDerivativeLimitOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateDerivativeLimitOrder) Reset() { *m = MsgCreateDerivativeLimitOrder{} } @@ -1285,8 +1298,10 @@ var xxx_messageInfo_MsgCreateDerivativeLimitOrderResponse proto.InternalMessageI // A Cosmos-SDK MsgCreateBinaryOptionsLimitOrder type MsgCreateBinaryOptionsLimitOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateBinaryOptionsLimitOrder) Reset() { *m = MsgCreateBinaryOptionsLimitOrder{} } @@ -1366,7 +1381,9 @@ var xxx_messageInfo_MsgCreateBinaryOptionsLimitOrderResponse proto.InternalMessa // A Cosmos-SDK MsgBatchCreateDerivativeLimitOrders type MsgBatchCreateDerivativeLimitOrders struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the orders to create Orders []DerivativeOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders"` } @@ -1450,11 +1467,16 @@ var xxx_messageInfo_MsgBatchCreateDerivativeLimitOrdersResponse proto.InternalMe // MsgCancelSpotOrder defines the Msg/CancelSpotOrder response type. type MsgCancelSpotOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash (optional) + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCancelSpotOrder) Reset() { *m = MsgCancelSpotOrder{} } @@ -1690,19 +1712,29 @@ var xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse proto.InternalMess // MsgBatchUpdateOrders defines the Msg/BatchUpdateOrders response type. type MsgBatchUpdateOrders struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // subaccount_id only used for the spot_market_ids_to_cancel_all and - // derivative_market_ids_to_cancel_all. - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - SpotMarketIdsToCancelAll []string `protobuf:"bytes,3,rep,name=spot_market_ids_to_cancel_all,json=spotMarketIdsToCancelAll,proto3" json:"spot_market_ids_to_cancel_all,omitempty"` - DerivativeMarketIdsToCancelAll []string `protobuf:"bytes,4,rep,name=derivative_market_ids_to_cancel_all,json=derivativeMarketIdsToCancelAll,proto3" json:"derivative_market_ids_to_cancel_all,omitempty"` - SpotOrdersToCancel []*OrderData `protobuf:"bytes,5,rep,name=spot_orders_to_cancel,json=spotOrdersToCancel,proto3" json:"spot_orders_to_cancel,omitempty"` - DerivativeOrdersToCancel []*OrderData `protobuf:"bytes,6,rep,name=derivative_orders_to_cancel,json=derivativeOrdersToCancel,proto3" json:"derivative_orders_to_cancel,omitempty"` - SpotOrdersToCreate []*SpotOrder `protobuf:"bytes,7,rep,name=spot_orders_to_create,json=spotOrdersToCreate,proto3" json:"spot_orders_to_create,omitempty"` - DerivativeOrdersToCreate []*DerivativeOrder `protobuf:"bytes,8,rep,name=derivative_orders_to_create,json=derivativeOrdersToCreate,proto3" json:"derivative_orders_to_create,omitempty"` - BinaryOptionsOrdersToCancel []*OrderData `protobuf:"bytes,9,rep,name=binary_options_orders_to_cancel,json=binaryOptionsOrdersToCancel,proto3" json:"binary_options_orders_to_cancel,omitempty"` - BinaryOptionsMarketIdsToCancelAll []string `protobuf:"bytes,10,rep,name=binary_options_market_ids_to_cancel_all,json=binaryOptionsMarketIdsToCancelAll,proto3" json:"binary_options_market_ids_to_cancel_all,omitempty"` - BinaryOptionsOrdersToCreate []*DerivativeOrder `protobuf:"bytes,11,rep,name=binary_options_orders_to_create,json=binaryOptionsOrdersToCreate,proto3" json:"binary_options_orders_to_create,omitempty"` + // derivative_market_ids_to_cancel_all (optional) + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the market IDs to cancel all spot orders for (optional) + SpotMarketIdsToCancelAll []string `protobuf:"bytes,3,rep,name=spot_market_ids_to_cancel_all,json=spotMarketIdsToCancelAll,proto3" json:"spot_market_ids_to_cancel_all,omitempty"` + // the market IDs to cancel all derivative orders for (optional) + DerivativeMarketIdsToCancelAll []string `protobuf:"bytes,4,rep,name=derivative_market_ids_to_cancel_all,json=derivativeMarketIdsToCancelAll,proto3" json:"derivative_market_ids_to_cancel_all,omitempty"` + // the spot orders to cancel + SpotOrdersToCancel []*OrderData `protobuf:"bytes,5,rep,name=spot_orders_to_cancel,json=spotOrdersToCancel,proto3" json:"spot_orders_to_cancel,omitempty"` + // the derivative orders to cancel + DerivativeOrdersToCancel []*OrderData `protobuf:"bytes,6,rep,name=derivative_orders_to_cancel,json=derivativeOrdersToCancel,proto3" json:"derivative_orders_to_cancel,omitempty"` + // the spot orders to create + SpotOrdersToCreate []*SpotOrder `protobuf:"bytes,7,rep,name=spot_orders_to_create,json=spotOrdersToCreate,proto3" json:"spot_orders_to_create,omitempty"` + // the derivative orders to create + DerivativeOrdersToCreate []*DerivativeOrder `protobuf:"bytes,8,rep,name=derivative_orders_to_create,json=derivativeOrdersToCreate,proto3" json:"derivative_orders_to_create,omitempty"` + // the binary options orders to cancel + BinaryOptionsOrdersToCancel []*OrderData `protobuf:"bytes,9,rep,name=binary_options_orders_to_cancel,json=binaryOptionsOrdersToCancel,proto3" json:"binary_options_orders_to_cancel,omitempty"` + // the market IDs to cancel all binary options orders for (optional) + BinaryOptionsMarketIdsToCancelAll []string `protobuf:"bytes,10,rep,name=binary_options_market_ids_to_cancel_all,json=binaryOptionsMarketIdsToCancelAll,proto3" json:"binary_options_market_ids_to_cancel_all,omitempty"` + // the binary options orders to create + BinaryOptionsOrdersToCreate []*DerivativeOrder `protobuf:"bytes,11,rep,name=binary_options_orders_to_create,json=binaryOptionsOrdersToCreate,proto3" json:"binary_options_orders_to_create,omitempty"` } func (m *MsgBatchUpdateOrders) Reset() { *m = MsgBatchUpdateOrders{} } @@ -1789,8 +1821,10 @@ var xxx_messageInfo_MsgBatchUpdateOrdersResponse proto.InternalMessageInfo // A Cosmos-SDK MsgCreateDerivativeMarketOrder type MsgCreateDerivativeMarketOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateDerivativeMarketOrder) Reset() { *m = MsgCreateDerivativeMarketOrder{} } @@ -1912,8 +1946,10 @@ var xxx_messageInfo_DerivativeMarketOrderResults proto.InternalMessageInfo // A Cosmos-SDK MsgCreateBinaryOptionsMarketOrder type MsgCreateBinaryOptionsMarketOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the order details + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *MsgCreateBinaryOptionsMarketOrder) Reset() { *m = MsgCreateBinaryOptionsMarketOrder{} } @@ -1996,12 +2032,18 @@ var xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse proto.InternalMess // MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. type MsgCancelDerivativeOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash (optional) + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask (bitwise combination of OrderMask enum values) (optional) + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCancelDerivativeOrder) Reset() { *m = MsgCancelDerivativeOrder{} } @@ -2078,12 +2120,18 @@ var xxx_messageInfo_MsgCancelDerivativeOrderResponse proto.InternalMessageInfo // MsgCancelBinaryOptionsOrder defines the Msg/CancelBinaryOptionsOrder response // type. type MsgCancelBinaryOptionsOrder struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash (optional) + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask (bitwise combination of OrderMask enum values) (optional) + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID (optional) + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *MsgCancelBinaryOptionsOrder) Reset() { *m = MsgCancelBinaryOptionsOrder{} } @@ -2158,11 +2206,18 @@ func (m *MsgCancelBinaryOptionsOrderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse proto.InternalMessageInfo type OrderData struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - OrderMask int32 `protobuf:"varint,4,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` - Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` + // the order hash (optional - either the order_hash or the cid should be + // provided) + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the order mask (bitwise combination of OrderMask enum values) + OrderMask int32 `protobuf:"varint,4,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + // the client order ID (optional - either the order_hash or the cid should be + // provided) + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` } func (m *OrderData) Reset() { *m = OrderData{} } @@ -2316,10 +2371,14 @@ var xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse proto.InternalMessage // A Cosmos-SDK MsgSubaccountTransfer type MsgSubaccountTransfer struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` - DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the source subaccount ID + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the destination subaccount ID + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + // the amount to transfer (in chain format) + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` } func (m *MsgSubaccountTransfer) Reset() { *m = MsgSubaccountTransfer{} } @@ -2423,10 +2482,14 @@ var xxx_messageInfo_MsgSubaccountTransferResponse proto.InternalMessageInfo // A Cosmos-SDK MsgExternalTransfer type MsgExternalTransfer struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` - DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the source subaccount ID + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the destination subaccount ID + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + // the amount to transfer (in chain format) + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` } func (m *MsgExternalTransfer) Reset() { *m = MsgExternalTransfer{} } @@ -2529,9 +2592,12 @@ var xxx_messageInfo_MsgExternalTransferResponse proto.InternalMessageInfo // A Cosmos-SDK MsgLiquidatePosition type MsgLiquidatePosition struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID the position belongs to SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the position's market ID + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // optional order to provide for liquidation Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } @@ -2636,9 +2702,12 @@ var xxx_messageInfo_MsgLiquidatePositionResponse proto.InternalMessageInfo // A Cosmos-SDK MsgEmergencySettleMarket type MsgEmergencySettleMarket struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } func (m *MsgEmergencySettleMarket) Reset() { *m = MsgEmergencySettleMarket{} } @@ -2735,11 +2804,16 @@ var xxx_messageInfo_MsgEmergencySettleMarketResponse proto.InternalMessageInfo // A Cosmos-SDK MsgIncreasePositionMargin type MsgIncreasePositionMargin struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID sending the funds + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the subaccount ID the position belongs to DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // amount defines the amount of margin to add to the position + // the market ID + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to add to the position (in human + // readable format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } @@ -2844,11 +2918,16 @@ var xxx_messageInfo_MsgIncreasePositionMarginResponse proto.InternalMessageInfo // A Cosmos-SDK MsgDecreasePositionMargin type MsgDecreasePositionMargin struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // the subaccount ID the position belongs to + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + // the destination subaccount ID DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` - MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // amount defines the amount of margin to withdraw from the position + // the market ID + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to withdraw from the position (in human + // readable format) Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } @@ -3036,6 +3115,7 @@ var xxx_messageInfo_MsgPrivilegedExecuteContractResponse proto.InternalMessageIn // A Cosmos-SDK MsgRewardsOptOut type MsgRewardsOptOut struct { + // the sender's Injective address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` } @@ -3320,7 +3400,9 @@ func (m *MsgSignDoc) GetValue() MsgSignData { // MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the // market type MsgAdminUpdateBinaryOptionsMarket struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The sender's Injective address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The market ID MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // new price at which market will be settled SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` @@ -3444,7 +3526,9 @@ var xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarketResponse proto.InternalMess // MsgAuthorizeStakeGrants grants stakes to grantees. type MsgAuthorizeStakeGrants struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Injective address of the stake granter + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // list of stake grants to authorize (mandatory) Grants []*GrantAuthorization `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"` } @@ -3533,7 +3617,9 @@ var xxx_messageInfo_MsgAuthorizeStakeGrantsResponse proto.InternalMessageInfo // MsgActivateStakeGrant allows a grantee to activate a stake grant. type MsgActivateStakeGrant struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Injective address of the stake grantee + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Injective address of the stake granter Granter string `protobuf:"bytes,2,opt,name=granter,proto3" json:"granter,omitempty"` } diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index 73d96e9e..45109a42 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -64,16 +64,26 @@ func (OrderUpdateStatus) EnumDescriptor() ([]byte, []int) { } type StreamRequest struct { - BankBalancesFilter *BankBalancesFilter `protobuf:"bytes,1,opt,name=bank_balances_filter,json=bankBalancesFilter,proto3" json:"bank_balances_filter,omitempty"` - SubaccountDepositsFilter *SubaccountDepositsFilter `protobuf:"bytes,2,opt,name=subaccount_deposits_filter,json=subaccountDepositsFilter,proto3" json:"subaccount_deposits_filter,omitempty"` - SpotTradesFilter *TradesFilter `protobuf:"bytes,3,opt,name=spot_trades_filter,json=spotTradesFilter,proto3" json:"spot_trades_filter,omitempty"` - DerivativeTradesFilter *TradesFilter `protobuf:"bytes,4,opt,name=derivative_trades_filter,json=derivativeTradesFilter,proto3" json:"derivative_trades_filter,omitempty"` - SpotOrdersFilter *OrdersFilter `protobuf:"bytes,5,opt,name=spot_orders_filter,json=spotOrdersFilter,proto3" json:"spot_orders_filter,omitempty"` - DerivativeOrdersFilter *OrdersFilter `protobuf:"bytes,6,opt,name=derivative_orders_filter,json=derivativeOrdersFilter,proto3" json:"derivative_orders_filter,omitempty"` - SpotOrderbooksFilter *OrderbookFilter `protobuf:"bytes,7,opt,name=spot_orderbooks_filter,json=spotOrderbooksFilter,proto3" json:"spot_orderbooks_filter,omitempty"` - DerivativeOrderbooksFilter *OrderbookFilter `protobuf:"bytes,8,opt,name=derivative_orderbooks_filter,json=derivativeOrderbooksFilter,proto3" json:"derivative_orderbooks_filter,omitempty"` - PositionsFilter *PositionsFilter `protobuf:"bytes,9,opt,name=positions_filter,json=positionsFilter,proto3" json:"positions_filter,omitempty"` - OraclePriceFilter *OraclePriceFilter `protobuf:"bytes,10,opt,name=oracle_price_filter,json=oraclePriceFilter,proto3" json:"oracle_price_filter,omitempty"` + // filter for bank balances events + BankBalancesFilter *BankBalancesFilter `protobuf:"bytes,1,opt,name=bank_balances_filter,json=bankBalancesFilter,proto3" json:"bank_balances_filter,omitempty"` + // filter for subaccount deposits events + SubaccountDepositsFilter *SubaccountDepositsFilter `protobuf:"bytes,2,opt,name=subaccount_deposits_filter,json=subaccountDepositsFilter,proto3" json:"subaccount_deposits_filter,omitempty"` + // filter for spot trades events + SpotTradesFilter *TradesFilter `protobuf:"bytes,3,opt,name=spot_trades_filter,json=spotTradesFilter,proto3" json:"spot_trades_filter,omitempty"` + // filter for derivative trades events + DerivativeTradesFilter *TradesFilter `protobuf:"bytes,4,opt,name=derivative_trades_filter,json=derivativeTradesFilter,proto3" json:"derivative_trades_filter,omitempty"` + // filter for spot orders events + SpotOrdersFilter *OrdersFilter `protobuf:"bytes,5,opt,name=spot_orders_filter,json=spotOrdersFilter,proto3" json:"spot_orders_filter,omitempty"` + // filter for derivative orders events + DerivativeOrdersFilter *OrdersFilter `protobuf:"bytes,6,opt,name=derivative_orders_filter,json=derivativeOrdersFilter,proto3" json:"derivative_orders_filter,omitempty"` + // filter for spot orderbooks events + SpotOrderbooksFilter *OrderbookFilter `protobuf:"bytes,7,opt,name=spot_orderbooks_filter,json=spotOrderbooksFilter,proto3" json:"spot_orderbooks_filter,omitempty"` + // filter for derivative orderbooks events + DerivativeOrderbooksFilter *OrderbookFilter `protobuf:"bytes,8,opt,name=derivative_orderbooks_filter,json=derivativeOrderbooksFilter,proto3" json:"derivative_orderbooks_filter,omitempty"` + // filter for positions events + PositionsFilter *PositionsFilter `protobuf:"bytes,9,opt,name=positions_filter,json=positionsFilter,proto3" json:"positions_filter,omitempty"` + // filter for oracle prices events + OraclePriceFilter *OraclePriceFilter `protobuf:"bytes,10,opt,name=oracle_price_filter,json=oraclePriceFilter,proto3" json:"oracle_price_filter,omitempty"` } func (m *StreamRequest) Reset() { *m = StreamRequest{} } @@ -476,8 +486,10 @@ func (m *BankBalance) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { } type SubaccountDeposits struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Deposits []SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the deposits details + Deposits []SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits"` } func (m *SubaccountDeposits) Reset() { *m = SubaccountDeposits{} } @@ -768,9 +780,12 @@ func (m *DerivativeOrderUpdate) GetOrder() *DerivativeOrder { } type DerivativeOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order types.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` - IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the derivative order details + Order types.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // whether the order is a market order + IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` } func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } @@ -828,12 +843,19 @@ func (m *DerivativeOrder) GetIsMarket() bool { } type Position struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - IsLong bool `protobuf:"varint,3,opt,name=isLong,proto3" json:"isLong,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` - Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // whether the position is long or short + IsLong bool `protobuf:"varint,3,opt,name=isLong,proto3" json:"isLong,omitempty"` + // the quantity of the position + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the entry price of the position + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // the margin of the position + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the cumulative funding entry of the position CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` } @@ -945,18 +967,28 @@ func (m *OraclePrice) GetType() string { } type SpotTrade struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` - ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // bytes32 subaccount ID that executed the trade - SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` - OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` - Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` - TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // whether the trade is a buy or sell + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + // the execution type + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + // the quantity of the trade + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the price of the trade + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the subaccount ID that executed the trade + SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the fee of the trade + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + // the order hash + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the fee recipient address + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + // the trade ID + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` } func (m *SpotTrade) Reset() { *m = SpotTrade{} } @@ -1049,17 +1081,28 @@ func (m *SpotTrade) GetTradeId() string { } type DerivativeTrade struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` - ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` - SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - PositionDelta *types.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` - Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` - Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` - OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` - Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` - TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // whether the trade is a buy or sell + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + // the execution type + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the position delta of the trade + PositionDelta *types.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + // the payout of the trade + Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` + // the fee of the trade + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + // the order hash + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the fee recipient address + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + // the trade ID + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` } func (m *DerivativeTrade) Reset() { *m = DerivativeTrade{} } diff --git a/chain/stream/types/v2/query.pb.go b/chain/stream/types/v2/query.pb.go index c357ec72..0a1b7062 100644 --- a/chain/stream/types/v2/query.pb.go +++ b/chain/stream/types/v2/query.pb.go @@ -64,16 +64,26 @@ func (OrderUpdateStatus) EnumDescriptor() ([]byte, []int) { } type StreamRequest struct { - BankBalancesFilter *BankBalancesFilter `protobuf:"bytes,1,opt,name=bank_balances_filter,json=bankBalancesFilter,proto3" json:"bank_balances_filter,omitempty"` - SubaccountDepositsFilter *SubaccountDepositsFilter `protobuf:"bytes,2,opt,name=subaccount_deposits_filter,json=subaccountDepositsFilter,proto3" json:"subaccount_deposits_filter,omitempty"` - SpotTradesFilter *TradesFilter `protobuf:"bytes,3,opt,name=spot_trades_filter,json=spotTradesFilter,proto3" json:"spot_trades_filter,omitempty"` - DerivativeTradesFilter *TradesFilter `protobuf:"bytes,4,opt,name=derivative_trades_filter,json=derivativeTradesFilter,proto3" json:"derivative_trades_filter,omitempty"` - SpotOrdersFilter *OrdersFilter `protobuf:"bytes,5,opt,name=spot_orders_filter,json=spotOrdersFilter,proto3" json:"spot_orders_filter,omitempty"` - DerivativeOrdersFilter *OrdersFilter `protobuf:"bytes,6,opt,name=derivative_orders_filter,json=derivativeOrdersFilter,proto3" json:"derivative_orders_filter,omitempty"` - SpotOrderbooksFilter *OrderbookFilter `protobuf:"bytes,7,opt,name=spot_orderbooks_filter,json=spotOrderbooksFilter,proto3" json:"spot_orderbooks_filter,omitempty"` - DerivativeOrderbooksFilter *OrderbookFilter `protobuf:"bytes,8,opt,name=derivative_orderbooks_filter,json=derivativeOrderbooksFilter,proto3" json:"derivative_orderbooks_filter,omitempty"` - PositionsFilter *PositionsFilter `protobuf:"bytes,9,opt,name=positions_filter,json=positionsFilter,proto3" json:"positions_filter,omitempty"` - OraclePriceFilter *OraclePriceFilter `protobuf:"bytes,10,opt,name=oracle_price_filter,json=oraclePriceFilter,proto3" json:"oracle_price_filter,omitempty"` + // filter for bank balances events + BankBalancesFilter *BankBalancesFilter `protobuf:"bytes,1,opt,name=bank_balances_filter,json=bankBalancesFilter,proto3" json:"bank_balances_filter,omitempty"` + // filter for subaccount deposits events + SubaccountDepositsFilter *SubaccountDepositsFilter `protobuf:"bytes,2,opt,name=subaccount_deposits_filter,json=subaccountDepositsFilter,proto3" json:"subaccount_deposits_filter,omitempty"` + // filter for spot trades events + SpotTradesFilter *TradesFilter `protobuf:"bytes,3,opt,name=spot_trades_filter,json=spotTradesFilter,proto3" json:"spot_trades_filter,omitempty"` + // filter for derivative trades events + DerivativeTradesFilter *TradesFilter `protobuf:"bytes,4,opt,name=derivative_trades_filter,json=derivativeTradesFilter,proto3" json:"derivative_trades_filter,omitempty"` + // filter for spot orders events + SpotOrdersFilter *OrdersFilter `protobuf:"bytes,5,opt,name=spot_orders_filter,json=spotOrdersFilter,proto3" json:"spot_orders_filter,omitempty"` + // filter for derivative orders events + DerivativeOrdersFilter *OrdersFilter `protobuf:"bytes,6,opt,name=derivative_orders_filter,json=derivativeOrdersFilter,proto3" json:"derivative_orders_filter,omitempty"` + // filter for spot orderbooks events + SpotOrderbooksFilter *OrderbookFilter `protobuf:"bytes,7,opt,name=spot_orderbooks_filter,json=spotOrderbooksFilter,proto3" json:"spot_orderbooks_filter,omitempty"` + // filter for derivative orderbooks events + DerivativeOrderbooksFilter *OrderbookFilter `protobuf:"bytes,8,opt,name=derivative_orderbooks_filter,json=derivativeOrderbooksFilter,proto3" json:"derivative_orderbooks_filter,omitempty"` + // filter for positions events + PositionsFilter *PositionsFilter `protobuf:"bytes,9,opt,name=positions_filter,json=positionsFilter,proto3" json:"positions_filter,omitempty"` + // filter for oracle prices events + OraclePriceFilter *OraclePriceFilter `protobuf:"bytes,10,opt,name=oracle_price_filter,json=oraclePriceFilter,proto3" json:"oracle_price_filter,omitempty"` } func (m *StreamRequest) Reset() { *m = StreamRequest{} } @@ -180,19 +190,32 @@ func (m *StreamRequest) GetOraclePriceFilter() *OraclePriceFilter { } type StreamResponse struct { - BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - BankBalances []*BankBalance `protobuf:"bytes,3,rep,name=bank_balances,json=bankBalances,proto3" json:"bank_balances,omitempty"` - SubaccountDeposits []*SubaccountDeposits `protobuf:"bytes,4,rep,name=subaccount_deposits,json=subaccountDeposits,proto3" json:"subaccount_deposits,omitempty"` - SpotTrades []*SpotTrade `protobuf:"bytes,5,rep,name=spot_trades,json=spotTrades,proto3" json:"spot_trades,omitempty"` - DerivativeTrades []*DerivativeTrade `protobuf:"bytes,6,rep,name=derivative_trades,json=derivativeTrades,proto3" json:"derivative_trades,omitempty"` - SpotOrders []*SpotOrderUpdate `protobuf:"bytes,7,rep,name=spot_orders,json=spotOrders,proto3" json:"spot_orders,omitempty"` - DerivativeOrders []*DerivativeOrderUpdate `protobuf:"bytes,8,rep,name=derivative_orders,json=derivativeOrders,proto3" json:"derivative_orders,omitempty"` - SpotOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,9,rep,name=spot_orderbook_updates,json=spotOrderbookUpdates,proto3" json:"spot_orderbook_updates,omitempty"` - DerivativeOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,10,rep,name=derivative_orderbook_updates,json=derivativeOrderbookUpdates,proto3" json:"derivative_orderbook_updates,omitempty"` - Positions []*Position `protobuf:"bytes,11,rep,name=positions,proto3" json:"positions,omitempty"` - OraclePrices []*OraclePrice `protobuf:"bytes,12,rep,name=oracle_prices,json=oraclePrices,proto3" json:"oracle_prices,omitempty"` - GasPrice string `protobuf:"bytes,13,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // the block height + BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + // the block time + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + // list of bank balances updates + BankBalances []*BankBalance `protobuf:"bytes,3,rep,name=bank_balances,json=bankBalances,proto3" json:"bank_balances,omitempty"` + // list of subaccount deposits updates + SubaccountDeposits []*SubaccountDeposits `protobuf:"bytes,4,rep,name=subaccount_deposits,json=subaccountDeposits,proto3" json:"subaccount_deposits,omitempty"` + // list of spot trades updates + SpotTrades []*SpotTrade `protobuf:"bytes,5,rep,name=spot_trades,json=spotTrades,proto3" json:"spot_trades,omitempty"` + // list of derivative trades updates + DerivativeTrades []*DerivativeTrade `protobuf:"bytes,6,rep,name=derivative_trades,json=derivativeTrades,proto3" json:"derivative_trades,omitempty"` + // list of spot orders updates + SpotOrders []*SpotOrderUpdate `protobuf:"bytes,7,rep,name=spot_orders,json=spotOrders,proto3" json:"spot_orders,omitempty"` + // list of derivative orders updates + DerivativeOrders []*DerivativeOrderUpdate `protobuf:"bytes,8,rep,name=derivative_orders,json=derivativeOrders,proto3" json:"derivative_orders,omitempty"` + // list of spot orderbook updates + SpotOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,9,rep,name=spot_orderbook_updates,json=spotOrderbookUpdates,proto3" json:"spot_orderbook_updates,omitempty"` + // list of derivative orderbook updates + DerivativeOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,10,rep,name=derivative_orderbook_updates,json=derivativeOrderbookUpdates,proto3" json:"derivative_orderbook_updates,omitempty"` + // list of positions updates + Positions []*Position `protobuf:"bytes,11,rep,name=positions,proto3" json:"positions,omitempty"` + // list of oracle prices updates + OraclePrices []*OraclePrice `protobuf:"bytes,12,rep,name=oracle_prices,json=oraclePrices,proto3" json:"oracle_prices,omitempty"` + // the current gas price when the block was processed (in chain format) + GasPrice string `protobuf:"bytes,13,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` } func (m *StreamResponse) Reset() { *m = StreamResponse{} } @@ -320,7 +343,9 @@ func (m *StreamResponse) GetGasPrice() string { } type OrderbookUpdate struct { - Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the sequence number of the orderbook update + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + // the orderbook details Orderbook *Orderbook `protobuf:"bytes,2,opt,name=orderbook,proto3" json:"orderbook,omitempty"` } @@ -372,8 +397,11 @@ func (m *OrderbookUpdate) GetOrderbook() *Orderbook { } type Orderbook struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - BuyLevels []*v2.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // list of buy levels + BuyLevels []*v2.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + // list of sell levels SellLevels []*v2.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` } @@ -432,7 +460,9 @@ func (m *Orderbook) GetSellLevels() []*v2.Level { } type BankBalance struct { - Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // the account address + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // list of account balances Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` } @@ -484,8 +514,10 @@ func (m *BankBalance) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { } type SubaccountDeposits struct { - SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Deposits []SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the deposits details + Deposits []SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits"` } func (m *SubaccountDeposits) Reset() { *m = SubaccountDeposits{} } @@ -588,10 +620,14 @@ func (m *SubaccountDeposit) GetDeposit() v2.Deposit { } type SpotOrderUpdate struct { - Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` - OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` - Order *SpotOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` + // the status of the order + Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` + // the order hash + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + // the order details + Order *SpotOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } func (m *SpotOrderUpdate) Reset() { *m = SpotOrderUpdate{} } @@ -656,8 +692,10 @@ func (m *SpotOrderUpdate) GetOrder() *SpotOrder { } type SpotOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order v2.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the order details + Order v2.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *SpotOrder) Reset() { *m = SpotOrder{} } @@ -708,10 +746,14 @@ func (m *SpotOrder) GetOrder() v2.SpotLimitOrder { } type DerivativeOrderUpdate struct { - Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` - OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` - Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` + // the status of the order + Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` + // the order hash + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + // the order details + Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } func (m *DerivativeOrderUpdate) Reset() { *m = DerivativeOrderUpdate{} } @@ -776,9 +818,12 @@ func (m *DerivativeOrderUpdate) GetOrder() *DerivativeOrder { } type DerivativeOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order v2.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` - IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the order details + Order v2.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + // whether the order is a market order + IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` } func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } @@ -836,12 +881,19 @@ func (m *DerivativeOrder) GetIsMarket() bool { } type Position struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - IsLong bool `protobuf:"varint,3,opt,name=isLong,proto3" json:"isLong,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` - Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // whether the position is long or short + IsLong bool `protobuf:"varint,3,opt,name=isLong,proto3" json:"isLong,omitempty"` + // the quantity of the position (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the entry price of the position (in human readable format) + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + // the margin of the position (in human readable format) + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the cumulative funding entry of the position (in human readable format) CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` } @@ -900,9 +952,12 @@ func (m *Position) GetIsLong() bool { } type OraclePrice struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + // the symbol of the oracle price + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + // the updated price + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the oracle type + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` } func (m *OraclePrice) Reset() { *m = OraclePrice{} } @@ -953,18 +1008,28 @@ func (m *OraclePrice) GetType() string { } type SpotTrade struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` - ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` - Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` - Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` - // bytes32 subaccount ID that executed the trade - SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` - OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` - Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` - TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // whether the trade is a buy or sell + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + // the execution type + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + // the quantity of the trade (in human readable format) + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the price of the trade (in human readable format) + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the subaccount ID that executed the trade + SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the fee of the trade (in human readable format) + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + // the order hash + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the fee recipient address + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + // the trade ID + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` } func (m *SpotTrade) Reset() { *m = SpotTrade{} } @@ -1057,17 +1122,28 @@ func (m *SpotTrade) GetTradeId() string { } type DerivativeTrade struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` - ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` - SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - PositionDelta *v2.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` - Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` - Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` - OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` - FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` - Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` - TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` + // the market ID + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // whether the trade is a buy or sell + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + // the execution type + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + // the subaccount ID + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the position delta of the trade (in human readable format) + PositionDelta *v2.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + // the payout of the trade (in human readable format) + Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` + // the fee of the trade (in human readable format) + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + // the order hash + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // the fee recipient address + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + // the client order ID + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + // the trade ID + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` } func (m *DerivativeTrade) Reset() { *m = DerivativeTrade{} } @@ -1167,8 +1243,10 @@ func (m *DerivativeTrade) GetTradeId() string { } type TradesFilter struct { + // list of subaccount IDs to filter by SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // list of market IDs to filter by + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *TradesFilter) Reset() { *m = TradesFilter{} } @@ -1219,8 +1297,10 @@ func (m *TradesFilter) GetMarketIds() []string { } type PositionsFilter struct { + // list of subaccount IDs to filter by SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // list of market IDs to filter by + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *PositionsFilter) Reset() { *m = PositionsFilter{} } @@ -1271,8 +1351,10 @@ func (m *PositionsFilter) GetMarketIds() []string { } type OrdersFilter struct { + // list of subaccount IDs to filter by SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // list of market IDs to filter by + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *OrdersFilter) Reset() { *m = OrdersFilter{} } @@ -1323,6 +1405,7 @@ func (m *OrdersFilter) GetMarketIds() []string { } type OrderbookFilter struct { + // list of market IDs to filter by MarketIds []string `protobuf:"bytes,1,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } @@ -1367,6 +1450,7 @@ func (m *OrderbookFilter) GetMarketIds() []string { } type BankBalancesFilter struct { + // list of account addresses to filter by Accounts []string `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` } @@ -1411,6 +1495,7 @@ func (m *BankBalancesFilter) GetAccounts() []string { } type SubaccountDepositsFilter struct { + // list of subaccount IDs to filter by SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` } @@ -1455,6 +1540,7 @@ func (m *SubaccountDepositsFilter) GetSubaccountIds() []string { } type OraclePriceFilter struct { + // list of symbol to filter by Symbol []string `protobuf:"bytes,1,rep,name=symbol,proto3" json:"symbol,omitempty"` } diff --git a/injective_data/ofac.json b/injective_data/ofac.json index b90e59cd..3035ea42 100644 --- a/injective_data/ofac.json +++ b/injective_data/ofac.json @@ -55,6 +55,7 @@ "0xc2a3829f459b3edd87791c74cd45402ba0a20be3", "0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a", "0xd0975b32cea532eadddfc9c60481976e39db3472", + "0xd5ed34b52ac4ab84d8fa8a231a3218bbf01ed510", "0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b", "0xdcbeffbecce100cce9e4b153c4e15cb885643193", "0xe1d865c3d669dcc8c57c8d023140cb204e672ee4", diff --git a/proto/injective/auction/v1beta1/tx.proto b/proto/injective/auction/v1beta1/tx.proto index 34d7859b..96f994d4 100644 --- a/proto/injective/auction/v1beta1/tx.proto +++ b/proto/injective/auction/v1beta1/tx.proto @@ -27,7 +27,7 @@ message MsgBid { option (amino.name) = "auction/MsgBid"; option (cosmos.msg.v1.signer) = "sender"; - + // the sender's Injective address string sender = 1; // amount of the bid in INJ tokens cosmos.base.v1beta1.Coin bid_amount = 2 [ (gogoproto.nullable) = false ]; diff --git a/proto/injective/erc20/v1beta1/query.proto b/proto/injective/erc20/v1beta1/query.proto index 01c3a1d3..954af5b5 100644 --- a/proto/injective/erc20/v1beta1/query.proto +++ b/proto/injective/erc20/v1beta1/query.proto @@ -61,7 +61,7 @@ message QueryAllTokenPairsRequest { // QueryAllTokenPairsResponse is the response type for the Query/AllTokenPairs // RPC method. -message QueryAllTokenPairsResponse { +message QueryAllTokenPairsResponse { repeated TokenPair token_pairs = 1; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; diff --git a/proto/injective/exchange/v1beta1/authz.proto b/proto/injective/exchange/v1beta1/authz.proto index 922f7f5b..49d5c935 100644 --- a/proto/injective/exchange/v1beta1/authz.proto +++ b/proto/injective/exchange/v1beta1/authz.proto @@ -11,35 +11,45 @@ option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/mod message CreateSpotLimitOrderAuthz { option (amino.name) = "exchange/CreateSpotLimitOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CreateSpotMarketOrderAuthz { option (amino.name) = "exchange/CreateSpotMarketOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCreateSpotLimitOrdersAuthz { option (amino.name) = "exchange/BatchCreateSpotLimitOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CancelSpotOrderAuthz { option (amino.name) = "exchange/CancelSpotOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCancelSpotOrdersAuthz { option (amino.name) = "exchange/BatchCancelSpotOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } @@ -47,21 +57,27 @@ message BatchCancelSpotOrdersAuthz { message CreateDerivativeLimitOrderAuthz { option (amino.name) = "exchange/CreateDerivativeLimitOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CreateDerivativeMarketOrderAuthz { option (amino.name) = "exchange/CreateDerivativeMarketOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCreateDerivativeLimitOrdersAuthz { option (amino.name) = "exchange/BatchCreateDerivativeLimitOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } @@ -83,8 +99,11 @@ message BatchCancelDerivativeOrdersAuthz { message BatchUpdateOrdersAuthz { option (amino.name) = "exchange/BatchUpdateOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the spot market IDs repeated string spot_markets = 2; + // the derivative market IDs repeated string derivative_markets = 3; } diff --git a/proto/injective/exchange/v1beta1/exchange.proto b/proto/injective/exchange/v1beta1/exchange.proto index fc27f565..e7e9f631 100644 --- a/proto/injective/exchange/v1beta1/exchange.proto +++ b/proto/injective/exchange/v1beta1/exchange.proto @@ -251,19 +251,19 @@ message DerivativeMarket { // Status of the market MarketStatus status = 14; // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in chain format) string min_price_tick_size = 15 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in chain format) string min_quantity_tick_size = 16 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in chain format) string min_notional = 17 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -364,13 +364,13 @@ message ExpiryFuturesMarketInfo { // calculation window int64 twap_start_timestamp = 3; // expiration_twap_start_price_cumulative defines the cumulative price for the - // start of the TWAP window + // start of the TWAP window (in chain format) string expiration_twap_start_price_cumulative = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // settlement_price defines the settlement price for a time expiry futures - // market. + // market (in chain format) string settlement_price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -406,11 +406,12 @@ message PerpetualMarketFunding { (gogoproto.nullable) = false ]; // cumulative_price defines the cumulative price for the current hour up to - // the last timestamp + // the last timestamp (in chain format) string cumulative_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the last timestamp in seconds int64 last_timestamp = 3; } @@ -427,17 +428,17 @@ message DerivativeMarketSettlementInfo { message NextFundingTimestamp { int64 next_timestamp = 1; } message MidPriceAndTOB { - // mid price of the market + // mid price of the market (in chain format) string mid_price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best buy price of the market + // best buy price of the market (in chain format) string best_buy_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best sell price of the market + // best sell price of the market (in chain format) string best_sell_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -474,19 +475,19 @@ message SpotMarket { // Status of the market MarketStatus status = 8; // min_price_tick_size defines the minimum tick size that the price required - // for orders in the market + // for orders in the market (in chain format) string min_price_tick_size = 9 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in chain format) string min_quantity_tick_size = 10 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in chain format) string min_notional = 11 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -619,22 +620,25 @@ message DerivativeOrder { } message SubaccountOrderbookMetadata { + // The number of vanilla limit orders uint32 vanilla_limit_order_count = 1; + // The number of reduce-only limit orders uint32 reduce_only_limit_order_count = 2; - // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the - // subaccount's reduce-only limit orders in the given direction. + // The aggregate quantity of the subaccount's reduce-only limit orders (in + // chain format) string aggregate_reduce_only_quantity = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // AggregateVanillaQuantity is the aggregate fillable quantity of the - // subaccount's vanilla limit orders in the given direction. + // The aggregate quantity of the subaccount's vanilla limit orders (in chain + // format) string aggregate_vanilla_quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - + // The number of vanilla conditional orders uint32 vanilla_conditional_order_count = 5; + // The number of reduce-only conditional orders uint32 reduce_only_conditional_order_count = 6; } @@ -705,19 +709,24 @@ message DerivativeMarketOrder { } message Position { + // True if the position is long. False if the position is short. bool isLong = 1; + // The quantity of the position (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The entry price of the position (in chain format) string entry_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The margin of the position (in chain format) string margin = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The cumulative funding string cumulative_funding_entry = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -853,18 +862,22 @@ message TradingRewardCampaignInfo { } message FeeDiscountTierInfo { + // the maker discount rate string maker_discount_rate = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the taker discount rate string taker_discount_rate = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the staked amount required to qualify for the discount (in chain format) string staked_amount = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + // the volume required to qualify for the discount (in chain format) string volume = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -916,13 +929,16 @@ message TradeRecords { message SubaccountIDs { repeated bytes subaccount_ids = 1; } message TradeRecord { + // the timestamp of the trade int64 timestamp = 1; + // the price of the trade (in chain format) string price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the quantity of the trade (in chain format) string quantity = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -945,12 +961,12 @@ enum OrderMask { } message Level { - // price + // price (in chain format) string p = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity + // quantity (in chain format) string q = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -958,7 +974,9 @@ message Level { } message AggregateSubaccountVolumeRecord { + // the subaccount ID string subaccount_id = 1; + // the subaccount volumes for each market repeated MarketVolume market_volumes = 2; } @@ -1003,7 +1021,9 @@ message EffectiveGrant { } message DenomMinNotional { + // the denom of the token string denom = 1; + // the minimum notional value for the token (in chain format) string min_notional = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/proto/injective/exchange/v1beta1/genesis.proto b/proto/injective/exchange/v1beta1/genesis.proto index 097067cf..7c86994e 100644 --- a/proto/injective/exchange/v1beta1/genesis.proto +++ b/proto/injective/exchange/v1beta1/genesis.proto @@ -209,8 +209,11 @@ message Balance { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the denom of the balance string denom = 2; + // the token deposits details Deposit deposits = 3; } @@ -218,8 +221,11 @@ message DerivativePosition { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; + // the position details Position position = 3; } @@ -227,7 +233,9 @@ message SubaccountNonce { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the subaccount trade nonce SubaccountTradeNonce subaccount_trade_nonce = 2 [ (gogoproto.nullable) = false ]; } diff --git a/proto/injective/exchange/v1beta1/query.proto b/proto/injective/exchange/v1beta1/query.proto index 2a19efb8..29b0064a 100644 --- a/proto/injective/exchange/v1beta1/query.proto +++ b/proto/injective/exchange/v1beta1/query.proto @@ -482,7 +482,9 @@ message Subaccount { } message QuerySubaccountOrdersRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } @@ -492,8 +494,11 @@ message QuerySubaccountOrdersResponse { } message SubaccountOrderbookMetadataWithMarket { + // the subaccount orderbook metadata SubaccountOrderbookMetadata metadata = 1; + // the market ID string market_id = 2; + // true if the order is for buy orders bool isBuy = 3; } @@ -510,7 +515,9 @@ message QueryExchangeParamsResponse { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. message QuerySubaccountDepositsRequest { + // the subaccount ID string subaccount_id = 1; + // subaccount details Subaccount subaccount = 2 [ (gogoproto.nullable) = true ]; } @@ -604,7 +611,9 @@ message QueryAggregateMarketVolumesResponse { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. message QuerySubaccountDepositRequest { + // the subaccount ID string subaccount_id = 1; + // the denom of the balance string denom = 2; } @@ -649,12 +658,18 @@ enum OrderSide { message QuerySpotOrderbookRequest { // Market ID for the market string market_id = 1; + // the maximum number of orderbook entries to return per side (optional) uint64 limit = 2; + // the order side to return the orderbook entries for (optional) OrderSide order_side = 3; + // limits the number of entries to return per side based on the cumulative + // notional (in chain format) string limit_cumulative_notional = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; + // limits the number of entries to return per side based on the cumulative + // quantity (in chain format) string limit_cumulative_quantity = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -743,24 +758,26 @@ message QueryAccountAddressSpotOrdersRequest { } message TrimmedSpotLimitOrder { - // price of the order + // price of the order (in chain format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in chain format) string fillable = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy bool isBuy = 4; + // the order hash (optional) string order_hash = 5; + // the client order ID (optional) string cid = 6; } @@ -786,17 +803,17 @@ message QuerySpotMidPriceAndTOBRequest { // QuerySpotMidPriceAndTOBResponse is the response type for the // Query/SpotMidPriceAndTOB RPC method. message QuerySpotMidPriceAndTOBResponse { - // mid price of the market + // mid price of the market (in chain format) string mid_price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best buy price of the market + // best buy price of the market (in chain format) string best_buy_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best sell price of the market + // best sell price of the market (in chain format) string best_sell_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -930,30 +947,31 @@ message QueryAccountAddressDerivativeOrdersRequest { } message TrimmedDerivativeLimitOrder { - // price of the order + // price of the order (in chain format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // margin of the order + // margin of the order (in chain format) string margin = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in chain format) string fillable = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag + bool isBuy = 5 [ (gogoproto.jsontag) = "isBuy" ]; + // the order hash (optional) string order_hash = 6; + // the client order ID (optional) string cid = 7; } @@ -1018,16 +1036,20 @@ message PerpetualMarketState { } message FullDerivativeMarket { + // derivative market details DerivativeMarket market = 1; + // perpetual market state or expiry futures market state oneof info { + // perpetual market info PerpetualMarketState perpetual_info = 2; + // expiry futures market info ExpiryFuturesMarketInfo futures_info = 3; } + // mark price (in chain format) string mark_price = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // mid_price_and_tob defines the mid price for this market and the best ask // and bid orders MidPriceAndTOB mid_price_and_tob = 5 [ (gogoproto.nullable) = true ]; @@ -1068,29 +1090,42 @@ message QueryDerivativeMarketAddressResponse { // QuerySubaccountTradeNonceRequest is the request type for the // Query/SubaccountTradeNonce RPC method. -message QuerySubaccountTradeNonceRequest { string subaccount_id = 1; } +message QuerySubaccountTradeNonceRequest { + // the subaccount ID + string subaccount_id = 1; +} // QuerySubaccountPositionsRequest is the request type for the // Query/SubaccountPositions RPC method. -message QuerySubaccountPositionsRequest { string subaccount_id = 1; } +message QuerySubaccountPositionsRequest { + // the subaccount ID + string subaccount_id = 1; +} // QuerySubaccountPositionInMarketRequest is the request type for the // Query/SubaccountPositionInMarket RPC method. message QuerySubaccountPositionInMarketRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } // QuerySubaccountEffectivePositionInMarketRequest is the request type for the // Query/SubaccountEffectivePositionInMarket RPC method. message QuerySubaccountEffectivePositionInMarketRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } // QuerySubaccountOrderMetadataRequest is the request type for the // Query/SubaccountOrderMetadata RPC method. -message QuerySubaccountOrderMetadataRequest { string subaccount_id = 1; } +message QuerySubaccountOrderMetadataRequest { + // the subaccount ID + string subaccount_id = 1; +} // QuerySubaccountPositionsResponse is the response type for the // Query/SubaccountPositions RPC method. @@ -1105,15 +1140,19 @@ message QuerySubaccountPositionInMarketResponse { } message EffectivePosition { + // whether the position is long or short bool is_long = 1; + // the quantity of the position (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the entry price of the position (in chain format) string entry_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the effective margin of the position (in chain format) string effective_margin = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1263,24 +1302,31 @@ message QueryFeeDiscountScheduleResponse { message QueryBalanceMismatchesRequest { int64 dust_factor = 1; } message BalanceMismatch { + // the subaccount ID string subaccountId = 1; + // the denom of the balance string denom = 2; + // the available balance string available = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the total balance string total = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the balance hold string balance_hold = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the expected total balance string expected_total = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the difference between the total balance and the expected total balance string difference = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1298,16 +1344,21 @@ message QueryBalanceMismatchesResponse { message QueryBalanceWithBalanceHoldsRequest {} message BalanceWithMarginHold { + // the subaccount ID string subaccountId = 1; + // the denom of the balance string denom = 2; + // the available balance string available = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the total balance string total = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the balance on hold string balance_hold = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1342,9 +1393,13 @@ message MitoVaultInfosRequest {} // MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC // method. message MitoVaultInfosResponse { + // list of master addresses repeated string master_addresses = 1; + // list of derivative addresses repeated string derivative_addresses = 2; + // list of spot addresses repeated string spot_addresses = 3; + // list of cw20 addresses repeated string cw20_addresses = 4; } @@ -1409,36 +1464,40 @@ message QueryBinaryMarketsResponse { repeated BinaryOptionsMarket markets = 1; } // QueryConditionalOrdersRequest is the request type for the // Query/ConditionalOrders RPC method. message QueryTraderDerivativeConditionalOrdersRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } message TrimmedDerivativeConditionalOrder { - // price of the order + // price of the order (in chain format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // margin of the order + // margin of the order (in chain format) string margin = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // price to trigger the order + // price to trigger the order (in chain format) string triggerPrice = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag + bool isBuy = 5 [ (gogoproto.jsontag) = "isBuy" ]; + // true if the order is a limit order bool isLimit = 6 [ (gogoproto.jsontag) = "isLimit" ]; + // the order hash string order_hash = 7; + // the client ID string cid = 8; } @@ -1467,20 +1526,26 @@ message QueryFullDerivativeOrderbookResponse { repeated TrimmedLimitOrder Asks = 2; } message TrimmedLimitOrder { + // the price of the order (in chain format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // the quantity of the order (in chain format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - + // the order hash string order_hash = 3; + // the subaccount ID string subaccount_id = 4; } -message QueryMarketAtomicExecutionFeeMultiplierRequest { string market_id = 1; } + +message QueryMarketAtomicExecutionFeeMultiplierRequest { + // the market ID + string market_id = 1; +} message QueryMarketAtomicExecutionFeeMultiplierResponse { string multiplier = 1 [ @@ -1540,6 +1605,7 @@ message MarketBalance { message QueryDenomMinNotionalRequest { string denom = 1; } message QueryDenomMinNotionalResponse { + // the minimum notional amount for the denom (in chain format) string amount = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/proto/injective/exchange/v1beta1/tx.proto b/proto/injective/exchange/v1beta1/tx.proto index 01708c50..da4c0b7d 100644 --- a/proto/injective/exchange/v1beta1/tx.proto +++ b/proto/injective/exchange/v1beta1/tx.proto @@ -270,10 +270,12 @@ message MsgDeposit { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin - // will be deposited to the sender's default subaccount address. + // will be deposited to the sender's default subaccount address string subaccount_id = 2; + // the amount of the deposit (in chain format) cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; } @@ -288,9 +290,11 @@ message MsgWithdraw { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // bytes32 subaccount ID to withdraw funds from + // the subaccount ID to withdraw funds from string subaccount_id = 2; + // the amount of the withdrawal (in chain format) cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; } @@ -305,7 +309,9 @@ message MsgCreateSpotLimitOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the spot order to create SpotOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -315,7 +321,9 @@ message MsgCreateSpotLimitOrderResponse { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the order hash string order_hash = 1; + // the client order ID string cid = 2; } @@ -327,7 +335,9 @@ message MsgBatchCreateSpotLimitOrders { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the spot orders details repeated SpotOrder orders = 2 [ (gogoproto.nullable) = false ]; } @@ -337,8 +347,11 @@ message MsgBatchCreateSpotLimitOrdersResponse { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the order hashes repeated string order_hashes = 1; + // the client order IDs repeated string created_orders_cids = 2; + // the failed client order IDs repeated string failed_orders_cids = 3; } @@ -350,10 +363,11 @@ message MsgInstantSpotMarketLaunch { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // Ticker for the spot market. + // the ticker for the spot market string ticker = 2; - // type of coin to use as the base currency + // the type of coin to use as the base currency string base_denom = 3; // type of coin to use as the quote currency string quote_denom = 4; @@ -392,12 +406,13 @@ message MsgInstantBinaryOptionsMarketLaunch { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // Ticker for the derivative contract. + // the ticker for the derivative contract string ticker = 2; - // Oracle symbol + // the oracle symbol string oracle_symbol = 3; - // Oracle Provider + // the oracle provider string oracle_provider = 4; // Oracle type injective.oracle.v1beta1.OracleType oracle_type = 5; @@ -613,21 +628,31 @@ message MsgBatchUpdateOrders { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // subaccount_id only used for the spot_market_ids_to_cancel_all and - // derivative_market_ids_to_cancel_all. + // the subaccount ID only used for the spot_market_ids_to_cancel_all and + // derivative_market_ids_to_cancel_all string subaccount_id = 2; + // the spot market IDs to cancel all repeated string spot_market_ids_to_cancel_all = 3; + // the derivative market IDs to cancel all repeated string derivative_market_ids_to_cancel_all = 4; + // the spot orders to cancel repeated OrderData spot_orders_to_cancel = 5 [ (gogoproto.nullable) = true ]; + // the derivative orders to cancel repeated OrderData derivative_orders_to_cancel = 6 [ (gogoproto.nullable) = true ]; + // the spot orders to create repeated SpotOrder spot_orders_to_create = 7 [ (gogoproto.nullable) = true ]; + // the derivative orders to create repeated DerivativeOrder derivative_orders_to_create = 8 [ (gogoproto.nullable) = true ]; + // the binary options orders to cancel repeated OrderData binary_options_orders_to_cancel = 9 [ (gogoproto.nullable) = true ]; + // the binary options market IDs to cancel all repeated string binary_options_market_ids_to_cancel_all = 10; + // the binary options orders to create repeated DerivativeOrder binary_options_orders_to_create = 11 [ (gogoproto.nullable) = true ]; } @@ -726,11 +751,17 @@ message MsgCancelDerivativeOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the market ID string market_id = 2; + // the subaccount ID string subaccount_id = 3; + // the order hash string order_hash = 4; + // the order mask int32 order_mask = 5; // bitwise combination of OrderMask enum values + // the client order ID string cid = 6; } @@ -745,11 +776,17 @@ message MsgCancelBinaryOptionsOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the market ID string market_id = 2; + // the subaccount ID string subaccount_id = 3; + // the order hash string order_hash = 4; - int32 order_mask = 5; // bitwise combination of OrderMask enum values + // the order mask (bitwise combination of OrderMask enum values) + int32 order_mask = 5; + // the client order ID string cid = 6; } @@ -758,10 +795,15 @@ message MsgCancelBinaryOptionsOrder { message MsgCancelBinaryOptionsOrderResponse {} message OrderData { + // the market ID string market_id = 1; + // the subaccount ID string subaccount_id = 2; + // the order hash string order_hash = 3; - int32 order_mask = 4; // bitwise combination of OrderMask enum values + // the order mask (bitwise combination of OrderMask enum values) + int32 order_mask = 4; + // the client order ID string cid = 5; } @@ -772,7 +814,9 @@ message MsgBatchCancelDerivativeOrders { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // orders details repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; } @@ -790,9 +834,13 @@ message MsgSubaccountTransfer { option (amino.name) = "exchange/MsgSubaccountTransfer"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the source subaccount ID string source_subaccount_id = 2; + // the destination subaccount ID string destination_subaccount_id = 3; + // the amount of the transfer cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; } @@ -819,8 +867,11 @@ message MsgLiquidatePosition { option (amino.name) = "exchange/MsgLiquidatePosition"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID string subaccount_id = 2; + // the market ID string market_id = 3; // optional order to provide for liquidation @@ -835,8 +886,11 @@ message MsgEmergencySettleMarket { option (amino.name) = "exchange/MsgEmergencySettleMarket"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID string subaccount_id = 2; + // the market ID string market_id = 3; } @@ -849,11 +903,16 @@ message MsgIncreasePositionMargin { option (amino.name) = "exchange/MsgIncreasePositionMargin"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID sending the funds string source_subaccount_id = 2; + // the subaccount ID the position belongs to string destination_subaccount_id = 3; + // the market ID string market_id = 4; - // amount defines the amount of margin to add to the position + // amount defines the amount of margin to add to the position (in chain + // format) string amount = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -870,11 +929,16 @@ message MsgDecreasePositionMargin { option (amino.name) = "exchange/MsgDecreasePositionMargin"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID sending the funds string source_subaccount_id = 2; + // the subaccount ID the position belongs to string destination_subaccount_id = 3; + // the market ID string market_id = 4; - // amount defines the amount of margin to withdraw from the position + // amount defines the amount of margin to withdraw from the position (in chain + // format) string amount = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/proto/injective/exchange/v2/authz.proto b/proto/injective/exchange/v2/authz.proto index ac19cc1a..a81b20a7 100644 --- a/proto/injective/exchange/v2/authz.proto +++ b/proto/injective/exchange/v2/authz.proto @@ -12,35 +12,45 @@ option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/mod message CreateSpotLimitOrderAuthz { option (amino.name) = "exchange/CreateSpotLimitOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CreateSpotMarketOrderAuthz { option (amino.name) = "exchange/CreateSpotMarketOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCreateSpotLimitOrdersAuthz { option (amino.name) = "exchange/BatchCreateSpotLimitOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CancelSpotOrderAuthz { option (amino.name) = "exchange/CancelSpotOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCancelSpotOrdersAuthz { option (amino.name) = "exchange/BatchCancelSpotOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } @@ -48,21 +58,27 @@ message BatchCancelSpotOrdersAuthz { message CreateDerivativeLimitOrderAuthz { option (amino.name) = "exchange/CreateDerivativeLimitOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message CreateDerivativeMarketOrderAuthz { option (amino.name) = "exchange/CreateDerivativeMarketOrderAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } message BatchCreateDerivativeLimitOrdersAuthz { option (amino.name) = "exchange/BatchCreateDerivativeLimitOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } @@ -76,7 +92,9 @@ message CancelDerivativeOrderAuthz { message BatchCancelDerivativeOrdersAuthz { option (amino.name) = "exchange/BatchCancelDerivativeOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the market IDs repeated string market_ids = 2; } @@ -84,8 +102,11 @@ message BatchCancelDerivativeOrdersAuthz { message BatchUpdateOrdersAuthz { option (amino.name) = "exchange/BatchUpdateOrdersAuthz"; option (cosmos_proto.implements_interface) = "Authorization"; + // the subaccount ID string subaccount_id = 1; + // the spot market IDs repeated string spot_markets = 2; + // the derivative market IDs repeated string derivative_markets = 3; } diff --git a/proto/injective/exchange/v2/exchange.proto b/proto/injective/exchange/v2/exchange.proto index 18263364..c55e25e7 100644 --- a/proto/injective/exchange/v2/exchange.proto +++ b/proto/injective/exchange/v2/exchange.proto @@ -199,17 +199,17 @@ message Params { message NextFundingTimestamp { int64 next_timestamp = 1; } message MidPriceAndTOB { - // mid price of the market + // mid price of the market (in human readable format) string mid_price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best buy price of the market + // best buy price of the market (in human readable format) string best_buy_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best sell price of the market + // best sell price of the market (in human readable format) string best_sell_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -218,10 +218,12 @@ message MidPriceAndTOB { // A subaccount's deposit for a given base currency message Deposit { + // the available balance (in chain format) string available_balance = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the total balance (in chain format) string total_balance = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -251,19 +253,24 @@ message SubaccountOrderData { } message Position { + // True if the position is long. False if the position is short. bool isLong = 1; + // The quantity of the position (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The entry price of the position (in human readable format) string entry_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The margin of the position (in human readable format) string margin = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // The cumulative funding string cumulative_funding_entry = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -274,8 +281,11 @@ message Balance { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the denom of the balance string denom = 2; + // the token deposits details Deposit deposits = 3; } @@ -283,8 +293,11 @@ message DerivativePosition { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; + // the position details Position position = 3; } @@ -386,6 +399,7 @@ message TradingRewardCampaignBoostInfo { } message CampaignRewardPool { + // the campaign start timestamp in seconds int64 start_timestamp = 1; // max_campaign_rewards are the maximum reward amounts to be disbursed at the // end of the campaign @@ -407,18 +421,22 @@ message TradingRewardCampaignInfo { } message FeeDiscountTierInfo { + // the maker discount rate string maker_discount_rate = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the taker discount rate string taker_discount_rate = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the staked amount required to qualify for the discount (in chain format) string staked_amount = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + // the volume required to qualify for the discount (in human readable format) string volume = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -426,7 +444,9 @@ message FeeDiscountTierInfo { } message FeeDiscountSchedule { + // the bucket number uint64 bucket_count = 1; + // the bucket duration in seconds int64 bucket_duration = 2; // the trading fee quote denoms which will be counted for the fee paid // contribution @@ -439,7 +459,9 @@ message FeeDiscountSchedule { } message FeeDiscountTierTTL { + // the tier number uint64 tier = 1; + // the TTL timestamp in seconds int64 ttl_timestamp = 2; } @@ -459,13 +481,16 @@ message TradeRecords { message SubaccountIDs { repeated bytes subaccount_ids = 1; } message TradeRecord { + // the timestamp of the trade int64 timestamp = 1; + // the price of the trade (in human readable format) string price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the quantity of the trade (in human readable format) string quantity = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -473,12 +498,12 @@ message TradeRecord { } message Level { - // price + // price (in human readable format) string p = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity + // quantity (in human readable format) string q = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -486,22 +511,30 @@ message Level { } message AggregateSubaccountVolumeRecord { + // the subaccount ID string subaccount_id = 1; + // the subaccount volumes for each market repeated MarketVolume market_volumes = 2; } message AggregateAccountVolumeRecord { + // account the volume belongs to string account = 1; + // the aggregate volumes for each market repeated MarketVolume market_volumes = 2; } message DenomDecimals { + // the denom of the token string denom = 1; + // the decimals of the token uint64 decimals = 2; } message GrantAuthorization { + // the grantee address string grantee = 1; + // the amount of stake granted (INJ in chain format) string amount = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false @@ -526,7 +559,9 @@ message EffectiveGrant { } message DenomMinNotional { + // the denom of the token string denom = 1; + // the minimum notional value for the token (in human readable format) string min_notional = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/proto/injective/exchange/v2/genesis.proto b/proto/injective/exchange/v2/genesis.proto index 565ec59a..d20275e1 100644 --- a/proto/injective/exchange/v2/genesis.proto +++ b/proto/injective/exchange/v2/genesis.proto @@ -180,7 +180,9 @@ message SubaccountNonce { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the subaccount ID string subaccount_id = 1; + // the subaccount trade nonce SubaccountTradeNonce subaccount_trade_nonce = 2 [ (gogoproto.nullable) = false ]; } diff --git a/proto/injective/exchange/v2/market.proto b/proto/injective/exchange/v2/market.proto index be9eb924..471c0a65 100644 --- a/proto/injective/exchange/v2/market.proto +++ b/proto/injective/exchange/v2/market.proto @@ -55,19 +55,19 @@ message SpotMarket { // Status of the market MarketStatus status = 8; // min_price_tick_size defines the minimum tick size that the price required - // for orders in the market + // for orders in the market (in human readable format) string min_price_tick_size = 9 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) string min_quantity_tick_size = 10 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 11 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -126,24 +126,25 @@ message BinaryOptionsMarket { // Status of the market MarketStatus status = 14; // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) string min_price_tick_size = 15 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) string min_quantity_tick_size = 16 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - + // settlement_price defines the settlement price of the binary options market + // (in human readable format) string settlement_price = 17 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 18 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -206,19 +207,19 @@ message DerivativeMarket { // Status of the market MarketStatus status = 14; // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) string min_price_tick_size = 15 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) string min_quantity_tick_size = 16 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 17 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -249,15 +250,19 @@ message DerivativeMarketSettlementInfo { } message MarketVolume { + // the market ID string market_id = 1; + // the market volume VolumeRecord volume = 2 [ (gogoproto.nullable) = false ]; } message VolumeRecord { + // the market's maker volume (in human readable format) string maker_volume = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the market's taker volume (in human readable format) string taker_volume = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -284,13 +289,13 @@ message ExpiryFuturesMarketInfo { // calculation window int64 twap_start_timestamp = 3; // expiration_twap_start_price_cumulative defines the cumulative price for the - // start of the TWAP window + // start of the TWAP window (in human readable format) string expiration_twap_start_price_cumulative = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // settlement_price defines the settlement price for a time expiry futures - // market. + // market (in human readable format) string settlement_price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -326,10 +331,11 @@ message PerpetualMarketFunding { (gogoproto.nullable) = false ]; // cumulative_price defines the cumulative price for the current hour up to - // the last timestamp + // the last timestamp (in human readable format) string cumulative_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the last funding timestamp in seconds int64 last_timestamp = 3; } diff --git a/proto/injective/exchange/v2/order.proto b/proto/injective/exchange/v2/order.proto index a47e97d5..d6ec26f5 100644 --- a/proto/injective/exchange/v2/order.proto +++ b/proto/injective/exchange/v2/order.proto @@ -47,16 +47,17 @@ message OrderInfo { string subaccount_id = 1; // address fee_recipient address that will receive fees for the order string fee_recipient = 2; - // price of the order + // price of the order (in human readable format) string price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in human readable format) string quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the client order ID (optional) string cid = 5; } @@ -67,7 +68,8 @@ message SpotOrder { OrderInfo order_info = 2 [ (gogoproto.nullable) = false ]; // order types OrderType order_type = 3; - // trigger_price is the trigger price used by stop/take orders + // trigger_price is the trigger price used by stop/take orders (in human + // readable format) (optional) string trigger_price = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -123,12 +125,13 @@ message DerivativeOrder { OrderInfo order_info = 2 [ (gogoproto.nullable) = false ]; // order types OrderType order_type = 3; - // margin is the margin used by the limit order + // margin is the margin used by the limit order (in human readable format) string margin = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // trigger_price is the trigger price used by stop/take orders + // trigger_price is the trigger price used by stop/take orders (in human + // readable format) (optional) string trigger_price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true diff --git a/proto/injective/exchange/v2/orderbook.proto b/proto/injective/exchange/v2/orderbook.proto index 531d1ce9..4d3e6e7e 100644 --- a/proto/injective/exchange/v2/orderbook.proto +++ b/proto/injective/exchange/v2/orderbook.proto @@ -39,21 +39,24 @@ message ConditionalDerivativeOrderBook { } message SubaccountOrderbookMetadata { + // The number of vanilla limit orders uint32 vanilla_limit_order_count = 1; + // The number of reduce-only limit orders uint32 reduce_only_limit_order_count = 2; - // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the - // subaccount's reduce-only limit orders in the given direction. + // The aggregate quantity of the subaccount's reduce-only limit orders (in + // human readable format) string aggregate_reduce_only_quantity = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // AggregateVanillaQuantity is the aggregate fillable quantity of the - // subaccount's vanilla limit orders in the given direction. + // The aggregate quantity of the subaccount's vanilla limit orders (in human + // readable format) string aggregate_vanilla_quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - + // The number of vanilla conditional orders uint32 vanilla_conditional_order_count = 5; + // The number of reduce-only conditional orders uint32 reduce_only_conditional_order_count = 6; } diff --git a/proto/injective/exchange/v2/query.proto b/proto/injective/exchange/v2/query.proto index 31d1add3..9f1a6aff 100644 --- a/proto/injective/exchange/v2/query.proto +++ b/proto/injective/exchange/v2/query.proto @@ -481,12 +481,16 @@ service Query { } message Subaccount { + // the subaccount's trader address string trader = 1; + // the subaccount's nonce number uint32 subaccount_nonce = 2; } message QuerySubaccountOrdersRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } @@ -496,8 +500,11 @@ message QuerySubaccountOrdersResponse { } message SubaccountOrderbookMetadataWithMarket { + // the subaccount orderbook details SubaccountOrderbookMetadata metadata = 1; + // the market ID string market_id = 2; + // true if the orderbook is for a buy orders bool isBuy = 3; } @@ -514,7 +521,9 @@ message QueryExchangeParamsResponse { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. message QuerySubaccountDepositsRequest { + // the subaccount ID string subaccount_id = 1; + // the subaccount details Subaccount subaccount = 2 [ (gogoproto.nullable) = true ]; } @@ -608,7 +617,9 @@ message QueryAggregateMarketVolumesResponse { // QuerySubaccountDepositsRequest is the request type for the // Query/SubaccountDeposits RPC method. message QuerySubaccountDepositRequest { + // the subaccount ID string subaccount_id = 1; + // the token denom string denom = 2; } @@ -653,12 +664,18 @@ enum OrderSide { message QuerySpotOrderbookRequest { // Market ID for the market string market_id = 1; + // the maximum number of orderbook entries to return per side (optional) uint64 limit = 2; + // the order side to return the orderbook entries for (optional) OrderSide order_side = 3; + // limits the number of entries to return per side based on the cumulative + // notional (in human readable format) string limit_cumulative_notional = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; + // limits the number of entries to return per side based on the cumulative + // quantity (in human readable format) string limit_cumulative_quantity = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -673,6 +690,7 @@ message QuerySpotOrderbookResponse { } message FullSpotMarket { + // spot market details SpotMarket market = 1; // mid_price_and_tob defines the mid price for this market and the best ask // and bid orders @@ -747,24 +765,26 @@ message QueryAccountAddressSpotOrdersRequest { } message TrimmedSpotLimitOrder { - // price of the order + // price of the order (in human readable format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in human readable format) string fillable = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy bool isBuy = 4; + // the order hash (optional) string order_hash = 5; + // the client order ID (optional) string cid = 6; } @@ -790,12 +810,12 @@ message QuerySpotMidPriceAndTOBRequest { // QuerySpotMidPriceAndTOBResponse is the response type for the // Query/SpotMidPriceAndTOB RPC method. message QuerySpotMidPriceAndTOBResponse { - // mid price of the market + // mid price of the market (in human readable format) string mid_price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; - // best buy price of the market + // best buy price of the market (in human readable format) string best_buy_price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true @@ -934,30 +954,31 @@ message QueryAccountAddressDerivativeOrdersRequest { } message TrimmedDerivativeLimitOrder { - // price of the order + // price of the order (in human readable format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // margin of the order + // margin of the order (in human readable format) string margin = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // the amount of the quantity remaining fillable + // the amount of the quantity remaining fillable (in human readable format) string fillable = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag + bool isBuy = 5 [ (gogoproto.jsontag) = "isBuy" ]; + // the order hash (optional) string order_hash = 6; + // the client order ID (optional) string cid = 7; } @@ -1022,11 +1043,16 @@ message PerpetualMarketState { } message FullDerivativeMarket { + // derivative market details DerivativeMarket market = 1; + // perpetual market state or expiry futures market state oneof info { + // perpetual market info PerpetualMarketState perpetual_info = 2; + // expiry futures market info ExpiryFuturesMarketInfo futures_info = 3; } + // mark price (in human readable format) string mark_price = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1072,7 +1098,10 @@ message QueryDerivativeMarketAddressResponse { // QuerySubaccountTradeNonceRequest is the request type for the // Query/SubaccountTradeNonce RPC method. -message QuerySubaccountTradeNonceRequest { string subaccount_id = 1; } +message QuerySubaccountTradeNonceRequest { + // the subaccount ID + string subaccount_id = 1; +} // QueryPositionsInMarketRequest is the request type for the // Query/PositionsInMarket RPC method. @@ -1086,25 +1115,35 @@ message QueryPositionsInMarketResponse { // QuerySubaccountPositionsRequest is the request type for the // Query/SubaccountPositions RPC method. -message QuerySubaccountPositionsRequest { string subaccount_id = 1; } +message QuerySubaccountPositionsRequest { + // the subaccount ID + string subaccount_id = 1; +} // QuerySubaccountPositionInMarketRequest is the request type for the // Query/SubaccountPositionInMarket RPC method. message QuerySubaccountPositionInMarketRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } // QuerySubaccountEffectivePositionInMarketRequest is the request type for the // Query/SubaccountEffectivePositionInMarket RPC method. message QuerySubaccountEffectivePositionInMarketRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } // QuerySubaccountOrderMetadataRequest is the request type for the // Query/SubaccountOrderMetadata RPC method. -message QuerySubaccountOrderMetadataRequest { string subaccount_id = 1; } +message QuerySubaccountOrderMetadataRequest { + // the subaccount ID + string subaccount_id = 1; +} // QuerySubaccountPositionsResponse is the response type for the // Query/SubaccountPositions RPC method. @@ -1119,15 +1158,19 @@ message QuerySubaccountPositionInMarketResponse { } message EffectivePosition { + // whether the position is long or short bool is_long = 1; + // the quantity of the position (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the entry price of the position (in human readable format) string entry_price = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the effective margin of the position (in human readable format) string effective_margin = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1277,24 +1320,31 @@ message QueryFeeDiscountScheduleResponse { message QueryBalanceMismatchesRequest { int64 dust_factor = 1; } message BalanceMismatch { + // the subaccount ID string subaccountId = 1; + // the denom of the balance string denom = 2; + // the available balance string available = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the total balance string total = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the balance hold string balance_hold = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the expected total balance string expected_total = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the difference between the total balance and the expected total balance string difference = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1312,16 +1362,21 @@ message QueryBalanceMismatchesResponse { message QueryBalanceWithBalanceHoldsRequest {} message BalanceWithMarginHold { + // the subaccount ID string subaccountId = 1; + // the denom of the balance string denom = 2; + // the available balance string available = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the total balance string total = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the balance on hold string balance_hold = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1356,9 +1411,13 @@ message MitoVaultInfosRequest {} // MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC // method. message MitoVaultInfosResponse { + // list of master addresses repeated string master_addresses = 1; + // list of derivative addresses repeated string derivative_addresses = 2; + // list of spot addresses repeated string spot_addresses = 3; + // list of cw20 addresses repeated string cw20_addresses = 4; } @@ -1396,7 +1455,9 @@ message TradeHistoryOptions { // QueryMarketVolatilityRequest are the request params for the // Query/MarketVolatility RPC method. message QueryMarketVolatilityRequest { + // the market ID to query volatility for string market_id = 1; + // the trade history options TradeHistoryOptions trade_history_options = 2; } @@ -1423,36 +1484,40 @@ message QueryBinaryMarketsResponse { repeated BinaryOptionsMarket markets = 1; } // QueryConditionalOrdersRequest is the request type for the // Query/ConditionalOrders RPC method. message QueryTraderDerivativeConditionalOrdersRequest { + // the subaccount ID string subaccount_id = 1; + // the market ID string market_id = 2; } message TrimmedDerivativeConditionalOrder { - // price of the order + // price of the order (in human readable format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // margin of the order + // margin of the order (in human readable format) string margin = 3 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // price to trigger the order + // price to trigger the order (in human readable format) string triggerPrice = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag + bool isBuy = 5 [ (gogoproto.jsontag) = "isBuy" ]; + // true if the order is a limit order bool isLimit = 6 [ (gogoproto.jsontag) = "isLimit" ]; + // the order hash string order_hash = 7; + // the client ID string cid = 8; } @@ -1481,17 +1546,19 @@ message QueryFullDerivativeOrderbookResponse { repeated TrimmedLimitOrder Asks = 2; } message TrimmedLimitOrder { + // price of the order (in human readable format) string price = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // quantity of the order + // quantity of the order (in human readable format) string quantity = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - + // the order hash string order_hash = 3; + // the subaccount ID string subaccount_id = 4; } message QueryMarketAtomicExecutionFeeMultiplierRequest { string market_id = 1; } @@ -1544,7 +1611,9 @@ message QueryMarketBalancesRequest {} message QueryMarketBalancesResponse { repeated MarketBalance balances = 1; } message MarketBalance { + // the market ID string market_id = 1; + // the current balance of the market string balance = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1554,6 +1623,7 @@ message MarketBalance { message QueryDenomMinNotionalRequest { string denom = 1; } message QueryDenomMinNotionalResponse { + // the minimum notional amount for the denom (in human readable format) string amount = 1 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/proto/injective/exchange/v2/tx.proto b/proto/injective/exchange/v2/tx.proto index 0053e651..7052d97c 100644 --- a/proto/injective/exchange/v2/tx.proto +++ b/proto/injective/exchange/v2/tx.proto @@ -234,19 +234,19 @@ message MsgUpdateSpotMarket { // (optional) updated ticker value string new_ticker = 3; - // (optional) updated min price tick size value + // (optional) updated min price tick size value (in human readable format) string new_min_price_tick_size = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // (optional) updated min quantity tick size value + // (optional) updated min quantity tick size value (in human readable format) string new_min_quantity_tick_size = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // (optional) updated min notional + // (optional) updated min notional (in human readable format) string new_min_notional = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -270,19 +270,19 @@ message MsgUpdateDerivativeMarket { // (optional) updated value for ticker string new_ticker = 3; - // (optional) updated value for min_price_tick_size + // (optional) updated value for min_price_tick_size (in human readable format) string new_min_price_tick_size = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // (optional) updated value min_quantity_tick_size + // (optional) updated value min_quantity_tick_size (in human readable format) string new_min_quantity_tick_size = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // (optional) updated min notional + // (optional) updated min notional (in human readable format) string new_min_notional = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -332,10 +332,12 @@ message MsgDeposit { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin + // (Optional) the subaccount ID to deposit funds into. If empty, the coin // will be deposited to the sender's default subaccount address. string subaccount_id = 2; + // the amount of the deposit (in chain format) cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; } @@ -350,9 +352,11 @@ message MsgWithdraw { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; - // bytes32 subaccount ID to withdraw funds from + // the subaccount ID to withdraw funds from string subaccount_id = 2; + // the amount of the withdrawal (in chain format) cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; } @@ -367,7 +371,9 @@ message MsgCreateSpotLimitOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details SpotOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -412,6 +418,7 @@ message MsgInstantSpotMarketLaunch { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; // Ticker for the spot market. string ticker = 2; @@ -419,19 +426,20 @@ message MsgInstantSpotMarketLaunch { string base_denom = 3; // type of coin to use as the quote currency string quote_denom = 4; - // min_price_tick_size defines the minimum tick size of the order's price + // min_price_tick_size defines the minimum tick size of the order's price (in + // human readable format) string min_price_tick_size = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the order's - // quantity + // quantity (in human readable format) string min_quantity_tick_size = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -454,6 +462,7 @@ message MsgInstantPerpetualMarketLaunch { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; // Ticker for the derivative market. string ticker = 2; @@ -493,19 +502,19 @@ message MsgInstantPerpetualMarketLaunch { (gogoproto.nullable) = false ]; // min_price_tick_size defines the minimum tick size of the order's price and - // margin + // margin (in human readable format) string min_price_tick_size = 12 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the order's - // quantity + // quantity (in human readable format) string min_quantity_tick_size = 13 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 14 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -563,19 +572,19 @@ message MsgInstantBinaryOptionsMarketLaunch { // Address of the quote currency denomination for the binary options contract string quote_denom = 12; // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market + // required for orders in the market (in human readable format) string min_price_tick_size = 13 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market + // required for orders in the market (in human readable format) string min_quantity_tick_size = 14 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // min_notional defines the minimum notional (in quote asset) required for - // orders in the market + // orders in the market (in human readable format) string min_notional = 15 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -671,7 +680,9 @@ message MsgCreateSpotMarketOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details SpotOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -712,7 +723,9 @@ message MsgCreateDerivativeLimitOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -732,7 +745,9 @@ message MsgCreateBinaryOptionsLimitOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -752,7 +767,9 @@ message MsgBatchCreateDerivativeLimitOrders { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the orders to create repeated DerivativeOrder orders = 2 [ (gogoproto.nullable) = false ]; } @@ -773,10 +790,15 @@ message MsgCancelSpotOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the market ID string market_id = 2; + // the subaccount ID string subaccount_id = 3; + // the order hash (optional) string order_hash = 4; + // the client order ID (optional) string cid = 5; } @@ -828,21 +850,31 @@ message MsgBatchUpdateOrders { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; // subaccount_id only used for the spot_market_ids_to_cancel_all and - // derivative_market_ids_to_cancel_all. + // derivative_market_ids_to_cancel_all (optional) string subaccount_id = 2; + // the market IDs to cancel all spot orders for (optional) repeated string spot_market_ids_to_cancel_all = 3; + // the market IDs to cancel all derivative orders for (optional) repeated string derivative_market_ids_to_cancel_all = 4; + // the spot orders to cancel repeated OrderData spot_orders_to_cancel = 5 [ (gogoproto.nullable) = true ]; + // the derivative orders to cancel repeated OrderData derivative_orders_to_cancel = 6 [ (gogoproto.nullable) = true ]; + // the spot orders to create repeated SpotOrder spot_orders_to_create = 7 [ (gogoproto.nullable) = true ]; + // the derivative orders to create repeated DerivativeOrder derivative_orders_to_create = 8 [ (gogoproto.nullable) = true ]; + // the binary options orders to cancel repeated OrderData binary_options_orders_to_cancel = 9 [ (gogoproto.nullable) = true ]; + // the market IDs to cancel all binary options orders for (optional) repeated string binary_options_market_ids_to_cancel_all = 10; + // the binary options orders to create repeated DerivativeOrder binary_options_orders_to_create = 11 [ (gogoproto.nullable) = true ]; } @@ -872,7 +904,9 @@ message MsgCreateDerivativeMarketOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -918,7 +952,9 @@ message MsgCreateBinaryOptionsMarketOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the order details DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; } @@ -941,11 +977,17 @@ message MsgCancelDerivativeOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the market ID string market_id = 2; + // the subaccount ID string subaccount_id = 3; + // the order hash (optional) string order_hash = 4; - int32 order_mask = 5; // bitwise combination of OrderMask enum values + // the order mask (bitwise combination of OrderMask enum values) (optional) + int32 order_mask = 5; + // the client order ID (optional) string cid = 6; } @@ -960,11 +1002,17 @@ message MsgCancelBinaryOptionsOrder { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the market ID string market_id = 2; + // the subaccount ID string subaccount_id = 3; + // the order hash (optional) string order_hash = 4; - int32 order_mask = 5; // bitwise combination of OrderMask enum values + // the order mask (bitwise combination of OrderMask enum values) (optional) + int32 order_mask = 5; + // the client order ID (optional) string cid = 6; } @@ -973,10 +1021,17 @@ message MsgCancelBinaryOptionsOrder { message MsgCancelBinaryOptionsOrderResponse {} message OrderData { + // the market ID string market_id = 1; + // the subaccount ID string subaccount_id = 2; + // the order hash (optional - either the order_hash or the cid should be + // provided) string order_hash = 3; - int32 order_mask = 4; // bitwise combination of OrderMask enum values + // the order mask (bitwise combination of OrderMask enum values) + int32 order_mask = 4; + // the client order ID (optional - either the order_hash or the cid should be + // provided) string cid = 5; } @@ -1005,9 +1060,13 @@ message MsgSubaccountTransfer { option (amino.name) = "exchange/MsgSubaccountTransfer"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the source subaccount ID string source_subaccount_id = 2; + // the destination subaccount ID string destination_subaccount_id = 3; + // the amount to transfer (in chain format) cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; } @@ -1020,9 +1079,13 @@ message MsgExternalTransfer { option (amino.name) = "exchange/MsgExternalTransfer"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the source subaccount ID string source_subaccount_id = 2; + // the destination subaccount ID string destination_subaccount_id = 3; + // the amount to transfer (in chain format) cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; } @@ -1034,8 +1097,11 @@ message MsgLiquidatePosition { option (amino.name) = "exchange/MsgLiquidatePosition"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID the position belongs to string subaccount_id = 2; + // the position's market ID string market_id = 3; // optional order to provide for liquidation @@ -1050,8 +1116,11 @@ message MsgEmergencySettleMarket { option (amino.name) = "exchange/MsgEmergencySettleMarket"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID string subaccount_id = 2; + // the market ID string market_id = 3; } @@ -1064,11 +1133,16 @@ message MsgIncreasePositionMargin { option (amino.name) = "exchange/MsgIncreasePositionMargin"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID sending the funds string source_subaccount_id = 2; + // the subaccount ID the position belongs to string destination_subaccount_id = 3; + // the market ID string market_id = 4; - // amount defines the amount of margin to add to the position + // amount defines the amount of margin to add to the position (in human + // readable format) string amount = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1085,11 +1159,16 @@ message MsgDecreasePositionMargin { option (amino.name) = "exchange/MsgDecreasePositionMargin"; option (cosmos.msg.v1.signer) = "sender"; + // the sender's Injective address string sender = 1; + // the subaccount ID the position belongs to string source_subaccount_id = 2; + // the destination subaccount ID string destination_subaccount_id = 3; + // the market ID string market_id = 4; - // amount defines the amount of margin to withdraw from the position + // amount defines the amount of margin to withdraw from the position (in human + // readable format) string amount = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -1139,6 +1218,7 @@ message MsgRewardsOptOut { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // the sender's Injective address string sender = 1; } @@ -1183,7 +1263,9 @@ message MsgAdminUpdateBinaryOptionsMarket { option (amino.name) = "exchange/MsgAdminUpdateBinaryOptionsMarket"; option (cosmos.msg.v1.signer) = "sender"; + // The sender's Injective address string sender = 1; + // The market ID string market_id = 2; // new price at which market will be settled string settlement_price = 3 [ @@ -1207,7 +1289,9 @@ message MsgAuthorizeStakeGrants { option (amino.name) = "exchange/MsgAuthorizeStakeGrants"; option (cosmos.msg.v1.signer) = "sender"; + // Injective address of the stake granter string sender = 1; + // list of stake grants to authorize (mandatory) repeated GrantAuthorization grants = 2; } @@ -1218,7 +1302,9 @@ message MsgActivateStakeGrant { option (amino.name) = "exchange/MsgActivateStakeGrant"; option (cosmos.msg.v1.signer) = "sender"; + // Injective address of the stake grantee string sender = 1; + // Injective address of the stake granter string granter = 2; } diff --git a/proto/injective/stream/v1beta1/query.proto b/proto/injective/stream/v1beta1/query.proto index 1803d572..2cade533 100644 --- a/proto/injective/stream/v1beta1/query.proto +++ b/proto/injective/stream/v1beta1/query.proto @@ -12,17 +12,27 @@ option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/str service Stream { rpc Stream(StreamRequest) returns (stream StreamResponse); } message StreamRequest { + // filter for bank balances events BankBalancesFilter bank_balances_filter = 1 [ (gogoproto.nullable) = true ]; + // filter for subaccount deposits events SubaccountDepositsFilter subaccount_deposits_filter = 2 [ (gogoproto.nullable) = true ]; + // filter for spot trades events TradesFilter spot_trades_filter = 3 [ (gogoproto.nullable) = true ]; + // filter for derivative trades events TradesFilter derivative_trades_filter = 4 [ (gogoproto.nullable) = true ]; + // filter for spot orders events OrdersFilter spot_orders_filter = 5 [ (gogoproto.nullable) = true ]; + // filter for derivative orders events OrdersFilter derivative_orders_filter = 6 [ (gogoproto.nullable) = true ]; + // filter for spot orderbooks events OrderbookFilter spot_orderbooks_filter = 7 [ (gogoproto.nullable) = true ]; + // filter for derivative orderbooks events OrderbookFilter derivative_orderbooks_filter = 8 [ (gogoproto.nullable) = true ]; + // filter for positions events PositionsFilter positions_filter = 9 [ (gogoproto.nullable) = true ]; + // filter for oracle prices events OraclePriceFilter oracle_price_filter = 10 [ (gogoproto.nullable) = true ]; } @@ -61,7 +71,9 @@ message BankBalance { } message SubaccountDeposits { + // the subaccount ID string subaccount_id = 1; + // the deposits details repeated SubaccountDeposit deposits = 2 [ (gogoproto.nullable) = false ]; } @@ -99,28 +111,38 @@ message DerivativeOrderUpdate { } message DerivativeOrder { + // the market ID string market_id = 1; + // the derivative order details injective.exchange.v1beta1.DerivativeLimitOrder order = 2 [ (gogoproto.nullable) = false ]; + // whether the order is a market order bool is_market = 3; } message Position { + // the market ID string market_id = 1; + // the subaccount ID string subaccount_id = 2; + // whether the position is long or short bool isLong = 3; + // the quantity of the position string quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the entry price of the position string entry_price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the margin of the position string margin = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the cumulative funding entry of the position string cumulative_funding_entry = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -137,47 +159,67 @@ message OraclePrice { } message SpotTrade { + // the market ID string market_id = 1; + // whether the trade is a buy or sell bool is_buy = 2; + // the execution type string executionType = 3; - + // the quantity of the trade string quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the price of the trade string price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // bytes32 subaccount ID that executed the trade + // the subaccount ID that executed the trade string subaccount_id = 6; + // the fee of the trade string fee = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the order hash string order_hash = 8; + // the fee recipient address string fee_recipient_address = 9 [ (gogoproto.nullable) = true ]; + // the client order ID string cid = 10; + // the trade ID string trade_id = 11; } message DerivativeTrade { + // the market ID string market_id = 1; + // whether the trade is a buy or sell bool is_buy = 2; + // the execution type string executionType = 3; + // the subaccount ID string subaccount_id = 4; + // the position delta of the trade injective.exchange.v1beta1.PositionDelta position_delta = 5; + // the payout of the trade string payout = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the fee of the trade string fee = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the order hash string order_hash = 8; + // the fee recipient address string fee_recipient_address = 9 [ (gogoproto.nullable) = true ]; + // the client order ID string cid = 10; + // the trade ID string trade_id = 11; } diff --git a/proto/injective/stream/v2/query.proto b/proto/injective/stream/v2/query.proto index f9b4a9f8..449f39c6 100644 --- a/proto/injective/stream/v2/query.proto +++ b/proto/injective/stream/v2/query.proto @@ -13,49 +13,79 @@ option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/str service Stream { rpc StreamV2(StreamRequest) returns (stream StreamResponse); } message StreamRequest { + // filter for bank balances events BankBalancesFilter bank_balances_filter = 1 [ (gogoproto.nullable) = true ]; + // filter for subaccount deposits events SubaccountDepositsFilter subaccount_deposits_filter = 2 [ (gogoproto.nullable) = true ]; + // filter for spot trades events TradesFilter spot_trades_filter = 3 [ (gogoproto.nullable) = true ]; + // filter for derivative trades events TradesFilter derivative_trades_filter = 4 [ (gogoproto.nullable) = true ]; + // filter for spot orders events OrdersFilter spot_orders_filter = 5 [ (gogoproto.nullable) = true ]; + // filter for derivative orders events OrdersFilter derivative_orders_filter = 6 [ (gogoproto.nullable) = true ]; + // filter for spot orderbooks events OrderbookFilter spot_orderbooks_filter = 7 [ (gogoproto.nullable) = true ]; + // filter for derivative orderbooks events OrderbookFilter derivative_orderbooks_filter = 8 [ (gogoproto.nullable) = true ]; + // filter for positions events PositionsFilter positions_filter = 9 [ (gogoproto.nullable) = true ]; + // filter for oracle prices events OraclePriceFilter oracle_price_filter = 10 [ (gogoproto.nullable) = true ]; } message StreamResponse { + // the block height uint64 block_height = 1; + // the block time int64 block_time = 2; + // list of bank balances updates repeated BankBalance bank_balances = 3; + // list of subaccount deposits updates repeated SubaccountDeposits subaccount_deposits = 4; + // list of spot trades updates repeated SpotTrade spot_trades = 5; + // list of derivative trades updates repeated DerivativeTrade derivative_trades = 6; + // list of spot orders updates repeated SpotOrderUpdate spot_orders = 7; + // list of derivative orders updates repeated DerivativeOrderUpdate derivative_orders = 8; + // list of spot orderbook updates repeated OrderbookUpdate spot_orderbook_updates = 9; + // list of derivative orderbook updates repeated OrderbookUpdate derivative_orderbook_updates = 10; + // list of positions updates repeated Position positions = 11; + // list of oracle prices updates repeated OraclePrice oracle_prices = 12; + // the current gas price when the block was processed (in chain format) string gas_price = 13; } message OrderbookUpdate { + // the sequence number of the orderbook update uint64 seq = 1; + // the orderbook details Orderbook orderbook = 2; } message Orderbook { + // the market ID string market_id = 1; + // list of buy levels repeated injective.exchange.v2.Level buy_levels = 2; + // list of sell levels repeated injective.exchange.v2.Level sell_levels = 3; } message BankBalance { + // the account address string account = 1; + // list of account balances repeated cosmos.base.v1beta1.Coin balances = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" @@ -63,7 +93,9 @@ message BankBalance { } message SubaccountDeposits { + // the subaccount ID string subaccount_id = 1; + // the deposits details repeated SubaccountDeposit deposits = 2 [ (gogoproto.nullable) = false ]; } @@ -80,48 +112,68 @@ enum OrderUpdateStatus { } message SpotOrderUpdate { + // the status of the order OrderUpdateStatus status = 1; + // the order hash string order_hash = 2; + // the client order ID string cid = 3; + // the order details SpotOrder order = 4; } message SpotOrder { + // the market ID string market_id = 1; + // the order details injective.exchange.v2.SpotLimitOrder order = 2 [ (gogoproto.nullable) = false ]; } message DerivativeOrderUpdate { + // the status of the order OrderUpdateStatus status = 1; + // the order hash string order_hash = 2; + // the client order ID string cid = 3; + // the order details DerivativeOrder order = 4; } message DerivativeOrder { + // the market ID string market_id = 1; + // the order details injective.exchange.v2.DerivativeLimitOrder order = 2 [ (gogoproto.nullable) = false ]; + // whether the order is a market order bool is_market = 3; } message Position { + // the market ID string market_id = 1; + // the subaccount ID string subaccount_id = 2; + // whether the position is long or short bool isLong = 3; + // the quantity of the position (in human readable format) string quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the entry price of the position (in human readable format) string entry_price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the margin of the position (in human readable format) string margin = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the cumulative funding entry of the position (in human readable format) string cumulative_funding_entry = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false @@ -129,78 +181,119 @@ message Position { } message OraclePrice { + // the symbol of the oracle price string symbol = 1; + // the updated price string price = 2 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the oracle type string type = 3; } message SpotTrade { + // the market ID string market_id = 1; + // whether the trade is a buy or sell bool is_buy = 2; + // the execution type string executionType = 3; - + // the quantity of the trade (in human readable format) string quantity = 4 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the price of the trade (in human readable format) string price = 5 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - // bytes32 subaccount ID that executed the trade + // the subaccount ID that executed the trade string subaccount_id = 6; + // the fee of the trade (in human readable format) string fee = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the order hash string order_hash = 8; + // the fee recipient address string fee_recipient_address = 9 [ (gogoproto.nullable) = true ]; + // the client order ID string cid = 10; + // the trade ID string trade_id = 11; } message DerivativeTrade { + // the market ID string market_id = 1; + // whether the trade is a buy or sell bool is_buy = 2; + // the execution type string executionType = 3; + // the subaccount ID string subaccount_id = 4; + // the position delta of the trade (in human readable format) injective.exchange.v2.PositionDelta position_delta = 5; + // the payout of the trade (in human readable format) string payout = 6 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the fee of the trade (in human readable format) string fee = 7 [ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + // the order hash string order_hash = 8; + // the fee recipient address string fee_recipient_address = 9 [ (gogoproto.nullable) = true ]; + // the client order ID string cid = 10; + // the trade ID string trade_id = 11; } message TradesFilter { + // list of subaccount IDs to filter by repeated string subaccount_ids = 1; + // list of market IDs to filter by repeated string market_ids = 2; } message PositionsFilter { + // list of subaccount IDs to filter by repeated string subaccount_ids = 1; + // list of market IDs to filter by repeated string market_ids = 2; } message OrdersFilter { + // list of subaccount IDs to filter by repeated string subaccount_ids = 1; + // list of market IDs to filter by repeated string market_ids = 2; } -message OrderbookFilter { repeated string market_ids = 1; } +message OrderbookFilter { + // list of market IDs to filter by + repeated string market_ids = 1; +} -message BankBalancesFilter { repeated string accounts = 1; } +message BankBalancesFilter { + // list of account addresses to filter by + repeated string accounts = 1; +} -message SubaccountDepositsFilter { repeated string subaccount_ids = 1; } +message SubaccountDepositsFilter { + // list of subaccount IDs to filter by + repeated string subaccount_ids = 1; +} -message OraclePriceFilter { repeated string symbol = 1; } +message OraclePriceFilter { + // list of symbol to filter by + repeated string symbol = 1; +}