Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func FillAmountToQuoteQuantums(subticks Subticks, baseQuantums satypes.BaseQuantums, ...) (bigNotional *big.Int)
- func GetAveragePriceSubticks(bigQuoteQuantums *big.Int, bigBaseQuantums *big.Int, ...) (bigSubticks *big.Rat)
- func GetInternalOperationsQueueTextString(operations []InternalOperation) string
- func IsSupportedClobPairStatus(clobPairStatus ClobPair_Status) bool
- func IsSupportedClobPairStatusTransition(from ClobPair_Status, to ClobPair_Status) bool
- func MustSortAndHaveNoDuplicates(orderIds []OrderId)
- func NewCreateMatchEvent(taker satypes.SubaccountId, maker satypes.SubaccountId, takerOrderFee *big.Int, ...) sdk.Event
- func NotionalToCoinAmount(notionalQuoteQuantums *big.Int, quoteAtomicResolution int32, denomExp int32, ...) *big.Rat
- func PnlPriceToSubticks(marketPrice pricestypes.MarketPrice, clobPair ClobPair, ...) (ratSubticks *big.Rat)
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func SpotPriceToSubticks(marketPrice pricestypes.MarketPrice, clobPair ClobPair, ...) (ratSubticks *big.Rat)
- func SubticksToPrice(subticks Subticks, marketPriceExponent int32, clobPair ClobPair, ...) (price uint64)
- type AccountKeeper
- type AddOrderToOrderbookCollateralizationCheckFn
- type AssetsKeeper
- type BankKeeper
- type BlockRateLimitConfiguration
- func (*BlockRateLimitConfiguration) Descriptor() ([]byte, []int)
- func (m *BlockRateLimitConfiguration) GetMaxShortTermOrderCancellationsPerNBlocks() []MaxPerNBlocksRateLimitdeprecated
- func (m *BlockRateLimitConfiguration) GetMaxShortTermOrdersAndCancelsPerNBlocks() []MaxPerNBlocksRateLimit
- func (m *BlockRateLimitConfiguration) GetMaxShortTermOrdersPerNBlocks() []MaxPerNBlocksRateLimitdeprecated
- func (m *BlockRateLimitConfiguration) GetMaxStatefulOrdersPerNBlocks() []MaxPerNBlocksRateLimit
- func (m *BlockRateLimitConfiguration) Marshal() (dAtA []byte, err error)
- func (m *BlockRateLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockRateLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockRateLimitConfiguration) ProtoMessage()
- func (m *BlockRateLimitConfiguration) Reset()
- func (m *BlockRateLimitConfiguration) Size() (n int)
- func (m *BlockRateLimitConfiguration) String() string
- func (m *BlockRateLimitConfiguration) Unmarshal(dAtA []byte) error
- func (lc BlockRateLimitConfiguration) Validate() error
- func (m *BlockRateLimitConfiguration) XXX_DiscardUnknown()
- func (m *BlockRateLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockRateLimitConfiguration) XXX_Merge(src proto.Message)
- func (m *BlockRateLimitConfiguration) XXX_Size() int
- func (m *BlockRateLimitConfiguration) XXX_Unmarshal(b []byte) error
- type BlockTimeKeeper
- type ClobKeeper
- type ClobMatch
- func (*ClobMatch) Descriptor() ([]byte, []int)
- func (m *ClobMatch) GetMatch() isClobMatch_Match
- func (m *ClobMatch) GetMatchOrders() *MatchOrders
- func (m *ClobMatch) GetMatchPerpetualDeleveraging() *MatchPerpetualDeleveraging
- func (m *ClobMatch) GetMatchPerpetualLiquidation() *MatchPerpetualLiquidation
- func (m *ClobMatch) Marshal() (dAtA []byte, err error)
- func (m *ClobMatch) MarshalTo(dAtA []byte) (int, error)
- func (m *ClobMatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClobMatch) ProtoMessage()
- func (m *ClobMatch) Reset()
- func (m *ClobMatch) Size() (n int)
- func (m *ClobMatch) String() string
- func (m *ClobMatch) Unmarshal(dAtA []byte) error
- func (m *ClobMatch) XXX_DiscardUnknown()
- func (m *ClobMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClobMatch) XXX_Merge(src proto.Message)
- func (*ClobMatch) XXX_OneofWrappers() []interface{}
- func (m *ClobMatch) XXX_Size() int
- func (m *ClobMatch) XXX_Unmarshal(b []byte) error
- type ClobMatch_MatchOrders
- type ClobMatch_MatchPerpetualDeleveraging
- type ClobMatch_MatchPerpetualLiquidation
- type ClobMetadata
- type ClobMidPrice
- func (*ClobMidPrice) Descriptor() ([]byte, []int)
- func (m *ClobMidPrice) GetClobPair() ClobPair
- func (m *ClobMidPrice) GetSubticks() uint64
- func (m *ClobMidPrice) Marshal() (dAtA []byte, err error)
- func (m *ClobMidPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *ClobMidPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClobMidPrice) ProtoMessage()
- func (m *ClobMidPrice) Reset()
- func (m *ClobMidPrice) Size() (n int)
- func (m *ClobMidPrice) String() string
- func (m *ClobMidPrice) Unmarshal(dAtA []byte) error
- func (m *ClobMidPrice) XXX_DiscardUnknown()
- func (m *ClobMidPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClobMidPrice) XXX_Merge(src proto.Message)
- func (m *ClobMidPrice) XXX_Size() int
- func (m *ClobMidPrice) XXX_Unmarshal(b []byte) error
- type ClobOrder
- type ClobPair
- func (*ClobPair) Descriptor() ([]byte, []int)
- func (c *ClobPair) GetClobPairId() ClobPairId
- func (c *ClobPair) GetClobPairMinOrderBaseQuantums() satypes.BaseQuantums
- func (c *ClobPair) GetClobPairSubticksPerTick() SubticksPerTick
- func (m *ClobPair) GetId() uint32
- func (m *ClobPair) GetMetadata() isClobPair_Metadata
- func (m *ClobPair) GetPerpetualClobMetadata() *PerpetualClobMetadata
- func (c *ClobPair) GetPerpetualId() (uint32, error)
- func (m *ClobPair) GetQuantumConversionExponent() int32
- func (m *ClobPair) GetSpotClobMetadata() *SpotClobMetadata
- func (m *ClobPair) GetStatus() ClobPair_Status
- func (m *ClobPair) GetStepBaseQuantums() uint64
- func (m *ClobPair) GetSubticksPerTick() uint32
- func (m *ClobPair) Marshal() (dAtA []byte, err error)
- func (m *ClobPair) MarshalTo(dAtA []byte) (int, error)
- func (m *ClobPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (c *ClobPair) MustGetPerpetualId() uint32
- func (*ClobPair) ProtoMessage()
- func (m *ClobPair) Reset()
- func (m *ClobPair) Size() (n int)
- func (m *ClobPair) String() string
- func (m *ClobPair) Unmarshal(dAtA []byte) error
- func (c *ClobPair) Validate() error
- func (m *ClobPair) XXX_DiscardUnknown()
- func (m *ClobPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClobPair) XXX_Merge(src proto.Message)
- func (*ClobPair) XXX_OneofWrappers() []interface{}
- func (m *ClobPair) XXX_Size() int
- func (m *ClobPair) XXX_Unmarshal(b []byte) error
- type ClobPairId
- type ClobPair_PerpetualClobMetadata
- type ClobPair_SpotClobMetadata
- type ClobPair_Status
- type ConditionalOrderPlacement
- func (*ConditionalOrderPlacement) Descriptor() ([]byte, []int)
- func (m *ConditionalOrderPlacement) GetOrder() Order
- func (m *ConditionalOrderPlacement) GetPlacementIndex() TransactionOrdering
- func (orderPlacement *ConditionalOrderPlacement) GetTransactionIndex() TransactionOrdering
- func (m *ConditionalOrderPlacement) GetTriggerIndex() *TransactionOrdering
- func (m *ConditionalOrderPlacement) Marshal() (dAtA []byte, err error)
- func (m *ConditionalOrderPlacement) MarshalTo(dAtA []byte) (int, error)
- func (m *ConditionalOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConditionalOrderPlacement) ProtoMessage()
- func (m *ConditionalOrderPlacement) Reset()
- func (m *ConditionalOrderPlacement) Size() (n int)
- func (m *ConditionalOrderPlacement) String() string
- func (m *ConditionalOrderPlacement) Unmarshal(dAtA []byte) error
- func (m *ConditionalOrderPlacement) XXX_DiscardUnknown()
- func (m *ConditionalOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConditionalOrderPlacement) XXX_Merge(src proto.Message)
- func (m *ConditionalOrderPlacement) XXX_Size() int
- func (m *ConditionalOrderPlacement) XXX_Unmarshal(b []byte) error
- type EquityTierLimit
- func (*EquityTierLimit) Descriptor() ([]byte, []int)
- func (m *EquityTierLimit) GetLimit() uint32
- func (m *EquityTierLimit) Marshal() (dAtA []byte, err error)
- func (m *EquityTierLimit) MarshalTo(dAtA []byte) (int, error)
- func (m *EquityTierLimit) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EquityTierLimit) ProtoMessage()
- func (m *EquityTierLimit) Reset()
- func (m *EquityTierLimit) Size() (n int)
- func (m *EquityTierLimit) String() string
- func (m *EquityTierLimit) Unmarshal(dAtA []byte) error
- func (m *EquityTierLimit) XXX_DiscardUnknown()
- func (m *EquityTierLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EquityTierLimit) XXX_Merge(src proto.Message)
- func (m *EquityTierLimit) XXX_Size() int
- func (m *EquityTierLimit) XXX_Unmarshal(b []byte) error
- type EquityTierLimitConfiguration
- func (*EquityTierLimitConfiguration) Descriptor() ([]byte, []int)
- func (m *EquityTierLimitConfiguration) GetShortTermOrderEquityTiers() []EquityTierLimit
- func (m *EquityTierLimitConfiguration) GetStatefulOrderEquityTiers() []EquityTierLimit
- func (lc EquityTierLimitConfiguration) Initialize()
- func (m *EquityTierLimitConfiguration) Marshal() (dAtA []byte, err error)
- func (m *EquityTierLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *EquityTierLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EquityTierLimitConfiguration) ProtoMessage()
- func (m *EquityTierLimitConfiguration) Reset()
- func (m *EquityTierLimitConfiguration) Size() (n int)
- func (m *EquityTierLimitConfiguration) String() string
- func (m *EquityTierLimitConfiguration) Unmarshal(dAtA []byte) error
- func (lc EquityTierLimitConfiguration) Validate() error
- func (m *EquityTierLimitConfiguration) XXX_DiscardUnknown()
- func (m *EquityTierLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EquityTierLimitConfiguration) XXX_Merge(src proto.Message)
- func (m *EquityTierLimitConfiguration) XXX_Size() int
- func (m *EquityTierLimitConfiguration) XXX_Unmarshal(b []byte) error
- type FeeTiersKeeper
- type FillType
- type FillablePriceConfig
- func (*FillablePriceConfig) Descriptor() ([]byte, []int)
- func (m *FillablePriceConfig) GetBankruptcyAdjustmentPpm() uint32
- func (m *FillablePriceConfig) GetSpreadToMaintenanceMarginRatioPpm() uint32
- func (m *FillablePriceConfig) Marshal() (dAtA []byte, err error)
- func (m *FillablePriceConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *FillablePriceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FillablePriceConfig) ProtoMessage()
- func (m *FillablePriceConfig) Reset()
- func (m *FillablePriceConfig) Size() (n int)
- func (m *FillablePriceConfig) String() string
- func (m *FillablePriceConfig) Unmarshal(dAtA []byte) error
- func (m *FillablePriceConfig) XXX_DiscardUnknown()
- func (m *FillablePriceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FillablePriceConfig) XXX_Merge(src proto.Message)
- func (m *FillablePriceConfig) XXX_Size() int
- func (m *FillablePriceConfig) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetBlockRateLimitConfig() BlockRateLimitConfiguration
- func (m *GenesisState) GetClobPairs() []ClobPair
- func (m *GenesisState) GetEquityTierLimitConfig() EquityTierLimitConfiguration
- func (m *GenesisState) GetLiquidationsConfig() LiquidationsConfig
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type GetStatePositionFn
- type InternalOperation
- func NewMatchOrdersInternalOperation(takerOrder Order, makerFills []MakerFill) InternalOperation
- func NewMatchPerpetualDeleveragingInternalOperation(liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, ...) InternalOperation
- func NewMatchPerpetualLiquidationInternalOperation(takerLiquidationOrder MatchableOrder, makerFills []MakerFill) InternalOperation
- func NewOrderRemovalInternalOperation(orderId OrderId, removalReason OrderRemoval_RemovalReason) InternalOperation
- func NewPreexistingStatefulOrderPlacementInternalOperation(order Order) InternalOperation
- func NewShortTermOrderPlacementInternalOperation(order Order) InternalOperation
- func ValidateAndTransformRawOperations(ctx sdk.Context, rawOperations []OperationRaw, decoder sdk.TxDecoder, ...) ([]InternalOperation, error)
- func (*InternalOperation) Descriptor() ([]byte, []int)
- func (o *InternalOperation) GetInternalOperationTextString() string
- func (m *InternalOperation) GetMatch() *ClobMatch
- func (m *InternalOperation) GetOperation() isInternalOperation_Operation
- func (m *InternalOperation) GetOrderRemoval() *OrderRemoval
- func (m *InternalOperation) GetPreexistingStatefulOrder() *OrderId
- func (m *InternalOperation) GetShortTermOrderPlacement() *MsgPlaceOrder
- func (m *InternalOperation) Marshal() (dAtA []byte, err error)
- func (m *InternalOperation) MarshalTo(dAtA []byte) (int, error)
- func (m *InternalOperation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InternalOperation) ProtoMessage()
- func (m *InternalOperation) Reset()
- func (m *InternalOperation) Size() (n int)
- func (m *InternalOperation) String() string
- func (m *InternalOperation) Unmarshal(dAtA []byte) error
- func (m *InternalOperation) XXX_DiscardUnknown()
- func (m *InternalOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InternalOperation) XXX_Merge(src proto.Message)
- func (*InternalOperation) XXX_OneofWrappers() []interface{}
- func (m *InternalOperation) XXX_Size() int
- func (m *InternalOperation) XXX_Unmarshal(b []byte) error
- type InternalOperation_Match
- type InternalOperation_OrderRemoval
- type InternalOperation_PreexistingStatefulOrder
- type InternalOperation_ShortTermOrderPlacement
- type Level
- type LevelOrder
- type LiquidationOrder
- func (lo *LiquidationOrder) GetBaseQuantums() satypes.BaseQuantums
- func (lo *LiquidationOrder) GetClobPairId() ClobPairId
- func (o *LiquidationOrder) GetDeltaQuantums() *big.Int
- func (lo *LiquidationOrder) GetOrderHash() OrderHash
- func (lo *LiquidationOrder) GetOrderSubticks() Subticks
- func (lo *LiquidationOrder) GetSubaccountId() satypes.SubaccountId
- func (lo *LiquidationOrder) IsBuy() bool
- func (lo *LiquidationOrder) IsLiquidation() bool
- func (o *LiquidationOrder) IsReduceOnly() bool
- func (lo *LiquidationOrder) MustGetLiquidatedPerpetualId() uint32
- func (lo *LiquidationOrder) MustGetOrder() Order
- type LiquidationsConfig
- func (*LiquidationsConfig) Descriptor() ([]byte, []int)
- func (m *LiquidationsConfig) GetFillablePriceConfig() FillablePriceConfig
- func (m *LiquidationsConfig) GetInsuranceFundFeePpm() uint32
- func (m *LiquidationsConfig) GetLiquidityFeePpm() uint32
- func (m *LiquidationsConfig) GetMaxCumulativeInsuranceFundDelta() uint64
- func (m *LiquidationsConfig) GetValidatorFeePpm() uint32
- func (m *LiquidationsConfig) Marshal() (dAtA []byte, err error)
- func (m *LiquidationsConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *LiquidationsConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LiquidationsConfig) ProtoMessage()
- func (m *LiquidationsConfig) Reset()
- func (m *LiquidationsConfig) Size() (n int)
- func (m *LiquidationsConfig) String() string
- func (m *LiquidationsConfig) Unmarshal(dAtA []byte) error
- func (lc *LiquidationsConfig) Validate() error
- func (m *LiquidationsConfig) XXX_DiscardUnknown()
- func (m *LiquidationsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiquidationsConfig) XXX_Merge(src proto.Message)
- func (m *LiquidationsConfig) XXX_Size() int
- func (m *LiquidationsConfig) XXX_Unmarshal(b []byte) error
- type LiquidationsConfigKeeper
- type LiquidationsKeeper
- type LongTermOrderPlacement
- func (*LongTermOrderPlacement) Descriptor() ([]byte, []int)
- func (m *LongTermOrderPlacement) GetOrder() Order
- func (m *LongTermOrderPlacement) GetPlacementIndex() TransactionOrdering
- func (orderPlacement *LongTermOrderPlacement) GetTransactionIndex() TransactionOrdering
- func (m *LongTermOrderPlacement) Marshal() (dAtA []byte, err error)
- func (m *LongTermOrderPlacement) MarshalTo(dAtA []byte) (int, error)
- func (m *LongTermOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LongTermOrderPlacement) ProtoMessage()
- func (m *LongTermOrderPlacement) Reset()
- func (m *LongTermOrderPlacement) Size() (n int)
- func (m *LongTermOrderPlacement) String() string
- func (m *LongTermOrderPlacement) Unmarshal(dAtA []byte) error
- func (m *LongTermOrderPlacement) XXX_DiscardUnknown()
- func (m *LongTermOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LongTermOrderPlacement) XXX_Merge(src proto.Message)
- func (m *LongTermOrderPlacement) XXX_Size() int
- func (m *LongTermOrderPlacement) XXX_Unmarshal(b []byte) error
- type MEVDatapoint
- type MEVLiquidationMatch
- func (*MEVLiquidationMatch) Descriptor() ([]byte, []int)
- func (m *MEVLiquidationMatch) GetClobPairId() uint32
- func (m *MEVLiquidationMatch) GetFillAmount() uint64
- func (m *MEVLiquidationMatch) GetInsuranceFundDeltaQuoteQuantums() int64
- func (m *MEVLiquidationMatch) GetLiquidatedSubaccountId() types.SubaccountId
- func (m *MEVLiquidationMatch) GetLiquidityFeeQuoteQuantums() int64
- func (m *MEVLiquidationMatch) GetMakerFeePpm() int32
- func (m *MEVLiquidationMatch) GetMakerOrderIsBuy() bool
- func (m *MEVLiquidationMatch) GetMakerOrderSubaccountId() types.SubaccountId
- func (m *MEVLiquidationMatch) GetMakerOrderSubticks() uint64
- func (m *MEVLiquidationMatch) GetValidatorFeeQuoteQuantums() int64
- func (m *MEVLiquidationMatch) Marshal() (dAtA []byte, err error)
- func (m *MEVLiquidationMatch) MarshalTo(dAtA []byte) (int, error)
- func (m *MEVLiquidationMatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MEVLiquidationMatch) ProtoMessage()
- func (m *MEVLiquidationMatch) Reset()
- func (m *MEVLiquidationMatch) Size() (n int)
- func (m *MEVLiquidationMatch) String() string
- func (m *MEVLiquidationMatch) Unmarshal(dAtA []byte) error
- func (m *MEVLiquidationMatch) XXX_DiscardUnknown()
- func (m *MEVLiquidationMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MEVLiquidationMatch) XXX_Merge(src proto.Message)
- func (m *MEVLiquidationMatch) XXX_Size() int
- func (m *MEVLiquidationMatch) XXX_Unmarshal(b []byte) error
- type MEVMatch
- func (*MEVMatch) Descriptor() ([]byte, []int)
- func (m *MEVMatch) GetClobPairId() uint32
- func (m *MEVMatch) GetFillAmount() uint64
- func (m *MEVMatch) GetMakerFeePpm() int32
- func (m *MEVMatch) GetMakerOrderIsBuy() bool
- func (m *MEVMatch) GetMakerOrderSubaccountId() *types.SubaccountId
- func (m *MEVMatch) GetMakerOrderSubticks() uint64
- func (m *MEVMatch) GetTakerFeePpm() int32
- func (m *MEVMatch) GetTakerOrderSubaccountId() *types.SubaccountId
- func (m *MEVMatch) Marshal() (dAtA []byte, err error)
- func (m *MEVMatch) MarshalTo(dAtA []byte) (int, error)
- func (m *MEVMatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MEVMatch) ProtoMessage()
- func (m *MEVMatch) Reset()
- func (m *MEVMatch) Size() (n int)
- func (m *MEVMatch) String() string
- func (m *MEVMatch) Unmarshal(dAtA []byte) error
- func (m *MEVMatch) XXX_DiscardUnknown()
- func (m *MEVMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MEVMatch) XXX_Merge(src proto.Message)
- func (m *MEVMatch) XXX_Size() int
- func (m *MEVMatch) XXX_Unmarshal(b []byte) error
- type MakerFill
- func (*MakerFill) Descriptor() ([]byte, []int)
- func (m *MakerFill) GetFillAmount() uint64
- func (m *MakerFill) GetMakerOrderId() OrderId
- func (m *MakerFill) Marshal() (dAtA []byte, err error)
- func (m *MakerFill) MarshalTo(dAtA []byte) (int, error)
- func (m *MakerFill) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MakerFill) ProtoMessage()
- func (m *MakerFill) Reset()
- func (m *MakerFill) Size() (n int)
- func (m *MakerFill) String() string
- func (m *MakerFill) Unmarshal(dAtA []byte) error
- func (m *MakerFill) XXX_DiscardUnknown()
- func (m *MakerFill) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MakerFill) XXX_Merge(src proto.Message)
- func (m *MakerFill) XXX_Size() int
- func (m *MakerFill) XXX_Unmarshal(b []byte) error
- type MakerFillWithOrder
- type MatchOrders
- func (*MatchOrders) Descriptor() ([]byte, []int)
- func (m *MatchOrders) GetFills() []MakerFill
- func (m *MatchOrders) GetMakerSubaccountIds() []satypes.SubaccountId
- func (m *MatchOrders) GetTakerOrderId() OrderId
- func (m *MatchOrders) Marshal() (dAtA []byte, err error)
- func (m *MatchOrders) MarshalTo(dAtA []byte) (int, error)
- func (m *MatchOrders) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MatchOrders) ProtoMessage()
- func (m *MatchOrders) Reset()
- func (m *MatchOrders) Size() (n int)
- func (m *MatchOrders) String() string
- func (m *MatchOrders) Unmarshal(dAtA []byte) error
- func (m *MatchOrders) XXX_DiscardUnknown()
- func (m *MatchOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchOrders) XXX_Merge(src proto.Message)
- func (m *MatchOrders) XXX_Size() int
- func (m *MatchOrders) XXX_Unmarshal(b []byte) error
- type MatchPerpetualDeleveraging
- func (*MatchPerpetualDeleveraging) Descriptor() ([]byte, []int)
- func (m *MatchPerpetualDeleveraging) GetFills() []MatchPerpetualDeleveraging_Fill
- func (m *MatchPerpetualDeleveraging) GetIsFinalSettlement() bool
- func (m *MatchPerpetualDeleveraging) GetLiquidated() types.SubaccountId
- func (m *MatchPerpetualDeleveraging) GetPerpetualId() uint32
- func (m *MatchPerpetualDeleveraging) GetTotalFilledQuantums() *big.Int
- func (m *MatchPerpetualDeleveraging) Marshal() (dAtA []byte, err error)
- func (m *MatchPerpetualDeleveraging) MarshalTo(dAtA []byte) (int, error)
- func (m *MatchPerpetualDeleveraging) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MatchPerpetualDeleveraging) ProtoMessage()
- func (m *MatchPerpetualDeleveraging) Reset()
- func (m *MatchPerpetualDeleveraging) Size() (n int)
- func (m *MatchPerpetualDeleveraging) String() string
- func (m *MatchPerpetualDeleveraging) Unmarshal(dAtA []byte) error
- func (match *MatchPerpetualDeleveraging) Validate() error
- func (m *MatchPerpetualDeleveraging) XXX_DiscardUnknown()
- func (m *MatchPerpetualDeleveraging) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchPerpetualDeleveraging) XXX_Merge(src proto.Message)
- func (m *MatchPerpetualDeleveraging) XXX_Size() int
- func (m *MatchPerpetualDeleveraging) XXX_Unmarshal(b []byte) error
- type MatchPerpetualDeleveraging_Fill
- func (*MatchPerpetualDeleveraging_Fill) Descriptor() ([]byte, []int)
- func (m *MatchPerpetualDeleveraging_Fill) GetFillAmount() uint64
- func (m *MatchPerpetualDeleveraging_Fill) GetOffsettingSubaccountId() types.SubaccountId
- func (m *MatchPerpetualDeleveraging_Fill) Marshal() (dAtA []byte, err error)
- func (m *MatchPerpetualDeleveraging_Fill) MarshalTo(dAtA []byte) (int, error)
- func (m *MatchPerpetualDeleveraging_Fill) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MatchPerpetualDeleveraging_Fill) ProtoMessage()
- func (m *MatchPerpetualDeleveraging_Fill) Reset()
- func (m *MatchPerpetualDeleveraging_Fill) Size() (n int)
- func (m *MatchPerpetualDeleveraging_Fill) String() string
- func (m *MatchPerpetualDeleveraging_Fill) Unmarshal(dAtA []byte) error
- func (m *MatchPerpetualDeleveraging_Fill) XXX_DiscardUnknown()
- func (m *MatchPerpetualDeleveraging_Fill) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchPerpetualDeleveraging_Fill) XXX_Merge(src proto.Message)
- func (m *MatchPerpetualDeleveraging_Fill) XXX_Size() int
- func (m *MatchPerpetualDeleveraging_Fill) XXX_Unmarshal(b []byte) error
- type MatchPerpetualLiquidation
- func (*MatchPerpetualLiquidation) Descriptor() ([]byte, []int)
- func (m *MatchPerpetualLiquidation) GetClobPairId() uint32
- func (m *MatchPerpetualLiquidation) GetFills() []MakerFill
- func (m *MatchPerpetualLiquidation) GetIsBuy() bool
- func (m *MatchPerpetualLiquidation) GetLiquidated() types.SubaccountId
- func (m *MatchPerpetualLiquidation) GetMakerSubaccountIds() []satypes.SubaccountId
- func (m MatchPerpetualLiquidation) GetMetricLabels() []gometrics.Label
- func (m *MatchPerpetualLiquidation) GetPerpetualId() uint32
- func (m *MatchPerpetualLiquidation) GetTotalSize() uint64
- func (m *MatchPerpetualLiquidation) Marshal() (dAtA []byte, err error)
- func (m *MatchPerpetualLiquidation) MarshalTo(dAtA []byte) (int, error)
- func (m *MatchPerpetualLiquidation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MatchPerpetualLiquidation) ProtoMessage()
- func (m *MatchPerpetualLiquidation) Reset()
- func (m *MatchPerpetualLiquidation) Size() (n int)
- func (m *MatchPerpetualLiquidation) String() string
- func (m *MatchPerpetualLiquidation) Unmarshal(dAtA []byte) error
- func (m *MatchPerpetualLiquidation) XXX_DiscardUnknown()
- func (m *MatchPerpetualLiquidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchPerpetualLiquidation) XXX_Merge(src proto.Message)
- func (m *MatchPerpetualLiquidation) XXX_Size() int
- func (m *MatchPerpetualLiquidation) XXX_Unmarshal(b []byte) error
- type MatchWithOrders
- type MatchableOrder
- type MaxPerNBlocksRateLimit
- func (*MaxPerNBlocksRateLimit) Descriptor() ([]byte, []int)
- func (m *MaxPerNBlocksRateLimit) GetLimit() uint32
- func (m *MaxPerNBlocksRateLimit) GetNumBlocks() uint32
- func (m *MaxPerNBlocksRateLimit) Marshal() (dAtA []byte, err error)
- func (m *MaxPerNBlocksRateLimit) MarshalTo(dAtA []byte) (int, error)
- func (m *MaxPerNBlocksRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MaxPerNBlocksRateLimit) ProtoMessage()
- func (m *MaxPerNBlocksRateLimit) Reset()
- func (m *MaxPerNBlocksRateLimit) Size() (n int)
- func (m *MaxPerNBlocksRateLimit) String() string
- func (m *MaxPerNBlocksRateLimit) Unmarshal(dAtA []byte) error
- func (m *MaxPerNBlocksRateLimit) XXX_DiscardUnknown()
- func (m *MaxPerNBlocksRateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MaxPerNBlocksRateLimit) XXX_Merge(src proto.Message)
- func (m *MaxPerNBlocksRateLimit) XXX_Size() int
- func (m *MaxPerNBlocksRateLimit) XXX_Unmarshal(b []byte) error
- type MemClob
- type MemClobKeeper
- type MevMetrics
- type MevNodeToNodeCalculationRequest
- func (*MevNodeToNodeCalculationRequest) Descriptor() ([]byte, []int)
- func (m *MevNodeToNodeCalculationRequest) GetBlockProposerMatches() *ValidatorMevMatches
- func (m *MevNodeToNodeCalculationRequest) GetValidatorMevMetrics() *MevNodeToNodeMetrics
- func (m *MevNodeToNodeCalculationRequest) Marshal() (dAtA []byte, err error)
- func (m *MevNodeToNodeCalculationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MevNodeToNodeCalculationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MevNodeToNodeCalculationRequest) ProtoMessage()
- func (m *MevNodeToNodeCalculationRequest) Reset()
- func (m *MevNodeToNodeCalculationRequest) Size() (n int)
- func (m *MevNodeToNodeCalculationRequest) String() string
- func (m *MevNodeToNodeCalculationRequest) Unmarshal(dAtA []byte) error
- func (m *MevNodeToNodeCalculationRequest) XXX_DiscardUnknown()
- func (m *MevNodeToNodeCalculationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MevNodeToNodeCalculationRequest) XXX_Merge(src proto.Message)
- func (m *MevNodeToNodeCalculationRequest) XXX_Size() int
- func (m *MevNodeToNodeCalculationRequest) XXX_Unmarshal(b []byte) error
- type MevNodeToNodeCalculationResponse
- func (*MevNodeToNodeCalculationResponse) Descriptor() ([]byte, []int)
- func (m *MevNodeToNodeCalculationResponse) GetResults() []MevNodeToNodeCalculationResponse_MevAndVolumePerClob
- func (m *MevNodeToNodeCalculationResponse) Marshal() (dAtA []byte, err error)
- func (m *MevNodeToNodeCalculationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MevNodeToNodeCalculationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MevNodeToNodeCalculationResponse) ProtoMessage()
- func (m *MevNodeToNodeCalculationResponse) Reset()
- func (m *MevNodeToNodeCalculationResponse) Size() (n int)
- func (m *MevNodeToNodeCalculationResponse) String() string
- func (m *MevNodeToNodeCalculationResponse) Unmarshal(dAtA []byte) error
- func (m *MevNodeToNodeCalculationResponse) XXX_DiscardUnknown()
- func (m *MevNodeToNodeCalculationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MevNodeToNodeCalculationResponse) XXX_Merge(src proto.Message)
- func (m *MevNodeToNodeCalculationResponse) XXX_Size() int
- func (m *MevNodeToNodeCalculationResponse) XXX_Unmarshal(b []byte) error
- type MevNodeToNodeCalculationResponse_MevAndVolumePerClob
- func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Descriptor() ([]byte, []int)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetClobPairId() uint32
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetMev() float32
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetVolume() uint64
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Marshal() (dAtA []byte, err error)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalTo(dAtA []byte) (int, error)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) ProtoMessage()
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Reset()
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Size() (n int)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) String() string
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Unmarshal(dAtA []byte) error
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_DiscardUnknown()
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Merge(src proto.Message)
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Size() int
- func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Unmarshal(b []byte) error
- type MevNodeToNodeMetrics
- func (*MevNodeToNodeMetrics) Descriptor() ([]byte, []int)
- func (m *MevNodeToNodeMetrics) GetBpMevMatches() *ValidatorMevMatches
- func (m *MevNodeToNodeMetrics) GetClobMidPrices() []ClobMidPrice
- func (m *MevNodeToNodeMetrics) GetProposalReceiveTime() uint64
- func (m *MevNodeToNodeMetrics) GetValidatorMevMatches() *ValidatorMevMatches
- func (m *MevNodeToNodeMetrics) Marshal() (dAtA []byte, err error)
- func (m *MevNodeToNodeMetrics) MarshalTo(dAtA []byte) (int, error)
- func (m *MevNodeToNodeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MevNodeToNodeMetrics) ProtoMessage()
- func (m *MevNodeToNodeMetrics) Reset()
- func (m *MevNodeToNodeMetrics) Size() (n int)
- func (m *MevNodeToNodeMetrics) String() string
- func (m *MevNodeToNodeMetrics) Unmarshal(dAtA []byte) error
- func (m *MevNodeToNodeMetrics) XXX_DiscardUnknown()
- func (m *MevNodeToNodeMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MevNodeToNodeMetrics) XXX_Merge(src proto.Message)
- func (m *MevNodeToNodeMetrics) XXX_Size() int
- func (m *MevNodeToNodeMetrics) XXX_Unmarshal(b []byte) error
- type MevTelemetryConfig
- type MsgBatchCancel
- func (*MsgBatchCancel) Descriptor() ([]byte, []int)
- func (m *MsgBatchCancel) GetGoodTilBlock() uint32
- func (m *MsgBatchCancel) GetShortTermCancels() []OrderBatch
- func (m *MsgBatchCancel) GetSubaccountId() types.SubaccountId
- func (m *MsgBatchCancel) Marshal() (dAtA []byte, err error)
- func (m *MsgBatchCancel) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBatchCancel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBatchCancel) ProtoMessage()
- func (m *MsgBatchCancel) Reset()
- func (m *MsgBatchCancel) Size() (n int)
- func (m *MsgBatchCancel) String() string
- func (m *MsgBatchCancel) Unmarshal(dAtA []byte) error
- func (msg *MsgBatchCancel) ValidateBasic() (err error)
- func (m *MsgBatchCancel) XXX_DiscardUnknown()
- func (m *MsgBatchCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBatchCancel) XXX_Merge(src proto.Message)
- func (m *MsgBatchCancel) XXX_Size() int
- func (m *MsgBatchCancel) XXX_Unmarshal(b []byte) error
- type MsgBatchCancelResponse
- func (*MsgBatchCancelResponse) Descriptor() ([]byte, []int)
- func (m *MsgBatchCancelResponse) GetShortTermFailed() []*OrderBatch
- func (m *MsgBatchCancelResponse) GetShortTermSucceeded() []*OrderBatch
- func (m *MsgBatchCancelResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBatchCancelResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBatchCancelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBatchCancelResponse) ProtoMessage()
- func (m *MsgBatchCancelResponse) Reset()
- func (m *MsgBatchCancelResponse) Size() (n int)
- func (m *MsgBatchCancelResponse) String() string
- func (m *MsgBatchCancelResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBatchCancelResponse) XXX_DiscardUnknown()
- func (m *MsgBatchCancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBatchCancelResponse) XXX_Merge(src proto.Message)
- func (m *MsgBatchCancelResponse) XXX_Size() int
- func (m *MsgBatchCancelResponse) XXX_Unmarshal(b []byte) error
- type MsgCancelOrder
- func (*MsgCancelOrder) Descriptor() ([]byte, []int)
- func (m *MsgCancelOrder) GetGoodTilBlock() uint32
- func (m *MsgCancelOrder) GetGoodTilBlockTime() uint32
- func (m *MsgCancelOrder) GetGoodTilOneof() isMsgCancelOrder_GoodTilOneof
- func (m *MsgCancelOrder) GetOrderId() OrderId
- func (m *MsgCancelOrder) Marshal() (dAtA []byte, err error)
- func (m *MsgCancelOrder) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCancelOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (msg *MsgCancelOrder) MustGetUnixGoodTilBlockTime() time.Time
- func (*MsgCancelOrder) ProtoMessage()
- func (m *MsgCancelOrder) Reset()
- func (m *MsgCancelOrder) Size() (n int)
- func (m *MsgCancelOrder) String() string
- func (m *MsgCancelOrder) Unmarshal(dAtA []byte) error
- func (msg *MsgCancelOrder) ValidateBasic() (err error)
- func (m *MsgCancelOrder) XXX_DiscardUnknown()
- func (m *MsgCancelOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCancelOrder) XXX_Merge(src proto.Message)
- func (*MsgCancelOrder) XXX_OneofWrappers() []interface{}
- func (m *MsgCancelOrder) XXX_Size() int
- func (m *MsgCancelOrder) XXX_Unmarshal(b []byte) error
- type MsgCancelOrderResponse
- func (*MsgCancelOrderResponse) Descriptor() ([]byte, []int)
- func (m *MsgCancelOrderResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCancelOrderResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCancelOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCancelOrderResponse) ProtoMessage()
- func (m *MsgCancelOrderResponse) Reset()
- func (m *MsgCancelOrderResponse) Size() (n int)
- func (m *MsgCancelOrderResponse) String() string
- func (m *MsgCancelOrderResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCancelOrderResponse) XXX_DiscardUnknown()
- func (m *MsgCancelOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCancelOrderResponse) XXX_Merge(src proto.Message)
- func (m *MsgCancelOrderResponse) XXX_Size() int
- func (m *MsgCancelOrderResponse) XXX_Unmarshal(b []byte) error
- type MsgCancelOrder_GoodTilBlock
- type MsgCancelOrder_GoodTilBlockTime
- type MsgClient
- type MsgCreateClobPair
- func (*MsgCreateClobPair) Descriptor() ([]byte, []int)
- func (m *MsgCreateClobPair) GetAuthority() string
- func (m *MsgCreateClobPair) GetClobPair() ClobPair
- func (m *MsgCreateClobPair) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateClobPair) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateClobPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateClobPair) ProtoMessage()
- func (m *MsgCreateClobPair) Reset()
- func (m *MsgCreateClobPair) Size() (n int)
- func (m *MsgCreateClobPair) String() string
- func (m *MsgCreateClobPair) Unmarshal(dAtA []byte) error
- func (msg *MsgCreateClobPair) ValidateBasic() error
- func (m *MsgCreateClobPair) XXX_DiscardUnknown()
- func (m *MsgCreateClobPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateClobPair) XXX_Merge(src proto.Message)
- func (m *MsgCreateClobPair) XXX_Size() int
- func (m *MsgCreateClobPair) XXX_Unmarshal(b []byte) error
- type MsgCreateClobPairResponse
- func (*MsgCreateClobPairResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateClobPairResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateClobPairResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateClobPairResponse) ProtoMessage()
- func (m *MsgCreateClobPairResponse) Reset()
- func (m *MsgCreateClobPairResponse) Size() (n int)
- func (m *MsgCreateClobPairResponse) String() string
- func (m *MsgCreateClobPairResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateClobPairResponse) XXX_DiscardUnknown()
- func (m *MsgCreateClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateClobPairResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateClobPairResponse) XXX_Size() int
- func (m *MsgCreateClobPairResponse) XXX_Unmarshal(b []byte) error
- type MsgPlaceOrder
- func (*MsgPlaceOrder) Descriptor() ([]byte, []int)
- func (m *MsgPlaceOrder) GetOrder() Order
- func (m *MsgPlaceOrder) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceOrder) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceOrder) ProtoMessage()
- func (m *MsgPlaceOrder) Reset()
- func (m *MsgPlaceOrder) Size() (n int)
- func (m *MsgPlaceOrder) String() string
- func (m *MsgPlaceOrder) Unmarshal(dAtA []byte) error
- func (msg *MsgPlaceOrder) ValidateBasic() (err error)
- func (m *MsgPlaceOrder) XXX_DiscardUnknown()
- func (m *MsgPlaceOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceOrder) XXX_Merge(src proto.Message)
- func (m *MsgPlaceOrder) XXX_Size() int
- func (m *MsgPlaceOrder) XXX_Unmarshal(b []byte) error
- type MsgPlaceOrderResponse
- func (*MsgPlaceOrderResponse) Descriptor() ([]byte, []int)
- func (m *MsgPlaceOrderResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceOrderResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceOrderResponse) ProtoMessage()
- func (m *MsgPlaceOrderResponse) Reset()
- func (m *MsgPlaceOrderResponse) Size() (n int)
- func (m *MsgPlaceOrderResponse) String() string
- func (m *MsgPlaceOrderResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPlaceOrderResponse) XXX_DiscardUnknown()
- func (m *MsgPlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceOrderResponse) XXX_Merge(src proto.Message)
- func (m *MsgPlaceOrderResponse) XXX_Size() int
- func (m *MsgPlaceOrderResponse) XXX_Unmarshal(b []byte) error
- type MsgProposedOperations
- func (*MsgProposedOperations) Descriptor() ([]byte, []int)
- func (m *MsgProposedOperations) GetOperationsQueue() []OperationRaw
- func (m *MsgProposedOperations) Marshal() (dAtA []byte, err error)
- func (m *MsgProposedOperations) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgProposedOperations) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgProposedOperations) ProtoMessage()
- func (m *MsgProposedOperations) Reset()
- func (m *MsgProposedOperations) Size() (n int)
- func (m *MsgProposedOperations) String() string
- func (m *MsgProposedOperations) Unmarshal(dAtA []byte) error
- func (msg *MsgProposedOperations) ValidateBasic() error
- func (m *MsgProposedOperations) XXX_DiscardUnknown()
- func (m *MsgProposedOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgProposedOperations) XXX_Merge(src proto.Message)
- func (m *MsgProposedOperations) XXX_Size() int
- func (m *MsgProposedOperations) XXX_Unmarshal(b []byte) error
- type MsgProposedOperationsResponse
- func (*MsgProposedOperationsResponse) Descriptor() ([]byte, []int)
- func (m *MsgProposedOperationsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgProposedOperationsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgProposedOperationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgProposedOperationsResponse) ProtoMessage()
- func (m *MsgProposedOperationsResponse) Reset()
- func (m *MsgProposedOperationsResponse) Size() (n int)
- func (m *MsgProposedOperationsResponse) String() string
- func (m *MsgProposedOperationsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgProposedOperationsResponse) XXX_DiscardUnknown()
- func (m *MsgProposedOperationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgProposedOperationsResponse) XXX_Merge(src proto.Message)
- func (m *MsgProposedOperationsResponse) XXX_Size() int
- func (m *MsgProposedOperationsResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateBlockRateLimitConfiguration
- func (*MsgUpdateBlockRateLimitConfiguration) Descriptor() ([]byte, []int)
- func (m *MsgUpdateBlockRateLimitConfiguration) GetAuthority() string
- func (m *MsgUpdateBlockRateLimitConfiguration) GetBlockRateLimitConfig() BlockRateLimitConfiguration
- func (m *MsgUpdateBlockRateLimitConfiguration) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateBlockRateLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateBlockRateLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateBlockRateLimitConfiguration) ProtoMessage()
- func (m *MsgUpdateBlockRateLimitConfiguration) Reset()
- func (m *MsgUpdateBlockRateLimitConfiguration) Size() (n int)
- func (m *MsgUpdateBlockRateLimitConfiguration) String() string
- func (m *MsgUpdateBlockRateLimitConfiguration) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateBlockRateLimitConfiguration) ValidateBasic() error
- func (m *MsgUpdateBlockRateLimitConfiguration) XXX_DiscardUnknown()
- func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Merge(src proto.Message)
- func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Size() int
- func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Unmarshal(b []byte) error
- type MsgUpdateBlockRateLimitConfigurationResponse
- func (*MsgUpdateBlockRateLimitConfigurationResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateBlockRateLimitConfigurationResponse) ProtoMessage()
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) Reset()
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) Size() (n int)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) String() string
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Size() int
- func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateClobPair
- func (*MsgUpdateClobPair) Descriptor() ([]byte, []int)
- func (m *MsgUpdateClobPair) GetAuthority() string
- func (m *MsgUpdateClobPair) GetClobPair() ClobPair
- func (m *MsgUpdateClobPair) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateClobPair) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateClobPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateClobPair) ProtoMessage()
- func (m *MsgUpdateClobPair) Reset()
- func (m *MsgUpdateClobPair) Size() (n int)
- func (m *MsgUpdateClobPair) String() string
- func (m *MsgUpdateClobPair) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateClobPair) ValidateBasic() error
- func (m *MsgUpdateClobPair) XXX_DiscardUnknown()
- func (m *MsgUpdateClobPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateClobPair) XXX_Merge(src proto.Message)
- func (m *MsgUpdateClobPair) XXX_Size() int
- func (m *MsgUpdateClobPair) XXX_Unmarshal(b []byte) error
- type MsgUpdateClobPairResponse
- func (*MsgUpdateClobPairResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateClobPairResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateClobPairResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateClobPairResponse) ProtoMessage()
- func (m *MsgUpdateClobPairResponse) Reset()
- func (m *MsgUpdateClobPairResponse) Size() (n int)
- func (m *MsgUpdateClobPairResponse) String() string
- func (m *MsgUpdateClobPairResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateClobPairResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateClobPairResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateClobPairResponse) XXX_Size() int
- func (m *MsgUpdateClobPairResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateEquityTierLimitConfiguration
- func (*MsgUpdateEquityTierLimitConfiguration) Descriptor() ([]byte, []int)
- func (m *MsgUpdateEquityTierLimitConfiguration) GetAuthority() string
- func (m *MsgUpdateEquityTierLimitConfiguration) GetEquityTierLimitConfig() EquityTierLimitConfiguration
- func (m *MsgUpdateEquityTierLimitConfiguration) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateEquityTierLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateEquityTierLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateEquityTierLimitConfiguration) ProtoMessage()
- func (m *MsgUpdateEquityTierLimitConfiguration) Reset()
- func (m *MsgUpdateEquityTierLimitConfiguration) Size() (n int)
- func (m *MsgUpdateEquityTierLimitConfiguration) String() string
- func (m *MsgUpdateEquityTierLimitConfiguration) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateEquityTierLimitConfiguration) ValidateBasic() error
- func (m *MsgUpdateEquityTierLimitConfiguration) XXX_DiscardUnknown()
- func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Merge(src proto.Message)
- func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Size() int
- func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Unmarshal(b []byte) error
- type MsgUpdateEquityTierLimitConfigurationResponse
- func (*MsgUpdateEquityTierLimitConfigurationResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateEquityTierLimitConfigurationResponse) ProtoMessage()
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) Reset()
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) Size() (n int)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) String() string
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Size() int
- func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateLiquidationsConfig
- func (*MsgUpdateLiquidationsConfig) Descriptor() ([]byte, []int)
- func (m *MsgUpdateLiquidationsConfig) GetAuthority() string
- func (m *MsgUpdateLiquidationsConfig) GetLiquidationsConfig() LiquidationsConfig
- func (m *MsgUpdateLiquidationsConfig) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateLiquidationsConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateLiquidationsConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateLiquidationsConfig) ProtoMessage()
- func (m *MsgUpdateLiquidationsConfig) Reset()
- func (m *MsgUpdateLiquidationsConfig) Size() (n int)
- func (m *MsgUpdateLiquidationsConfig) String() string
- func (m *MsgUpdateLiquidationsConfig) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateLiquidationsConfig) ValidateBasic() error
- func (m *MsgUpdateLiquidationsConfig) XXX_DiscardUnknown()
- func (m *MsgUpdateLiquidationsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateLiquidationsConfig) XXX_Merge(src proto.Message)
- func (m *MsgUpdateLiquidationsConfig) XXX_Size() int
- func (m *MsgUpdateLiquidationsConfig) XXX_Unmarshal(b []byte) error
- type MsgUpdateLiquidationsConfigResponse
- func (*MsgUpdateLiquidationsConfigResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateLiquidationsConfigResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateLiquidationsConfigResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateLiquidationsConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateLiquidationsConfigResponse) ProtoMessage()
- func (m *MsgUpdateLiquidationsConfigResponse) Reset()
- func (m *MsgUpdateLiquidationsConfigResponse) Size() (n int)
- func (m *MsgUpdateLiquidationsConfigResponse) String() string
- func (m *MsgUpdateLiquidationsConfigResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateLiquidationsConfigResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateLiquidationsConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateLiquidationsConfigResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateLiquidationsConfigResponse) XXX_Size() int
- func (m *MsgUpdateLiquidationsConfigResponse) XXX_Unmarshal(b []byte) error
- type OffchainUpdateMessage
- type OffchainUpdateMessageType
- type OffchainUpdates
- func (om *OffchainUpdates) AddPlaceMessage(orderId OrderId, message msgsender.Message)
- func (om *OffchainUpdates) AddRemoveMessage(orderId OrderId, message msgsender.Message)
- func (om *OffchainUpdates) AddUpdateMessage(orderId OrderId, message msgsender.Message)
- func (om *OffchainUpdates) Append(newMessages *OffchainUpdates)
- func (om *OffchainUpdates) CondenseMessagesForReplay()
- func (om *OffchainUpdates) GetMessages() []msgsender.Message
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)
- func (m *Operation) GetMatch() *ClobMatch
- func (m *Operation) GetOperation() isOperation_Operation
- func (m *Operation) GetPreexistingStatefulOrder() *OrderId
- func (m *Operation) GetShortTermOrderCancellation() *MsgCancelOrder
- func (m *Operation) GetShortTermOrderPlacement() *MsgPlaceOrder
- func (m *Operation) Marshal() (dAtA []byte, err error)
- func (m *Operation) MarshalTo(dAtA []byte) (int, error)
- func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Operation) ProtoMessage()
- func (m *Operation) Reset()
- func (m *Operation) Size() (n int)
- func (m *Operation) String() string
- func (m *Operation) Unmarshal(dAtA []byte) error
- func (m *Operation) XXX_DiscardUnknown()
- func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Operation) XXX_Merge(src proto.Message)
- func (*Operation) XXX_OneofWrappers() []interface{}
- func (m *Operation) XXX_Size() int
- func (m *Operation) XXX_Unmarshal(b []byte) error
- type OperationRaw
- func (*OperationRaw) Descriptor() ([]byte, []int)
- func (m *OperationRaw) GetMatch() *ClobMatch
- func (m *OperationRaw) GetOperation() isOperationRaw_Operation
- func (m *OperationRaw) GetOrderRemoval() *OrderRemoval
- func (m *OperationRaw) GetShortTermOrderPlacement() []byte
- func (m *OperationRaw) Marshal() (dAtA []byte, err error)
- func (m *OperationRaw) MarshalTo(dAtA []byte) (int, error)
- func (m *OperationRaw) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OperationRaw) ProtoMessage()
- func (m *OperationRaw) Reset()
- func (m *OperationRaw) Size() (n int)
- func (m *OperationRaw) String() string
- func (m *OperationRaw) Unmarshal(dAtA []byte) error
- func (m *OperationRaw) XXX_DiscardUnknown()
- func (m *OperationRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OperationRaw) XXX_Merge(src proto.Message)
- func (*OperationRaw) XXX_OneofWrappers() []interface{}
- func (m *OperationRaw) XXX_Size() int
- func (m *OperationRaw) XXX_Unmarshal(b []byte) error
- type OperationRaw_Match
- type OperationRaw_OrderRemoval
- type OperationRaw_ShortTermOrderPlacement
- type Operation_Match
- type Operation_PreexistingStatefulOrder
- type Operation_ShortTermOrderCancellation
- type Operation_ShortTermOrderPlacement
- type OperationsStats
- type OperationsToPropose
- func (o *OperationsToPropose) AddZeroFillDeleveragingToOperationsQueue(liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32)
- func (o *OperationsToPropose) ClearOperationsQueue()
- func (o *OperationsToPropose) GetOperationsToPropose() []OperationRaw
- func (o *OperationsToPropose) GetOperationsToReplay() ([]InternalOperation, map[OrderHash][]byte)
- func (o *OperationsToPropose) IsOrderPlacementInOperationsQueue(order Order) bool
- func (o *OperationsToPropose) IsOrderRemovalInOperationsQueue(orderId OrderId) bool
- func (o *OperationsToPropose) MustAddDeleveragingToOperationsQueue(liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, ...)
- func (o *OperationsToPropose) MustAddMatchToOperationsQueue(takerMatchableOrder MatchableOrder, makerFillsWithOrders []MakerFillWithOrder)
- func (o *OperationsToPropose) MustAddOrderRemovalToOperationsQueue(orderId OrderId, removalReason OrderRemoval_RemovalReason)
- func (o *OperationsToPropose) MustAddShortTermOrderPlacementToOperationsQueue(order Order)
- func (o *OperationsToPropose) MustAddShortTermOrderTxBytes(order Order, txBytes []byte)
- func (o *OperationsToPropose) MustAddStatefulOrderPlacementToOperationsQueue(order Order)
- func (o *OperationsToPropose) RemoveShortTermOrderTxBytes(order Order)
- type Order
- func (o *Order) CanTrigger(subticks Subticks) bool
- func (*Order) Descriptor() ([]byte, []int)
- func (o *Order) GetBaseQuantums() satypes.BaseQuantums
- func (o *Order) GetBigQuantums() *big.Int
- func (m *Order) GetClientMetadata() uint32
- func (o *Order) GetClobPairId() ClobPairId
- func (m *Order) GetConditionType() Order_ConditionType
- func (m *Order) GetConditionalOrderTriggerSubticks() uint64
- func (m *Order) GetGoodTilBlock() uint32
- func (m *Order) GetGoodTilBlockTime() uint32
- func (m *Order) GetGoodTilOneof() isOrder_GoodTilOneof
- func (o *Order) GetOrderHash() OrderHash
- func (m *Order) GetOrderId() OrderId
- func (o *Order) GetOrderLabels() []gometrics.Label
- func (o *Order) GetOrderSubticks() Subticks
- func (o *Order) GetOrderTextString() string
- func (m *Order) GetQuantums() uint64
- func (m *Order) GetReduceOnly() bool
- func (m *Order) GetRouterFeePpm() int32
- func (m *Order) GetRouterSubaccountId() *types.SubaccountId
- func (m *Order) GetSide() Order_Side
- func (o *Order) GetSubaccountId() satypes.SubaccountId
- func (m *Order) GetSubticks() uint64
- func (m *Order) GetTimeInForce() Order_TimeInForce
- func (o *Order) IsBuy() bool
- func (o *Order) IsConditionalOrder() bool
- func (x *Order) IsIdenticalTo(y *Order) bool
- func (o *Order) IsLiquidation() bool
- func (o *Order) IsReduceOnly() bool
- func (o *Order) IsShortTermOrder() bool
- func (o *Order) IsStatefulOrder() bool
- func (o *Order) IsStopLossOrder() bool
- func (o *Order) IsTakeProfitOrder() bool
- func (m *Order) Marshal() (dAtA []byte, err error)
- func (m *Order) MarshalTo(dAtA []byte) (int, error)
- func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (o *Order) MustBeConditionalOrder()
- func (o *Order) MustBeStatefulOrder()
- func (o *Order) MustBeValidOrderSide()
- func (x *Order) MustCmpReplacementOrder(y *Order) int
- func (o *Order) MustGetLiquidatedPerpetualId() uint32
- func (o *Order) MustGetOrder() Order
- func (o *Order) MustGetUnixGoodTilBlockTime() time.Time
- func (*Order) ProtoMessage()
- func (o *Order) RequiresImmediateExecution() bool
- func (m *Order) Reset()
- func (m *Order) Size() (n int)
- func (m *Order) String() string
- func (m *Order) Unmarshal(dAtA []byte) error
- func (m *Order) XXX_DiscardUnknown()
- func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Order) XXX_Merge(src proto.Message)
- func (*Order) XXX_OneofWrappers() []interface{}
- func (m *Order) XXX_Size() int
- func (m *Order) XXX_Unmarshal(b []byte) error
- type OrderBatch
- func (*OrderBatch) Descriptor() ([]byte, []int)
- func (m *OrderBatch) GetClientIds() []uint32
- func (m *OrderBatch) GetClobPairId() uint32
- func (m *OrderBatch) Marshal() (dAtA []byte, err error)
- func (m *OrderBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *OrderBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OrderBatch) ProtoMessage()
- func (m *OrderBatch) Reset()
- func (m *OrderBatch) Size() (n int)
- func (m *OrderBatch) String() string
- func (m *OrderBatch) Unmarshal(dAtA []byte) error
- func (m *OrderBatch) XXX_DiscardUnknown()
- func (m *OrderBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderBatch) XXX_Merge(src proto.Message)
- func (m *OrderBatch) XXX_Size() int
- func (m *OrderBatch) XXX_Unmarshal(b []byte) error
- type OrderFillState
- func (*OrderFillState) Descriptor() ([]byte, []int)
- func (m *OrderFillState) GetFillAmount() uint64
- func (m *OrderFillState) GetPrunableBlockHeight() uint32
- func (m *OrderFillState) Marshal() (dAtA []byte, err error)
- func (m *OrderFillState) MarshalTo(dAtA []byte) (int, error)
- func (m *OrderFillState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OrderFillState) ProtoMessage()
- func (m *OrderFillState) Reset()
- func (m *OrderFillState) Size() (n int)
- func (m *OrderFillState) String() string
- func (m *OrderFillState) Unmarshal(dAtA []byte) error
- func (m *OrderFillState) XXX_DiscardUnknown()
- func (m *OrderFillState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderFillState) XXX_Merge(src proto.Message)
- func (m *OrderFillState) XXX_Size() int
- func (m *OrderFillState) XXX_Unmarshal(b []byte) error
- type OrderHash
- type OrderId
- func (*OrderId) Descriptor() ([]byte, []int)
- func (m *OrderId) GetClientId() uint32
- func (m *OrderId) GetClobPairId() uint32
- func (m *OrderId) GetOrderFlags() uint32
- func (o *OrderId) GetOrderIdLabels() []metrics.Label
- func (m *OrderId) GetSubaccountId() types.SubaccountId
- func (o *OrderId) IsConditionalOrder() bool
- func (o *OrderId) IsLongTermOrder() bool
- func (o *OrderId) IsShortTermOrder() bool
- func (o *OrderId) IsStatefulOrder() bool
- func (m *OrderId) Marshal() (dAtA []byte, err error)
- func (m *OrderId) MarshalTo(dAtA []byte) (int, error)
- func (m *OrderId) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (o *OrderId) MustBeConditionalOrder()
- func (o *OrderId) MustBeShortTermOrder()
- func (o *OrderId) MustBeStatefulOrder()
- func (*OrderId) ProtoMessage()
- func (m *OrderId) Reset()
- func (m *OrderId) Size() (n int)
- func (m *OrderId) String() string
- func (o *OrderId) ToStateKey() []byte
- func (m *OrderId) Unmarshal(dAtA []byte) error
- func (o *OrderId) Validate() error
- func (m *OrderId) XXX_DiscardUnknown()
- func (m *OrderId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderId) XXX_Merge(src proto.Message)
- func (m *OrderId) XXX_Size() int
- func (m *OrderId) XXX_Unmarshal(b []byte) error
- type OrderRemoval
- func (*OrderRemoval) Descriptor() ([]byte, []int)
- func (m *OrderRemoval) GetOrderId() OrderId
- func (m *OrderRemoval) GetRemovalReason() OrderRemoval_RemovalReason
- func (m *OrderRemoval) Marshal() (dAtA []byte, err error)
- func (m *OrderRemoval) MarshalTo(dAtA []byte) (int, error)
- func (m *OrderRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OrderRemoval) ProtoMessage()
- func (m *OrderRemoval) Reset()
- func (m *OrderRemoval) Size() (n int)
- func (m *OrderRemoval) String() string
- func (m *OrderRemoval) Unmarshal(dAtA []byte) error
- func (m *OrderRemoval) XXX_DiscardUnknown()
- func (m *OrderRemoval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderRemoval) XXX_Merge(src proto.Message)
- func (m *OrderRemoval) XXX_Size() int
- func (m *OrderRemoval) XXX_Unmarshal(b []byte) error
- type OrderRemoval_RemovalReason
- type OrderStatus
- type Order_ConditionType
- type Order_GoodTilBlock
- type Order_GoodTilBlockTime
- type Order_Side
- type Order_TimeInForce
- type Orderbook
- type OrdersFilledDuringLatestBlock
- func (*OrdersFilledDuringLatestBlock) Descriptor() ([]byte, []int)
- func (m *OrdersFilledDuringLatestBlock) GetOrderIds() []OrderId
- func (m *OrdersFilledDuringLatestBlock) Marshal() (dAtA []byte, err error)
- func (m *OrdersFilledDuringLatestBlock) MarshalTo(dAtA []byte) (int, error)
- func (m *OrdersFilledDuringLatestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OrdersFilledDuringLatestBlock) ProtoMessage()
- func (m *OrdersFilledDuringLatestBlock) Reset()
- func (m *OrdersFilledDuringLatestBlock) Size() (n int)
- func (m *OrdersFilledDuringLatestBlock) String() string
- func (m *OrdersFilledDuringLatestBlock) Unmarshal(dAtA []byte) error
- func (m *OrdersFilledDuringLatestBlock) XXX_DiscardUnknown()
- func (m *OrdersFilledDuringLatestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrdersFilledDuringLatestBlock) XXX_Merge(src proto.Message)
- func (m *OrdersFilledDuringLatestBlock) XXX_Size() int
- func (m *OrdersFilledDuringLatestBlock) XXX_Unmarshal(b []byte) error
- type PendingOpenOrder
- type PendingUpdates
- type PerpetualClobMetadata
- func (*PerpetualClobMetadata) Descriptor() ([]byte, []int)
- func (m *PerpetualClobMetadata) GetPerpetualId() uint32
- func (m *PerpetualClobMetadata) Marshal() (dAtA []byte, err error)
- func (m *PerpetualClobMetadata) MarshalTo(dAtA []byte) (int, error)
- func (m *PerpetualClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PerpetualClobMetadata) ProtoMessage()
- func (m *PerpetualClobMetadata) Reset()
- func (m *PerpetualClobMetadata) Size() (n int)
- func (m *PerpetualClobMetadata) String() string
- func (m *PerpetualClobMetadata) Unmarshal(dAtA []byte) error
- func (m *PerpetualClobMetadata) XXX_DiscardUnknown()
- func (m *PerpetualClobMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PerpetualClobMetadata) XXX_Merge(src proto.Message)
- func (m *PerpetualClobMetadata) XXX_Size() int
- func (m *PerpetualClobMetadata) XXX_Unmarshal(b []byte) error
- type PerpetualLiquidationInfo
- func (*PerpetualLiquidationInfo) Descriptor() ([]byte, []int)
- func (m *PerpetualLiquidationInfo) GetPerpetualId() uint32
- func (m *PerpetualLiquidationInfo) GetSubaccountId() types.SubaccountId
- func (m *PerpetualLiquidationInfo) Marshal() (dAtA []byte, err error)
- func (m *PerpetualLiquidationInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *PerpetualLiquidationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PerpetualLiquidationInfo) ProtoMessage()
- func (m *PerpetualLiquidationInfo) Reset()
- func (m *PerpetualLiquidationInfo) Size() (n int)
- func (m *PerpetualLiquidationInfo) String() string
- func (m *PerpetualLiquidationInfo) Unmarshal(dAtA []byte) error
- func (m *PerpetualLiquidationInfo) XXX_DiscardUnknown()
- func (m *PerpetualLiquidationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PerpetualLiquidationInfo) XXX_Merge(src proto.Message)
- func (m *PerpetualLiquidationInfo) XXX_Size() int
- func (m *PerpetualLiquidationInfo) XXX_Unmarshal(b []byte) error
- type PerpetualsKeeper
- type PotentiallyPrunableOrders
- func (*PotentiallyPrunableOrders) Descriptor() ([]byte, []int)
- func (m *PotentiallyPrunableOrders) GetOrderIds() []OrderId
- func (m *PotentiallyPrunableOrders) Marshal() (dAtA []byte, err error)
- func (m *PotentiallyPrunableOrders) MarshalTo(dAtA []byte) (int, error)
- func (m *PotentiallyPrunableOrders) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PotentiallyPrunableOrders) ProtoMessage()
- func (m *PotentiallyPrunableOrders) Reset()
- func (m *PotentiallyPrunableOrders) Size() (n int)
- func (m *PotentiallyPrunableOrders) String() string
- func (m *PotentiallyPrunableOrders) Unmarshal(dAtA []byte) error
- func (m *PotentiallyPrunableOrders) XXX_DiscardUnknown()
- func (m *PotentiallyPrunableOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PotentiallyPrunableOrders) XXX_Merge(src proto.Message)
- func (m *PotentiallyPrunableOrders) XXX_Size() int
- func (m *PotentiallyPrunableOrders) XXX_Unmarshal(b []byte) error
- type PricesKeeper
- type ProcessProposerMatchesEvents
- func (*ProcessProposerMatchesEvents) Descriptor() ([]byte, []int)
- func (m *ProcessProposerMatchesEvents) GetBlockHeight() uint32
- func (m *ProcessProposerMatchesEvents) GetConditionalOrderIdsTriggeredInLastBlock() []OrderId
- func (m *ProcessProposerMatchesEvents) GetExpiredStatefulOrderIds() []OrderId
- func (m *ProcessProposerMatchesEvents) GetOrderIdsFilledInLastBlock() []OrderId
- func (m *ProcessProposerMatchesEvents) GetPlacedConditionalOrderIds() []OrderId
- func (m *ProcessProposerMatchesEvents) GetPlacedLongTermOrderIds() []OrderId
- func (m *ProcessProposerMatchesEvents) GetPlacedStatefulCancellationOrderIds() []OrderId
- func (m *ProcessProposerMatchesEvents) GetRemovedStatefulOrderIds() []OrderId
- func (m *ProcessProposerMatchesEvents) Marshal() (dAtA []byte, err error)
- func (m *ProcessProposerMatchesEvents) MarshalTo(dAtA []byte) (int, error)
- func (m *ProcessProposerMatchesEvents) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProcessProposerMatchesEvents) ProtoMessage()
- func (m *ProcessProposerMatchesEvents) Reset()
- func (m *ProcessProposerMatchesEvents) Size() (n int)
- func (m *ProcessProposerMatchesEvents) String() string
- func (m *ProcessProposerMatchesEvents) Unmarshal(dAtA []byte) error
- func (ppme *ProcessProposerMatchesEvents) ValidateProcessProposerMatchesEvents(ctx sdk.Context) error
- func (m *ProcessProposerMatchesEvents) XXX_DiscardUnknown()
- func (m *ProcessProposerMatchesEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProcessProposerMatchesEvents) XXX_Merge(src proto.Message)
- func (m *ProcessProposerMatchesEvents) XXX_Size() int
- func (m *ProcessProposerMatchesEvents) XXX_Unmarshal(b []byte) error
- type QueryAllClobPairRequest
- func (*QueryAllClobPairRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllClobPairRequest) GetPagination() *query.PageRequest
- func (m *QueryAllClobPairRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllClobPairRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllClobPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllClobPairRequest) ProtoMessage()
- func (m *QueryAllClobPairRequest) Reset()
- func (m *QueryAllClobPairRequest) Size() (n int)
- func (m *QueryAllClobPairRequest) String() string
- func (m *QueryAllClobPairRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllClobPairRequest) XXX_DiscardUnknown()
- func (m *QueryAllClobPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllClobPairRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllClobPairRequest) XXX_Size() int
- func (m *QueryAllClobPairRequest) XXX_Unmarshal(b []byte) error
- type QueryBlockRateLimitConfigurationRequest
- func (*QueryBlockRateLimitConfigurationRequest) Descriptor() ([]byte, []int)
- func (m *QueryBlockRateLimitConfigurationRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBlockRateLimitConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBlockRateLimitConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBlockRateLimitConfigurationRequest) ProtoMessage()
- func (m *QueryBlockRateLimitConfigurationRequest) Reset()
- func (m *QueryBlockRateLimitConfigurationRequest) Size() (n int)
- func (m *QueryBlockRateLimitConfigurationRequest) String() string
- func (m *QueryBlockRateLimitConfigurationRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBlockRateLimitConfigurationRequest) XXX_DiscardUnknown()
- func (m *QueryBlockRateLimitConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBlockRateLimitConfigurationRequest) XXX_Merge(src proto.Message)
- func (m *QueryBlockRateLimitConfigurationRequest) XXX_Size() int
- func (m *QueryBlockRateLimitConfigurationRequest) XXX_Unmarshal(b []byte) error
- type QueryBlockRateLimitConfigurationResponse
- func (*QueryBlockRateLimitConfigurationResponse) Descriptor() ([]byte, []int)
- func (m *QueryBlockRateLimitConfigurationResponse) GetBlockRateLimitConfig() BlockRateLimitConfiguration
- func (m *QueryBlockRateLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBlockRateLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBlockRateLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBlockRateLimitConfigurationResponse) ProtoMessage()
- func (m *QueryBlockRateLimitConfigurationResponse) Reset()
- func (m *QueryBlockRateLimitConfigurationResponse) Size() (n int)
- func (m *QueryBlockRateLimitConfigurationResponse) String() string
- func (m *QueryBlockRateLimitConfigurationResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBlockRateLimitConfigurationResponse) XXX_DiscardUnknown()
- func (m *QueryBlockRateLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBlockRateLimitConfigurationResponse) XXX_Merge(src proto.Message)
- func (m *QueryBlockRateLimitConfigurationResponse) XXX_Size() int
- func (m *QueryBlockRateLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryClobPairAllResponse
- func (*QueryClobPairAllResponse) Descriptor() ([]byte, []int)
- func (m *QueryClobPairAllResponse) GetClobPair() []ClobPair
- func (m *QueryClobPairAllResponse) GetPagination() *query.PageResponse
- func (m *QueryClobPairAllResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryClobPairAllResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClobPairAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClobPairAllResponse) ProtoMessage()
- func (m *QueryClobPairAllResponse) Reset()
- func (m *QueryClobPairAllResponse) Size() (n int)
- func (m *QueryClobPairAllResponse) String() string
- func (m *QueryClobPairAllResponse) Unmarshal(dAtA []byte) error
- func (m *QueryClobPairAllResponse) XXX_DiscardUnknown()
- func (m *QueryClobPairAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClobPairAllResponse) XXX_Merge(src proto.Message)
- func (m *QueryClobPairAllResponse) XXX_Size() int
- func (m *QueryClobPairAllResponse) XXX_Unmarshal(b []byte) error
- type QueryClobPairResponse
- func (*QueryClobPairResponse) Descriptor() ([]byte, []int)
- func (m *QueryClobPairResponse) GetClobPair() ClobPair
- func (m *QueryClobPairResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryClobPairResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClobPairResponse) ProtoMessage()
- func (m *QueryClobPairResponse) Reset()
- func (m *QueryClobPairResponse) Size() (n int)
- func (m *QueryClobPairResponse) String() string
- func (m *QueryClobPairResponse) Unmarshal(dAtA []byte) error
- func (m *QueryClobPairResponse) XXX_DiscardUnknown()
- func (m *QueryClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClobPairResponse) XXX_Merge(src proto.Message)
- func (m *QueryClobPairResponse) XXX_Size() int
- func (m *QueryClobPairResponse) XXX_Unmarshal(b []byte) error
- type QueryEquityTierLimitConfigurationRequest
- func (*QueryEquityTierLimitConfigurationRequest) Descriptor() ([]byte, []int)
- func (m *QueryEquityTierLimitConfigurationRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEquityTierLimitConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEquityTierLimitConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEquityTierLimitConfigurationRequest) ProtoMessage()
- func (m *QueryEquityTierLimitConfigurationRequest) Reset()
- func (m *QueryEquityTierLimitConfigurationRequest) Size() (n int)
- func (m *QueryEquityTierLimitConfigurationRequest) String() string
- func (m *QueryEquityTierLimitConfigurationRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEquityTierLimitConfigurationRequest) XXX_DiscardUnknown()
- func (m *QueryEquityTierLimitConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEquityTierLimitConfigurationRequest) XXX_Merge(src proto.Message)
- func (m *QueryEquityTierLimitConfigurationRequest) XXX_Size() int
- func (m *QueryEquityTierLimitConfigurationRequest) XXX_Unmarshal(b []byte) error
- type QueryEquityTierLimitConfigurationResponse
- func (*QueryEquityTierLimitConfigurationResponse) Descriptor() ([]byte, []int)
- func (m *QueryEquityTierLimitConfigurationResponse) GetEquityTierLimitConfig() EquityTierLimitConfiguration
- func (m *QueryEquityTierLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEquityTierLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEquityTierLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEquityTierLimitConfigurationResponse) ProtoMessage()
- func (m *QueryEquityTierLimitConfigurationResponse) Reset()
- func (m *QueryEquityTierLimitConfigurationResponse) Size() (n int)
- func (m *QueryEquityTierLimitConfigurationResponse) String() string
- func (m *QueryEquityTierLimitConfigurationResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEquityTierLimitConfigurationResponse) XXX_DiscardUnknown()
- func (m *QueryEquityTierLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEquityTierLimitConfigurationResponse) XXX_Merge(src proto.Message)
- func (m *QueryEquityTierLimitConfigurationResponse) XXX_Size() int
- func (m *QueryEquityTierLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
- type QueryGetClobPairRequest
- func (*QueryGetClobPairRequest) Descriptor() ([]byte, []int)
- func (m *QueryGetClobPairRequest) GetId() uint32
- func (m *QueryGetClobPairRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGetClobPairRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetClobPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetClobPairRequest) ProtoMessage()
- func (m *QueryGetClobPairRequest) Reset()
- func (m *QueryGetClobPairRequest) Size() (n int)
- func (m *QueryGetClobPairRequest) String() string
- func (m *QueryGetClobPairRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGetClobPairRequest) XXX_DiscardUnknown()
- func (m *QueryGetClobPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetClobPairRequest) XXX_Merge(src proto.Message)
- func (m *QueryGetClobPairRequest) XXX_Size() int
- func (m *QueryGetClobPairRequest) XXX_Unmarshal(b []byte) error
- type QueryLiquidationsConfigurationRequest
- func (*QueryLiquidationsConfigurationRequest) Descriptor() ([]byte, []int)
- func (m *QueryLiquidationsConfigurationRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryLiquidationsConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryLiquidationsConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryLiquidationsConfigurationRequest) ProtoMessage()
- func (m *QueryLiquidationsConfigurationRequest) Reset()
- func (m *QueryLiquidationsConfigurationRequest) Size() (n int)
- func (m *QueryLiquidationsConfigurationRequest) String() string
- func (m *QueryLiquidationsConfigurationRequest) Unmarshal(dAtA []byte) error
- func (m *QueryLiquidationsConfigurationRequest) XXX_DiscardUnknown()
- func (m *QueryLiquidationsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryLiquidationsConfigurationRequest) XXX_Merge(src proto.Message)
- func (m *QueryLiquidationsConfigurationRequest) XXX_Size() int
- func (m *QueryLiquidationsConfigurationRequest) XXX_Unmarshal(b []byte) error
- type QueryLiquidationsConfigurationResponse
- func (*QueryLiquidationsConfigurationResponse) Descriptor() ([]byte, []int)
- func (m *QueryLiquidationsConfigurationResponse) GetLiquidationsConfig() LiquidationsConfig
- func (m *QueryLiquidationsConfigurationResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryLiquidationsConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryLiquidationsConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryLiquidationsConfigurationResponse) ProtoMessage()
- func (m *QueryLiquidationsConfigurationResponse) Reset()
- func (m *QueryLiquidationsConfigurationResponse) Size() (n int)
- func (m *QueryLiquidationsConfigurationResponse) String() string
- func (m *QueryLiquidationsConfigurationResponse) Unmarshal(dAtA []byte) error
- func (m *QueryLiquidationsConfigurationResponse) XXX_DiscardUnknown()
- func (m *QueryLiquidationsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryLiquidationsConfigurationResponse) XXX_Merge(src proto.Message)
- func (m *QueryLiquidationsConfigurationResponse) XXX_Size() int
- func (m *QueryLiquidationsConfigurationResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Query_StreamOrderbookUpdatesClient
- type Query_StreamOrderbookUpdatesServer
- type SortedClobPairId
- type SortedLongTermOrderPlacements
- type SortedOrderHashes
- type SortedOrders
- type SortedStatefulOrderPlacement
- type SpotClobMetadata
- func (*SpotClobMetadata) Descriptor() ([]byte, []int)
- func (m *SpotClobMetadata) GetBaseAssetId() uint32
- func (m *SpotClobMetadata) GetQuoteAssetId() uint32
- func (m *SpotClobMetadata) Marshal() (dAtA []byte, err error)
- func (m *SpotClobMetadata) MarshalTo(dAtA []byte) (int, error)
- func (m *SpotClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SpotClobMetadata) ProtoMessage()
- func (m *SpotClobMetadata) Reset()
- func (m *SpotClobMetadata) Size() (n int)
- func (m *SpotClobMetadata) String() string
- func (m *SpotClobMetadata) Unmarshal(dAtA []byte) error
- func (m *SpotClobMetadata) XXX_DiscardUnknown()
- func (m *SpotClobMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SpotClobMetadata) XXX_Merge(src proto.Message)
- func (m *SpotClobMetadata) XXX_Size() int
- func (m *SpotClobMetadata) XXX_Unmarshal(b []byte) error
- type StatefulOrderPlacement
- type StatefulOrderTimeSliceValue
- func (*StatefulOrderTimeSliceValue) Descriptor() ([]byte, []int)
- func (m *StatefulOrderTimeSliceValue) GetOrderIds() []OrderId
- func (m *StatefulOrderTimeSliceValue) Marshal() (dAtA []byte, err error)
- func (m *StatefulOrderTimeSliceValue) MarshalTo(dAtA []byte) (int, error)
- func (m *StatefulOrderTimeSliceValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StatefulOrderTimeSliceValue) ProtoMessage()
- func (m *StatefulOrderTimeSliceValue) Reset()
- func (m *StatefulOrderTimeSliceValue) Size() (n int)
- func (m *StatefulOrderTimeSliceValue) String() string
- func (m *StatefulOrderTimeSliceValue) Unmarshal(dAtA []byte) error
- func (m *StatefulOrderTimeSliceValue) XXX_DiscardUnknown()
- func (m *StatefulOrderTimeSliceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatefulOrderTimeSliceValue) XXX_Merge(src proto.Message)
- func (m *StatefulOrderTimeSliceValue) XXX_Size() int
- func (m *StatefulOrderTimeSliceValue) XXX_Unmarshal(b []byte) error
- type StatsKeeper
- type StreamOrderbookUpdatesRequest
- func (*StreamOrderbookUpdatesRequest) Descriptor() ([]byte, []int)
- func (m *StreamOrderbookUpdatesRequest) GetClobPairId() []uint32
- func (m *StreamOrderbookUpdatesRequest) Marshal() (dAtA []byte, err error)
- func (m *StreamOrderbookUpdatesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamOrderbookUpdatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamOrderbookUpdatesRequest) ProtoMessage()
- func (m *StreamOrderbookUpdatesRequest) Reset()
- func (m *StreamOrderbookUpdatesRequest) Size() (n int)
- func (m *StreamOrderbookUpdatesRequest) String() string
- func (m *StreamOrderbookUpdatesRequest) Unmarshal(dAtA []byte) error
- func (m *StreamOrderbookUpdatesRequest) XXX_DiscardUnknown()
- func (m *StreamOrderbookUpdatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamOrderbookUpdatesRequest) XXX_Merge(src proto.Message)
- func (m *StreamOrderbookUpdatesRequest) XXX_Size() int
- func (m *StreamOrderbookUpdatesRequest) XXX_Unmarshal(b []byte) error
- type StreamOrderbookUpdatesResponse
- func (*StreamOrderbookUpdatesResponse) Descriptor() ([]byte, []int)
- func (m *StreamOrderbookUpdatesResponse) GetBlockHeight() uint32
- func (m *StreamOrderbookUpdatesResponse) GetExecMode() uint32
- func (m *StreamOrderbookUpdatesResponse) GetSnapshot() bool
- func (m *StreamOrderbookUpdatesResponse) GetUpdates() []types.OffChainUpdateV1
- func (m *StreamOrderbookUpdatesResponse) Marshal() (dAtA []byte, err error)
- func (m *StreamOrderbookUpdatesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamOrderbookUpdatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamOrderbookUpdatesResponse) ProtoMessage()
- func (m *StreamOrderbookUpdatesResponse) Reset()
- func (m *StreamOrderbookUpdatesResponse) Size() (n int)
- func (m *StreamOrderbookUpdatesResponse) String() string
- func (m *StreamOrderbookUpdatesResponse) Unmarshal(dAtA []byte) error
- func (m *StreamOrderbookUpdatesResponse) XXX_DiscardUnknown()
- func (m *StreamOrderbookUpdatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamOrderbookUpdatesResponse) XXX_Merge(src proto.Message)
- func (m *StreamOrderbookUpdatesResponse) XXX_Size() int
- func (m *StreamOrderbookUpdatesResponse) XXX_Unmarshal(b []byte) error
- type SubaccountLiquidationInfo
- func (*SubaccountLiquidationInfo) Descriptor() ([]byte, []int)
- func (m *SubaccountLiquidationInfo) GetPerpetualsLiquidated() []uint32
- func (sli *SubaccountLiquidationInfo) HasPerpetualBeenLiquidatedForSubaccount(perpetualId uint32) bool
- func (m *SubaccountLiquidationInfo) Marshal() (dAtA []byte, err error)
- func (m *SubaccountLiquidationInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SubaccountLiquidationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SubaccountLiquidationInfo) ProtoMessage()
- func (m *SubaccountLiquidationInfo) Reset()
- func (m *SubaccountLiquidationInfo) Size() (n int)
- func (m *SubaccountLiquidationInfo) String() string
- func (m *SubaccountLiquidationInfo) Unmarshal(dAtA []byte) error
- func (m *SubaccountLiquidationInfo) XXX_DiscardUnknown()
- func (m *SubaccountLiquidationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubaccountLiquidationInfo) XXX_Merge(src proto.Message)
- func (m *SubaccountLiquidationInfo) XXX_Size() int
- func (m *SubaccountLiquidationInfo) XXX_Unmarshal(b []byte) error
- type SubaccountOpenPositionInfo
- func (*SubaccountOpenPositionInfo) Descriptor() ([]byte, []int)
- func (m *SubaccountOpenPositionInfo) GetPerpetualId() uint32
- func (m *SubaccountOpenPositionInfo) GetSubaccountsWithLongPosition() []types.SubaccountId
- func (m *SubaccountOpenPositionInfo) GetSubaccountsWithShortPosition() []types.SubaccountId
- func (m *SubaccountOpenPositionInfo) Marshal() (dAtA []byte, err error)
- func (m *SubaccountOpenPositionInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SubaccountOpenPositionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SubaccountOpenPositionInfo) ProtoMessage()
- func (m *SubaccountOpenPositionInfo) Reset()
- func (m *SubaccountOpenPositionInfo) Size() (n int)
- func (m *SubaccountOpenPositionInfo) String() string
- func (m *SubaccountOpenPositionInfo) Unmarshal(dAtA []byte) error
- func (m *SubaccountOpenPositionInfo) XXX_DiscardUnknown()
- func (m *SubaccountOpenPositionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubaccountOpenPositionInfo) XXX_Merge(src proto.Message)
- func (m *SubaccountOpenPositionInfo) XXX_Size() int
- func (m *SubaccountOpenPositionInfo) XXX_Unmarshal(b []byte) error
- type SubaccountsKeeper
- type Subticks
- type SubticksPerTick
- type TakerOrderStatus
- type TransactionOrdering
- func (*TransactionOrdering) Descriptor() ([]byte, []int)
- func (m *TransactionOrdering) GetBlockHeight() uint32
- func (m *TransactionOrdering) GetTransactionIndex() uint32
- func (m *TransactionOrdering) Marshal() (dAtA []byte, err error)
- func (m *TransactionOrdering) MarshalTo(dAtA []byte) (int, error)
- func (m *TransactionOrdering) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TransactionOrdering) ProtoMessage()
- func (m *TransactionOrdering) Reset()
- func (m *TransactionOrdering) Size() (n int)
- func (m *TransactionOrdering) String() string
- func (m *TransactionOrdering) Unmarshal(dAtA []byte) error
- func (m *TransactionOrdering) XXX_DiscardUnknown()
- func (m *TransactionOrdering) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransactionOrdering) XXX_Merge(src proto.Message)
- func (m *TransactionOrdering) XXX_Size() int
- func (m *TransactionOrdering) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) BatchCancel(ctx context.Context, req *MsgBatchCancel) (*MsgBatchCancelResponse, error)
- func (*UnimplementedMsgServer) CancelOrder(ctx context.Context, req *MsgCancelOrder) (*MsgCancelOrderResponse, error)
- func (*UnimplementedMsgServer) CreateClobPair(ctx context.Context, req *MsgCreateClobPair) (*MsgCreateClobPairResponse, error)
- func (*UnimplementedMsgServer) PlaceOrder(ctx context.Context, req *MsgPlaceOrder) (*MsgPlaceOrderResponse, error)
- func (*UnimplementedMsgServer) ProposedOperations(ctx context.Context, req *MsgProposedOperations) (*MsgProposedOperationsResponse, error)
- func (*UnimplementedMsgServer) UpdateBlockRateLimitConfiguration(ctx context.Context, req *MsgUpdateBlockRateLimitConfiguration) (*MsgUpdateBlockRateLimitConfigurationResponse, error)
- func (*UnimplementedMsgServer) UpdateClobPair(ctx context.Context, req *MsgUpdateClobPair) (*MsgUpdateClobPairResponse, error)
- func (*UnimplementedMsgServer) UpdateEquityTierLimitConfiguration(ctx context.Context, req *MsgUpdateEquityTierLimitConfiguration) (*MsgUpdateEquityTierLimitConfigurationResponse, error)
- func (*UnimplementedMsgServer) UpdateLiquidationsConfig(ctx context.Context, req *MsgUpdateLiquidationsConfig) (*MsgUpdateLiquidationsConfigResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) BlockRateLimitConfiguration(ctx context.Context, req *QueryBlockRateLimitConfigurationRequest) (*QueryBlockRateLimitConfigurationResponse, error)
- func (*UnimplementedQueryServer) ClobPair(ctx context.Context, req *QueryGetClobPairRequest) (*QueryClobPairResponse, error)
- func (*UnimplementedQueryServer) ClobPairAll(ctx context.Context, req *QueryAllClobPairRequest) (*QueryClobPairAllResponse, error)
- func (*UnimplementedQueryServer) EquityTierLimitConfiguration(ctx context.Context, req *QueryEquityTierLimitConfigurationRequest) (*QueryEquityTierLimitConfigurationResponse, error)
- func (*UnimplementedQueryServer) LiquidationsConfiguration(ctx context.Context, req *QueryLiquidationsConfigurationRequest) (*QueryLiquidationsConfigurationResponse, error)
- func (*UnimplementedQueryServer) MevNodeToNodeCalculation(ctx context.Context, req *MevNodeToNodeCalculationRequest) (*MevNodeToNodeCalculationResponse, error)
- func (*UnimplementedQueryServer) StreamOrderbookUpdates(req *StreamOrderbookUpdatesRequest, srv Query_StreamOrderbookUpdatesServer) error
- type ValidatorMevMatches
- func (*ValidatorMevMatches) Descriptor() ([]byte, []int)
- func (m *ValidatorMevMatches) GetLiquidationMatches() []MEVLiquidationMatch
- func (m *ValidatorMevMatches) GetMatches() []MEVMatch
- func (m *ValidatorMevMatches) Marshal() (dAtA []byte, err error)
- func (m *ValidatorMevMatches) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorMevMatches) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorMevMatches) ProtoMessage()
- func (m *ValidatorMevMatches) Reset()
- func (m *ValidatorMevMatches) Size() (n int)
- func (m *ValidatorMevMatches) String() string
- func (m *ValidatorMevMatches) Unmarshal(dAtA []byte) error
- func (m *ValidatorMevMatches) XXX_DiscardUnknown()
- func (m *ValidatorMevMatches) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorMevMatches) XXX_Merge(src proto.Message)
- func (m *ValidatorMevMatches) XXX_Size() int
- func (m *ValidatorMevMatches) XXX_Unmarshal(b []byte) error
Constants ¶
const ( MaxShortTermOrdersAndCancelsPerNBlocksNumBlocks = 2_000 MaxShortTermOrdersAndCancelsPerNBlocksLimit = 10_000_000 MaxStatefulOrdersPerNBlocksNumBlocks = 10_000 MaxStatefulOrdersPerNBlocksLimit = 1_000_000 )
const ( MaxShortTermOrdersForEquityTier = 10_000_000 MaxStatefulOrdersForEquityTier = 10_000_000 )
const ( EventTypeMatch = "match" AttributeKeyTakerSubaccount = "taker_subaccount" AttributeKeyTakerSubaccountNumber = "taker_subaccount_number" AttributeKeyMakerSubaccount = "maker_subaccount" AttributeKeyMakerSubaccountNumber = "maker_subaccount_number" AttributeKeyTakerOrderFeeQuoteQuantums = "taker_order_fee_quote_quantums" AttributeKeyMakerOrderFeeQuoteQuantums = "maker_order_fee_quote_quantums" AttributeKeyMakerQuoteBalanceDeltaQuoteQuantums = "maker_quote_balance_delta_quote_quantums" AttributeKeyTakerQuoteBalanceDeltaQuoteQuantums = "taker_quote_balance_delta_quote_quantums" AttributeKeyMakerPerpetualQuantumsDeltaBaseQuantums = "maker_perpetual_quantums_delta_base_quantums" AttributeKeyTakerPerpetualQuantumsDeltaBaseQuantums = "taker_perpetual_quantums_delta_base_quantums" AttributeKeyInsuranceFundDeltaQuoteQuantums = "insurance_fund_delta_quote_quantums" AttributeKeyValidatorFeeQuoteQuantums = "validator_fee_quote_quantums" AttributeKeyLiquidityFeeQuoteQuantums = "liquidity_fee_quote_quantums" AttributeKeyTakerRouterFeeQuoteQuantums = "taker_router_fee_quote_quantums" AttributeKeyMakerRouterFeeQuoteQuantums = "maker_router_fee_quote_quantums" AttributeKeyIsLiquidation = "is_liquidation" AttributeKeyIsDeleverage = "is_deleverage" AttributeKeyPerpetualId = "perpetual_id" )
CLOB module event types.
const ( // ModuleName defines the module name ModuleName = "clob" // StoreKey defines the primary module store key StoreKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_" + ModuleName // TransientStoreKey defines the primary module transient store key TransientStoreKey = "tmp_" + ModuleName )
Module name and store keys
const ( // StatefulOrderKeyPrefix is the prefix key for all long term orders and all conditional orders, // both triggered and untriggered. StatefulOrderKeyPrefix = "SO/" // PlacedStatefulOrderKeyPrefix is the prefix key for placed long term orders and triggered // conditional orders. It represents all stateful orders that should be placed upon the memclob // during app start up. PlacedStatefulOrderKeyPrefix = StatefulOrderKeyPrefix + "P/" // PrunableOrdersKeyPrefix is the prefix key for orders prunable at a certain height. PrunableOrdersKeyPrefix = "PO/" )
Below key prefixes are not explicitly used to read/write to state, but rather used to iterate over certain groups of items stored in state.
const ( // LiquidationsConfigKey is the key to retrieve the liquidations config. LiquidationsConfigKey = "LiqCfg" // EquityTierLimitConfigKey is the key to retrieve the equity tier limit configuration. EquityTierLimitConfigKey = "EqTierCfg" // BlockRateLimitConfigKey is the key to retrieve the block rate limit configuration. BlockRateLimitConfigKey = "RateLimCfg" // ClobPairKeyPrefix is the prefix to retrieve all ClobPair ClobPairKeyPrefix = "Clob:" // OrderAmountFilledKeyPrefix is the prefix to retrieve the fill amount for an order. OrderAmountFilledKeyPrefix = "Fill:" // Deprecated: LegacyBlockHeightToPotentiallyPrunableOrdersPrefix is the prefix to retrieve a list of // potentially prunable short term orders by block height. Should not be used after migrating to // key-per-order format. LegacyBlockHeightToPotentiallyPrunableOrdersPrefix = "ExpHt:" // StatefulOrdersTimeSlicePrefix is the key to retrieve a unique list of the stateful orders that // expire at a given timestamp, sorted by order ID. StatefulOrdersTimeSlicePrefix = "ExpTm:" )
State
const ( // TriggeredConditionalOrderKeyPrefix is the key to retrieve an triggered conditional order and // information about when it was triggered. TriggeredConditionalOrderKeyPrefix = PlacedStatefulOrderKeyPrefix + "T:" // LongTermOrderPlacementKeyPrefix is the key to retrieve a long term order and information about // when it was placed. LongTermOrderPlacementKeyPrefix = PlacedStatefulOrderKeyPrefix + "L:" // UntriggeredConditionalOrderKeyPrefix is the key to retrieve an untriggered conditional order and // information about when it was placed. UntriggeredConditionalOrderKeyPrefix = StatefulOrderKeyPrefix + "U:" )
Store / Memstore
const ( // ProcessProposerMatchesEventsKey is the key to retrieve information about how to update // memclob state based on the latest block. ProcessProposerMatchesEventsKey = "ProposerEvents" // StatefulOrderCountPrefix is the key to retrieve the stateful order count. The stateful order count // represents the number of stateful orders stored in state. StatefulOrderCountPrefix = "NumSO:" )
Memstore
const ( // SubaccountLiquidationInfoKeyPrefix is the prefix to retrieve the liquidation information // for a subaccount within the last block. SubaccountLiquidationInfoKeyPrefix = "SaLiqInfo:" // CumulativeInsuranceFundDeltaKeyPrefix is the prefix to retrieve the cumulative insurance // fund delta CumulativeInsuranceFundDeltaKeyPrefix = "CumInsFundDelta:" // NextStatefulOrderBlockTransactionIndexKey is the transient store key that stores the next // transaction index to use for the next newly-placed stateful order. NextStatefulOrderBlockTransactionIndexKey = "NextTxIdx" // UncommittedStatefulOrderPlacementKeyPrefix is the key to retrieve an uncommitted stateful order and information // about when it was placed. Uncommitted orders are orders that this validator is aware of that have yet to be // committed to a block and are stored in a transient store. UncommittedStatefulOrderPlacementKeyPrefix = "UncmtSO:" // UncommittedStatefulOrderCancellationKeyPrefix is the key to retrieve an uncommitted stateful order cancellation. // Uncommitted cancelleations are cancellations that this validator is aware of that have yet to be // committed to a block and are stored in a transient store. UncommittedStatefulOrderCancellationKeyPrefix = "UncmtSOCxl:" // UncommittedStatefulOrderCountPrefix is the key to retrieve an uncommitted stateful order count. // Uncommitted orders are orders that this validator is aware of that have yet to be committed to a block and // are stored in a transient store. This count represents the number of uncommitted stateful // `placements - cancellations`. UncommittedStatefulOrderCountPrefix = "NumUncmtSO:" // MinTradePricePrefix is the key prefix to retrieve the min trade price for a perpetual. // This is meant to be used for improved conditional order triggering. MinTradePricePrefix = "MinTrade:" // MaxTradePricePrefix is the key prefix to retrieve the max trade price for a perpetual. // This is meant to be used for improved conditional order triggering. MaxTradePricePrefix = "MaxTrade:" )
Transient Store
const ( OrderIdFlags_ShortTerm = uint32(0) OrderIdFlags_Conditional = uint32(32) OrderIdFlags_LongTerm = uint32(64) )
const ConditionalOrderTriggerMultiplier uint64 = 25
ConditionalOrderTriggerMultiplier represents the multiplier used to calculate the upper and lower bounds of the trigger price for a conditional order. The upper bound is calculated as:
upper_bound = (1 + min_price_change_ppm / 1_000_000 * conditional_order_trigger_multiplier) * oracle_price
The lower bound is calculated as:
lower_bound = (1 - min_price_change_ppm / 1_000_000 * conditional_order_trigger_multiplier) * oracle_price
const MaxMsgBatchCancelBatchSize uint32 = 100
MaxMsgBatchCancelBatchSize represents the maximum number of cancels that a MsgBatchCancel can have in one Msg.
const ShortBlockWindow uint32 = 20
ShortBlockWindow represents the maximum number of blocks past the current block height that a `MsgPlaceOrder` or `MsgCancelOrder` message will be considered valid by the validator.
const StatefulOrderTimeWindow time.Duration = 95 * 24 * time.Hour // 95 days.
StatefulOrderTimeWindow represents the maximum amount of time in seconds past the current block time that a long-term/conditional `MsgPlaceOrder` message will be considered valid by the validator.
const TypeMsgCancelOrder = "cancel_order"
const TypeMsgPlaceOrder = "place_order"
const TypeMsgProposedOperations = "proposed_operations"
Variables ¶
var ( ErrInvalidLengthBlockRateLimitConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBlockRateLimitConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBlockRateLimitConfig = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthClobPair = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowClobPair = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupClobPair = fmt.Errorf("proto: unexpected end of group") )
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(module.InterfaceRegistry) )
var ( ErrInvalidLengthEquityTierLimitConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEquityTierLimitConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEquityTierLimitConfig = fmt.Errorf("proto: unexpected end of group") )
var ( ErrMemClobOrderDoesNotExist = errorsmod.Register( ModuleName, 2, "Order does not exist in memclob", ) ErrInvalidOrderSide = errorsmod.Register( ModuleName, 3, "Invalid order side", ) ErrInvalidOrderQuantums = errorsmod.Register(ModuleName, 4, "Invalid order quantums") ErrInvalidOrderGoodTilBlock = errorsmod.Register(ModuleName, 5, "Invalid order goodTilBlock") ErrInvalidOrderSubticks = errorsmod.Register(ModuleName, 6, "Invalid order subticks") ErrOrderIsCanceled = errorsmod.Register( ModuleName, 7, "Attempt to place an order that is already canceled", ) ErrInvalidClob = errorsmod.Register( ModuleName, 8, "ClobPair ID does not reference a valid CLOB", ) ErrMemClobCancelAlreadyExists = errorsmod.Register( ModuleName, 9, "A cancel already exists in the memclob for this order with a greater than or equal GoodTilBlock", ) ErrHeightExceedsGoodTilBlock = errorsmod.Register( ModuleName, 10, "The next block height is greater than the GoodTilBlock of the message", ) ErrGoodTilBlockExceedsShortBlockWindow = errorsmod.Register( ModuleName, 11, "The GoodTilBlock of the message is further than ShortBlockWindow blocks into the future", ) ErrInvalidPlaceOrder = errorsmod.Register( ModuleName, 12, "MsgPlaceOrder is invalid", ) ErrInvalidMsgProposedMatchOrders = errorsmod.Register( ModuleName, 13, "MsgProposedMatchOrders is invalid", ) ErrStateFilledAmountNoChange = errorsmod.Register( ModuleName, 14, "State filled amount cannot be unchanged", ) ErrStateFilledAmountDecreasing = errorsmod.Register( ModuleName, 15, "State filled amount cannot decrease", ) ErrInvalidPruneStateFilledAmount = errorsmod.Register( ModuleName, 16, "Cannot prune state fill amount that does not exist", ) ErrOrderWouldExceedMaxOpenOrdersPerClobAndSide = errorsmod.Register( ModuleName, 17, "Subaccount cannot open more than 20 orders on a given CLOB and side", ) ErrFillAmountNotDivisibleByStepSize = errorsmod.Register( ModuleName, 18, "`FillAmount` is not divisible by `StepBaseQuantums` of the specified `ClobPairId`", ) ErrNoClobPairForPerpetual = errorsmod.Register( ModuleName, 19, "The provided perpetual ID does not have any associated CLOB pairs", ) ErrInvalidReplacement = errorsmod.Register( ModuleName, 20, "An order with the same `OrderId` already exists for this CLOB with a greater-than-or-equal `GoodTilBlock` "+ "or Order Hash", ) ErrClobPairAndPerpetualDoNotMatch = errorsmod.Register( ModuleName, 21, "Clob pair and perpetual ids do not match", ) ErrMatchedOrderNegativeFee = errorsmod.Register( ModuleName, 22, "Matched order has negative fee", ) ErrSubaccountFeeTransferFailed = errorsmod.Register( ModuleName, 23, "Subaccounts updated for a matched order, but fee transfer to fee-collector failed", ) ErrOrderFullyFilled = errorsmod.Register( ModuleName, 24, "Order is fully filled", ) ErrPremiumWithNonPerpetualClobPair = errorsmod.Register( ModuleName, 25, "Attempting to get price premium with a non-perpetual CLOB pair", ) ErrZeroDaemonPriceForPremiumCalculation = errorsmod.Register( ModuleName, 26, "daemon price is zero when calculating price premium", ) ErrInvalidClobPairParameter = errorsmod.Register( ModuleName, 27, "Invalid ClobPair parameter", ) ErrZeroPriceForOracle = errorsmod.Register( ModuleName, 28, "Oracle price must be > 0.", ) ErrInvalidStatefulOrderCancellation = errorsmod.Register( ModuleName, 29, "Invalid stateful order cancellation", ) ErrOrderReprocessed = errorsmod.Register( ModuleName, 30, "An order with the same `OrderId` and `OrderHash` has already been processed for this CLOB", ) ErrMissingMidPrice = errorsmod.Register( ModuleName, 31, "Missing mid price for ClobPair", ) ErrStatefulOrderCancellationAlreadyExists = errorsmod.Register( ModuleName, 32, "Existing stateful order cancellation has higher-or-equal priority than the new one", ) ErrClobPairAlreadyExists = errorsmod.Register( ModuleName, 33, "ClobPair with id already exists", ) ErrOrderConflictsWithClobPairStatus = errorsmod.Register( ModuleName, 34, "Order conflicts with ClobPair status", ) ErrInvalidClobPairStatusTransition = errorsmod.Register( ModuleName, 35, "Invalid ClobPair status transition", ) ErrOperationConflictsWithClobPairStatus = errorsmod.Register( ModuleName, 36, "Operation conflicts with ClobPair status", ) ErrPerpetualDoesNotExist = errorsmod.Register( ModuleName, 37, "Perpetual does not exist in state", ) ErrInvalidClobPairUpdate = errorsmod.Register( ModuleName, 39, "ClobPair update is invalid", ) ErrInvalidAuthority = errorsmod.Register( ModuleName, 40, "Authority is invalid", ) ErrPerpetualAssociatedWithExistingClobPair = errorsmod.Register( ModuleName, 41, "perpetual ID is already associated with an existing CLOB pair", ) ErrUnexpectedTimeInForce = errorsmod.Register( ModuleName, 42, "Unexpected time in force", ) ErrOrderHasRemainingSize = errorsmod.Register( ModuleName, 43, "Order has remaining size", ) ErrInvalidTimeInForce = errorsmod.Register( ModuleName, 44, "invalid time in force", ) ErrInvalidBatchCancel = errorsmod.Register( ModuleName, 45, "Invalid batch cancel message", ) ErrBatchCancelFailed = errorsmod.Register( ModuleName, 46, "Batch cancel has failed", ) ErrClobNotInitialized = errorsmod.Register( ModuleName, 47, "CLOB has not been initialized", ) // Liquidations errors. ErrInvalidLiquidationsConfig = errorsmod.Register( ModuleName, 1000, "Proposed LiquidationsConfig is invalid", ) ErrNoPerpetualPositionsToLiquidate = errorsmod.Register( ModuleName, 1001, "Subaccount has no perpetual positions to liquidate", ) ErrSubaccountNotLiquidatable = errorsmod.Register( ModuleName, 1002, "Subaccount is not liquidatable", ) ErrNoOpenPositionForPerpetual = errorsmod.Register( ModuleName, 1003, "Subaccount does not have an open position for perpetual", ) ErrInvalidLiquidationOrderTotalSize = errorsmod.Register( ModuleName, 1004, "Liquidation order has invalid size", ) ErrInvalidLiquidationOrderSide = errorsmod.Register( ModuleName, 1005, "Liquidation order is on the wrong side", ) ErrTotalFillAmountExceedsOrderSize = errorsmod.Register( ModuleName, 1006, "Total fills amount exceeds size of liquidation order", ) ErrLiquidationContainsNoFills = errorsmod.Register( ModuleName, 1007, "Liquidation order does not contain any fills", ) ErrSubaccountHasLiquidatedPerpetual = errorsmod.Register( ModuleName, 1008, "Subaccount has previously liquidated this perpetual in the current block", ) ErrLiquidationOrderSizeSmallerThanMin = errorsmod.Register( ModuleName, 1009, "Liquidation order has size smaller than min position notional specified in the liquidation config", ) ErrLiquidationOrderSizeGreaterThanMax = errorsmod.Register( ModuleName, 1010, "Liquidation order has size greater than max position notional specified in the liquidation config", ) ErrLiquidationExceedsMaxInsuranceLost = errorsmod.Register( ModuleName, 1012, "Liquidation exceeds the maximum insurance fund payout amount per block", ) ErrInsuranceFundHasInsufficientFunds = errorsmod.Register( ModuleName, 1013, "Insurance fund does not have sufficient funds to cover liquidation losses", ) ErrInvalidPerpetualPositionSizeDelta = errorsmod.Register( ModuleName, 1014, "Invalid perpetual position size delta", ) ErrInvalidQuantumsForInsuranceFundDeltaCalculation = errorsmod.Register( ModuleName, 1015, "Invalid delta base and/or quote quantums for insurance fund delta calculation", ) // TODO: Should the error code be skipped or re-assigned? ErrDeleveragingAgainstSelf = errorsmod.Register( ModuleName, 1017, "Cannot deleverage subaccount against itself", ) ErrDuplicateDeleveragingFillSubaccounts = errorsmod.Register( ModuleName, 1018, "Deleveraging match cannot have fills with same id", ) ErrZeroDeleveragingFillAmount = errorsmod.Register( ModuleName, 1019, "Deleveraging match cannot have fills with zero amount", ) ErrPositionCannotBeFullyOffset = errorsmod.Register( ModuleName, 1020, "Position cannot be fully offset", ) ErrDeleveragingIsFinalSettlementFlagMismatch = errorsmod.Register( ModuleName, 1021, "Deleveraging match has incorrect value for isFinalSettlement flag", ) ErrLiquidationConflictsWithClobPairStatus = errorsmod.Register( ModuleName, 1022, "Liquidation conflicts with ClobPair status", ) // Advanced order type errors. ErrFokOrderCouldNotBeFullyFilled = errorsmod.Register( ModuleName, 2000, "FillOrKill order could not be fully filled", ) ErrReduceOnlyWouldIncreasePositionSize = errorsmod.Register( ModuleName, 2001, "Reduce-only orders cannot increase the position size", ) ErrReduceOnlyWouldChangePositionSide = errorsmod.Register( ModuleName, 2002, "Reduce-only orders cannot change the position side", ) ErrPostOnlyWouldCrossMakerOrder = errorsmod.Register( ModuleName, 2003, "Post-only order would cross one or more maker orders", ) ErrImmediateExecutionOrderAlreadyFilled = errorsmod.Register( ModuleName, 2004, "IOC/FOK order is already filled, remaining size is cancelled.", ) // Stateful order errors. ErrWouldViolateIsolatedSubaccountConstraints = errorsmod.Register( ModuleName, 2005, "Order would violate isolated subaccount constraints.", ) ErrInvalidOrderFlag = errorsmod.Register( ModuleName, 3000, "Invalid order flags", ) ErrInvalidStatefulOrderGoodTilBlockTime = errorsmod.Register( ModuleName, 3001, "Invalid order goodTilBlockTime", ) ErrLongTermOrdersCannotRequireImmediateExecution = errorsmod.Register( ModuleName, 3002, "Stateful orders cannot require immediate execution", ) ErrTimeExceedsGoodTilBlockTime = errorsmod.Register( ModuleName, 3003, "The block time is greater than the GoodTilBlockTime of the message", ) ErrGoodTilBlockTimeExceedsStatefulOrderTimeWindow = errorsmod.Register( ModuleName, 3004, "The GoodTilBlockTime of the message is further than StatefulOrderTimeWindow into the future", ) ErrStatefulOrderAlreadyExists = errorsmod.Register( ModuleName, 3005, "Existing stateful order has higher-or-equal priority than the new one", ) ErrStatefulOrderDoesNotExist = errorsmod.Register( ModuleName, 3006, "Stateful order does not exist", ) ErrStatefulOrderCollateralizationCheckFailed = errorsmod.Register( ModuleName, 3007, "Stateful order collateralization check failed", ) ErrStatefulOrderPreviouslyCancelled = errorsmod.Register( ModuleName, 3008, "Stateful order was previously cancelled and therefore cannot be placed", ) ErrStatefulOrderPreviouslyRemoved = errorsmod.Register( ModuleName, 3009, "Stateful order was previously removed and therefore cannot be placed", ) ErrStatefulOrderCancellationFailedForAlreadyRemovedOrder = errorsmod.Register( ModuleName, 3010, "Stateful order cancellation failed because the order was already removed from state", ) // Operations Queue validation errors ErrInvalidMsgProposedOperations = errorsmod.Register( ModuleName, 4000, "MsgProposedOperations is invalid", ) ErrInvalidMatchOrder = errorsmod.Register( ModuleName, 4001, "Match Order is invalid", ) ErrOrderPlacementNotInOperationsQueue = errorsmod.Register( ModuleName, 4002, "Order was not previously placed in operations queue", ) ErrFillAmountIsZero = errorsmod.Register( ModuleName, 4003, "Fill amount cannot be zero", ) ErrInvalidDeleveragingFill = errorsmod.Register( ModuleName, 4004, "Deleveraging fill is invalid", ) ErrInvalidDeleveragedSubaccount = errorsmod.Register( ModuleName, 4005, "Deleveraged subaccount in proposed deleveraged operation failed deleveraging validation", ) ErrInvalidOrderRemoval = errorsmod.Register( ModuleName, 4006, "Order Removal is invalid", ) ErrInvalidOrderRemovalReason = errorsmod.Register( ModuleName, 4007, "Order Removal reason is invalid", ) ErrZeroFillDeleveragingForNonNegativeTncSubaccount = errorsmod.Register( ModuleName, 4008, "Zero-fill deleveraging operation included in block for non-negative TNC subaccount", ) // Block rate limit errors. ErrInvalidBlockRateLimitConfig = errorsmod.Register( ModuleName, 5000, "Proposed BlockRateLimitConfig is invalid", ) ErrBlockRateLimitExceeded = errorsmod.Register( ModuleName, 5001, "Block rate limit exceeded", ) // Conditional order errors. ErrInvalidConditionType = errorsmod.Register( ModuleName, 6000, "Conditional type is invalid", ) ErrInvalidConditionalOrderTriggerSubticks = errorsmod.Register( ModuleName, 6001, "Conditional order trigger subticks is invalid", ) ErrConditionalOrderUntriggered = errorsmod.Register( ModuleName, 6002, "Conditional order is untriggered", ) ErrInvalidRouterFeePpm = errorsmod.Register( ModuleName, 6003, "Router fee ppm is invalid", ) ErrInvalidRouterSubaccountId = errorsmod.Register( ModuleName, 6004, "Router subaccount ID is invalid", ) // Errors for unimplemented and disabled functionality. ErrAssetOrdersNotImplemented = errorsmod.Register( ModuleName, 9000, "Asset orders are not implemented", ) ErrAssetUpdateNotImplemented = errorsmod.Register( ModuleName, 9001, "Updates for assets other than TDAI are not implemented", ) ErrNotImplemented = errorsmod.Register( ModuleName, 9002, "This function is not implemented", ) ErrReduceOnlyDisabled = errorsmod.Register( ModuleName, 9003, "Reduce-only is currently disabled for non-FOK/IOC orders", ) // Equity tier limit errors. ErrInvalidEquityTierLimitConfig = errorsmod.Register( ModuleName, 10000, "Proposed EquityTierLimitConfig is invalid", ) ErrOrderWouldExceedMaxOpenOrdersEquityTierLimit = errorsmod.Register( ModuleName, 10001, "Subaccount cannot open more orders due to equity tier limit.", ) // GrpcStreamingManager errors. ErrGrpcStreamingManagerNotEnabled = errorsmod.Register( ModuleName, 11000, "GrpcStreamingManager is not enabled", ) ErrInvalidGrpcStreamingRequest = errorsmod.Register( ModuleName, 11001, "Invalid gRPC streaming request", ) )
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthLiquidations = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLiquidations = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLiquidations = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthLiquidationsConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLiquidationsConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLiquidationsConfig = fmt.Errorf("proto: unexpected end of group") )
var ( LiquidationsConfig_Default = LiquidationsConfig{ InsuranceFundFeePpm: 5_000, ValidatorFeePpm: 200_000, LiquidityFeePpm: 800_000, FillablePriceConfig: FillablePriceConfig{ BankruptcyAdjustmentPpm: lib.OneMillion, SpreadToMaintenanceMarginRatioPpm: 100_000, }, MaxCumulativeInsuranceFundDelta: uint64(1_000_000_000_000), } LiquidationsConfig_NoFee = LiquidationsConfig{ InsuranceFundFeePpm: 5_000, ValidatorFeePpm: 0, LiquidityFeePpm: 0, FillablePriceConfig: FillablePriceConfig{ BankruptcyAdjustmentPpm: lib.OneMillion, SpreadToMaintenanceMarginRatioPpm: 100_000, }, MaxCumulativeInsuranceFundDelta: uint64(1_000_000_000_000), } )
var ( ErrInvalidLengthMatches = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMatches = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMatches = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthMev = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMev = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMev = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthOperation = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOperation = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupOperation = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOrder = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupOrder = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthOrderRemovals = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOrderRemovals = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupOrderRemovals = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthProcessProposerMatchesEvents = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProcessProposerMatchesEvents = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupProcessProposerMatchesEvents = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ClobPair_Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_ACTIVE",
2: "STATUS_PAUSED",
3: "STATUS_CANCEL_ONLY",
4: "STATUS_POST_ONLY",
5: "STATUS_INITIALIZING",
6: "STATUS_FINAL_SETTLEMENT",
}
var ClobPair_Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_ACTIVE": 1,
"STATUS_PAUSED": 2,
"STATUS_CANCEL_ONLY": 3,
"STATUS_POST_ONLY": 4,
"STATUS_INITIALIZING": 5,
"STATUS_FINAL_SETTLEMENT": 6,
}
var OrderRemoval_RemovalReason_name = map[int32]string{
0: "REMOVAL_REASON_UNSPECIFIED",
1: "REMOVAL_REASON_UNDERCOLLATERALIZED",
2: "REMOVAL_REASON_INVALID_REDUCE_ONLY",
3: "REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER",
4: "REMOVAL_REASON_INVALID_SELF_TRADE",
5: "REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED",
6: "REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK",
7: "REMOVAL_REASON_FULLY_FILLED",
8: "REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS",
}
var OrderRemoval_RemovalReason_value = map[string]int32{
"REMOVAL_REASON_UNSPECIFIED": 0,
"REMOVAL_REASON_UNDERCOLLATERALIZED": 1,
"REMOVAL_REASON_INVALID_REDUCE_ONLY": 2,
"REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER": 3,
"REMOVAL_REASON_INVALID_SELF_TRADE": 4,
"REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED": 5,
"REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK": 6,
"REMOVAL_REASON_FULLY_FILLED": 7,
"REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS": 8,
}
var Order_ConditionType_name = map[int32]string{
0: "CONDITION_TYPE_UNSPECIFIED",
1: "CONDITION_TYPE_STOP_LOSS",
2: "CONDITION_TYPE_TAKE_PROFIT",
}
var Order_ConditionType_value = map[string]int32{
"CONDITION_TYPE_UNSPECIFIED": 0,
"CONDITION_TYPE_STOP_LOSS": 1,
"CONDITION_TYPE_TAKE_PROFIT": 2,
}
var Order_Side_name = map[int32]string{
0: "SIDE_UNSPECIFIED",
1: "SIDE_BUY",
2: "SIDE_SELL",
}
var Order_Side_value = map[string]int32{
"SIDE_UNSPECIFIED": 0,
"SIDE_BUY": 1,
"SIDE_SELL": 2,
}
var Order_TimeInForce_name = map[int32]string{
0: "TIME_IN_FORCE_UNSPECIFIED",
1: "TIME_IN_FORCE_IOC",
2: "TIME_IN_FORCE_POST_ONLY",
3: "TIME_IN_FORCE_FILL_OR_KILL",
}
var Order_TimeInForce_value = map[string]int32{
"TIME_IN_FORCE_UNSPECIFIED": 0,
"TIME_IN_FORCE_IOC": 1,
"TIME_IN_FORCE_POST_ONLY": 2,
"TIME_IN_FORCE_FILL_OR_KILL": 3,
}
var SupportedClobPairStatusTransitions = map[ClobPair_Status]map[ClobPair_Status]struct{}{
ClobPair_STATUS_ACTIVE: {
ClobPair_STATUS_FINAL_SETTLEMENT: struct{}{},
},
ClobPair_STATUS_INITIALIZING: {
ClobPair_STATUS_ACTIVE: struct{}{},
ClobPair_STATUS_FINAL_SETTLEMENT: struct{}{},
},
ClobPair_STATUS_FINAL_SETTLEMENT: {
ClobPair_STATUS_INITIALIZING: struct{}{},
},
}
SupportedClobPairStatusTransitions has keys corresponding to currently-supported ClobPair_Status types with values equal to the set of ClobPair_Status types that may be transitioned to from this state. Note the keys of this map may be a subset of the types defined in the proto for ClobPair_Status.
Functions ¶
func FillAmountToQuoteQuantums ¶
func FillAmountToQuoteQuantums( subticks Subticks, baseQuantums satypes.BaseQuantums, quantumConversionExponent int32, ) (bigNotional *big.Int)
FillAmountToQuoteQuantums converts a fill amount denoted in base quantums, to a price denoted in quote quantums given an order's subticks.
`subticks * 10^quantumConversionExponent` represents the price-per-base quantum of an order.
To convert from base to quote quantums, we use the following equation: `sizeQuoteQuantums = subticks * baseQuantums * 10^quantumConversionExponent`. Note that the result is rounded down.
Note: If `subticks`, `baseQuantums`, are small enough, `quantumConversionExponent` is negative, it's possible that this method returns `0` `quoteQuantums` for a non-zero amount of `baseQuantums`. This could mean that it's possible that a maker sell order on the book at a very unfavorable price (subticks) could receive `0` `quoteQuantums` amount. This case is unlikely to happen in a production environment as:
- The maker orders would need to be placed at a very unfavorable price for the maker. There is no incentive for makers to place such orders.
- The taker would need to place hundreds of thousands of transactions, filling the maker orders, in order to profit a single dollar of `quoteQuantums`.
func GetAveragePriceSubticks ¶
func GetAveragePriceSubticks( bigQuoteQuantums *big.Int, bigBaseQuantums *big.Int, quantumConversionExponent int32, ) (bigSubticks *big.Rat)
GetAveragePriceSubticks computes the average price (in subticks) of filled amount in `quoteQuantums` and `baseQuantums`. To calculate quote quantums from base quantums and subticks, we use the following equation: `sizeQuoteQuantums = subticks * baseQuantums * 10^quantumConversionExponent`.
Thus, to get `subticks`: `subticks = sizeQuoteQuantums * 10^(-quantumConversionExponent) / baseQuantums`
This function panics if `bigBaseQuantums == 0`. The result of division is rounded down.
func GetInternalOperationsQueueTextString ¶
func GetInternalOperationsQueueTextString(operations []InternalOperation) string
GetOperationsQueueString returns a string representation of the provided operations.
func IsSupportedClobPairStatus ¶
func IsSupportedClobPairStatus(clobPairStatus ClobPair_Status) bool
IsSupportedClobPairStatus returns true if the provided ClobPair_Status is in the list of currently supported ClobPair_Status types. Else, returns false.
func IsSupportedClobPairStatusTransition ¶
func IsSupportedClobPairStatusTransition(from ClobPair_Status, to ClobPair_Status) bool
IsSupportedClobPairStatusTransition returns true if it is considered valid to transition from the first provided ClobPair_Status to the second provided ClobPair_Status. Else, returns false. Transitions from a ClobPair_Status to itself are considered valid.
func MustSortAndHaveNoDuplicates ¶
func MustSortAndHaveNoDuplicates(orderIds []OrderId)
MustSortAndHaveNoDuplicates is a wrapper around SortedOrders, which is for deterministic sorting. Mutates input slice. This function checks for duplicate OrderIds first, and panics if a duplicate exists. Orders are first ordered by string comparison of their `Subaccount` owner, followed by integer comparison of their `Subaccount` number, followed by `ClientId` of the order, followed by `OrderFlags`, and finally by `ClobPairId` of the order.
func NewCreateMatchEvent ¶
func NewCreateMatchEvent( taker satypes.SubaccountId, maker satypes.SubaccountId, takerOrderFee *big.Int, makerOrderFee *big.Int, takerQuoteBalanceDelta *big.Int, makerQuoteBalanceDelta *big.Int, takerPerpetualQuantumsDelta *big.Int, makerPerpetualQuantumsDelta *big.Int, insuranceFundDelta *big.Int, validatorFeeQuoteQuantums *big.Int, liquidityFeeQuoteQuantums *big.Int, takerRouterFeeQuoteQuantums *big.Int, makerRouterFeeQuoteQuantums *big.Int, isLiquidation bool, isDeleverage bool, perpetualId uint32, ) sdk.Event
NewCreateMatchEvent constructs a new match sdk.Event.
func NotionalToCoinAmount ¶
func NotionalToCoinAmount( notionalQuoteQuantums *big.Int, quoteAtomicResolution int32, denomExp int32, marketPrice pricestypes.MarketPrice, ) *big.Rat
NotionalToCoinAmount returns the coin amount (e.g. `uatom`) that has equal worth to the notional (in quote quantums). For example, given price of 9.5 TDAI/ATOM, notional of 9_500_000 quote quantums, return 1_000_000 `uatom` (since `tokenDenomExp“=-6). Note the return value is in coin amount, which is different from base quantums.
Given the below by definitions:
quote_quantums * 10^quote_atomic_resolution = full_quote_coin_amount (e.g. 2_000_000 quote quantums * 10^-6 = 2 TDAI) coin_amount * 10^denom_exponent = full_coin_amount (e.g. 1_000_000 uatom * 10^-6 = 1 ATOM) full_coin_amount * coin_price = full_quote_coin_amount (e.g. 1 ATOM * 9.5 TDAI/ATOM = 9.5 TDAI)
Therefore:
coin_amount * 10^denom_exponent * coin_price = quote_quantums * 10^quote_atomic_resolution coin_amount = quote_quantums * 10^(quote_atomic_resolution - denom_exponent) / coin_price
func PnlPriceToSubticks ¶
func PnlPriceToSubticks( marketPrice pricestypes.MarketPrice, clobPair ClobPair, baseAtomicResolution int32, quoteAtomicResolution int32, ) ( ratSubticks *big.Rat, )
PriceToSubticks converts price value from Prices module into subticks. By construction of the Clob module: `sizeQuoteQuantums = subticks * baseQuantums * 10^quantumConversionExponent` Substituting `baseQuantums` with a full coin of the base currency:
`tdaiPrice * 10^(-quoteAtomicResolution) = subticks * 10^(-baseAtomicResolution) * 10^quantumConversionExponent` (A)
By construction of Prices module:
`tdaiPrice = marketPrice.Price * 10^marketPrice.Exponent` (B)
Combining equations (A) & (B), we get:
`subticks = marketPrice.Price * 10^(marketPrice.Exponent - quantumConversionExponent + baseAtomicResolution - quoteAtomicResolution)`
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func SpotPriceToSubticks ¶
func SpotPriceToSubticks( marketPrice pricestypes.MarketPrice, clobPair ClobPair, baseAtomicResolution int32, quoteAtomicResolution int32, ) ( ratSubticks *big.Rat, )
func SubticksToPrice ¶
func SubticksToPrice( subticks Subticks, marketPriceExponent int32, clobPair ClobPair, baseAtomicResolution int32, quoteAtomicResolution int32, ) ( price uint64, )
SubticksToPrice converts subticks into price value from Prices module. By construction of the Clob module: `sizeQuoteQuantums = subticks * baseQuantums * 10^quantumConversionExponent` Substituting `baseQuantums` with a full coin of the base currency:
`tdaiPrice * 10^(-quoteAtomicResolution) = subticks * 10^(-baseAtomicResolution) * 10^quantumConversionExponent` (A)
By construction of Prices module:
`tdaiPrice = marketPrice.Price * 10^marketPrice.Exponent` (B)
Combining equations (A) & (B), we get:
`marketPrice.Price = subticks * 10^(-marketPrice.Exponent + quantumConversionExponent - baseAtomicResolution + quoteAtomicResolution)` Note this function rounds down in order to typecast into an int. It should really only be used in testing with well-defined integer subticks.
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations.
type AddOrderToOrderbookCollateralizationCheckFn ¶
type AddOrderToOrderbookCollateralizationCheckFn func( subaccountMatchedOrders map[satypes.SubaccountId][]PendingOpenOrder, ) ( success bool, successPerSubaccountUpdate map[satypes.SubaccountId]satypes.UpdateResult, )
AddOrderToOrderbookCollateralizationCheckFn defines a function interface that can be used for verifying one or more subaccounts are properly collateralized if their respective order(s) are matched. Returns the result of the collateralization check.
type AssetsKeeper ¶
type BankKeeper ¶
type BankKeeper interface { SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin }
BankKeeper defines the expected bank keeper used for simulations.
type BlockRateLimitConfiguration ¶
type BlockRateLimitConfiguration struct { // How many short term order attempts (successful and failed) are allowed for // an account per N blocks. Note that the rate limits are applied // in an AND fashion such that an order placement must pass all rate limit // configurations. // // Specifying 0 values disables this rate limit. // Deprecated in favor of `max_short_term_orders_and_cancels_per_n_blocks` // for v5.x onwards. MaxShortTermOrdersPerNBlocks []MaxPerNBlocksRateLimit `` // Deprecated: Do not use. /* 145-byte string literal not displayed */ // How many stateful order attempts (successful and failed) are allowed for // an account per N blocks. Note that the rate limits are applied // in an AND fashion such that an order placement must pass all rate limit // configurations. // // Specifying 0 values disables this rate limit. MaxStatefulOrdersPerNBlocks []MaxPerNBlocksRateLimit `` /* 140-byte string literal not displayed */ // How many short term order cancellation attempts (successful and failed) are // allowed for an account per N blocks. Note that the rate limits are // applied in an AND fashion such that an order cancellation must pass all // rate limit configurations. // // Specifying 0 values disables this rate limit. // Deprecated in favor of `max_short_term_orders_and_cancels_per_n_blocks` // for v5.x onwards. MaxShortTermOrderCancellationsPerNBlocks []MaxPerNBlocksRateLimit `` // Deprecated: Do not use. /* 183-byte string literal not displayed */ // How many short term order place and cancel attempts (successful and failed) // are allowed for an account per N blocks. Note that the rate limits are // applied in an AND fashion such that an order placement must pass all rate // limit configurations. // // Specifying 0 values disables this rate limit. MaxShortTermOrdersAndCancelsPerNBlocks []MaxPerNBlocksRateLimit `` /* 179-byte string literal not displayed */ }
Defines the block rate limits for CLOB specific operations.
func (*BlockRateLimitConfiguration) Descriptor ¶
func (*BlockRateLimitConfiguration) Descriptor() ([]byte, []int)
func (*BlockRateLimitConfiguration) GetMaxShortTermOrderCancellationsPerNBlocks
deprecated
func (m *BlockRateLimitConfiguration) GetMaxShortTermOrderCancellationsPerNBlocks() []MaxPerNBlocksRateLimit
Deprecated: Do not use.
func (*BlockRateLimitConfiguration) GetMaxShortTermOrdersAndCancelsPerNBlocks ¶
func (m *BlockRateLimitConfiguration) GetMaxShortTermOrdersAndCancelsPerNBlocks() []MaxPerNBlocksRateLimit
func (*BlockRateLimitConfiguration) GetMaxShortTermOrdersPerNBlocks
deprecated
func (m *BlockRateLimitConfiguration) GetMaxShortTermOrdersPerNBlocks() []MaxPerNBlocksRateLimit
Deprecated: Do not use.
func (*BlockRateLimitConfiguration) GetMaxStatefulOrdersPerNBlocks ¶
func (m *BlockRateLimitConfiguration) GetMaxStatefulOrdersPerNBlocks() []MaxPerNBlocksRateLimit
func (*BlockRateLimitConfiguration) Marshal ¶
func (m *BlockRateLimitConfiguration) Marshal() (dAtA []byte, err error)
func (*BlockRateLimitConfiguration) MarshalTo ¶
func (m *BlockRateLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*BlockRateLimitConfiguration) MarshalToSizedBuffer ¶
func (m *BlockRateLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockRateLimitConfiguration) ProtoMessage ¶
func (*BlockRateLimitConfiguration) ProtoMessage()
func (*BlockRateLimitConfiguration) Reset ¶
func (m *BlockRateLimitConfiguration) Reset()
func (*BlockRateLimitConfiguration) Size ¶
func (m *BlockRateLimitConfiguration) Size() (n int)
func (*BlockRateLimitConfiguration) String ¶
func (m *BlockRateLimitConfiguration) String() string
func (*BlockRateLimitConfiguration) Unmarshal ¶
func (m *BlockRateLimitConfiguration) Unmarshal(dAtA []byte) error
func (BlockRateLimitConfiguration) Validate ¶
func (lc BlockRateLimitConfiguration) Validate() error
Validate validates each individual MaxPerNBlocksRateLimit. It returns an error if any of the rate limits fail the following validations:
- `Limit == 0` || `Limit > MaxShortTermOrdersAndCancelsPerNBlocksLimit` for short term order/cancel rate limits.
- `NumBlocks == 0` || `NumBlocks > MaxShortTermOrdersAndCancelsPerNBlocksNumBlocks` for short term order/cancel rate limits.
- `Limit == 0` || `Limit > MaxStatefulOrdersPerNBlocksLimit` for stateful order rate limits.
- `NumBlocks == 0` || `NumBlocks > MaxStatefulOrdersPerNBlocksNumBlocks` for stateful order rate limits.
- There are multiple rate limits for the same `NumBlocks` in `MaxShortTermOrdersAndCancelsPerNBlocks`, `MaxStatefulOrdersPerNBlocks`.
func (*BlockRateLimitConfiguration) XXX_DiscardUnknown ¶
func (m *BlockRateLimitConfiguration) XXX_DiscardUnknown()
func (*BlockRateLimitConfiguration) XXX_Marshal ¶
func (m *BlockRateLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockRateLimitConfiguration) XXX_Merge ¶
func (m *BlockRateLimitConfiguration) XXX_Merge(src proto.Message)
func (*BlockRateLimitConfiguration) XXX_Size ¶
func (m *BlockRateLimitConfiguration) XXX_Size() int
func (*BlockRateLimitConfiguration) XXX_Unmarshal ¶
func (m *BlockRateLimitConfiguration) XXX_Unmarshal(b []byte) error
type BlockTimeKeeper ¶
type BlockTimeKeeper interface {
GetPreviousBlockInfo(ctx sdk.Context) blocktimetypes.BlockInfo
}
type ClobKeeper ¶
type ClobKeeper interface { LiquidationsKeeper LiquidationsConfigKeeper IsInitialized() bool Initialize(ctx sdk.Context) AddOrderToOrderbookSubaccountUpdatesCheck( ctx sdk.Context, clobPairId ClobPairId, subaccountOpenOrders map[satypes.SubaccountId][]PendingOpenOrder, ) ( success bool, successPerUpdate map[satypes.SubaccountId]satypes.UpdateResult, ) BatchCancelShortTermOrder( ctx sdk.Context, msg *MsgBatchCancel, ) (success []uint32, failure []uint32, err error) CancelShortTermOrder(ctx sdk.Context, msg *MsgCancelOrder) error CancelStatefulOrder(ctx sdk.Context, msg *MsgCancelOrder) error CreatePerpetualClobPair( ctx sdk.Context, clobPairId uint32, perpetualId uint32, stepSizeInBaseQuantums satypes.BaseQuantums, quantumConversionExponent int32, subticksPerTick uint32, status ClobPair_Status, ) ( ClobPair, error, ) GetAllClobPairs(ctx sdk.Context) (list []ClobPair) GetClobPair(ctx sdk.Context, id ClobPairId) (val ClobPair, found bool) HasAuthority(authority string) bool PlaceShortTermOrder(ctx sdk.Context, msg *MsgPlaceOrder) ( orderSizeOptimisticallyFilledFromMatchingQuantums satypes.BaseQuantums, orderStatus OrderStatus, err error, ) PlaceStatefulOrder(ctx sdk.Context, msg *MsgPlaceOrder) error PruneStateFillAmountsForShortTermOrders( ctx sdk.Context, ) RemoveClobPair(ctx sdk.Context, id ClobPairId) ProcessProposerOperations( ctx sdk.Context, operations []OperationRaw, ) error GetStatePosition( ctx sdk.Context, subaccountId satypes.SubaccountId, clobPairId ClobPairId, ) ( positionSizeQuantums *big.Int, ) ProcessSingleMatch( ctx sdk.Context, matchWithOrders *MatchWithOrders, ) ( success bool, takerUpdateResult satypes.UpdateResult, makerUpdateResult satypes.UpdateResult, offchainUpdates *OffchainUpdates, err error, ) SetLongTermOrderPlacement( ctx sdk.Context, order Order, blockHeight uint32, ) GetLongTermOrderPlacement( ctx sdk.Context, orderId OrderId, ) (val LongTermOrderPlacement, found bool) DeleteLongTermOrderPlacement( ctx sdk.Context, orderId OrderId, ) RemoveOrderFillAmount(ctx sdk.Context, orderId OrderId) MustAddOrderToStatefulOrdersTimeSlice( ctx sdk.Context, goodTilBlockTime time.Time, orderId OrderId, ) GetStatefulOrdersTimeSlice(ctx sdk.Context, goodTilBlockTime time.Time) ( orderIds []OrderId, ) MustRemoveStatefulOrder( ctx sdk.Context, orderId OrderId, ) RemoveExpiredStatefulOrdersTimeSlices(ctx sdk.Context, blockTime time.Time) ( expiredOrderIds []OrderId, ) GetProcessProposerMatchesEvents(ctx sdk.Context) ProcessProposerMatchesEvents MustSetProcessProposerMatchesEvents( ctx sdk.Context, processProposerMatchesEvents ProcessProposerMatchesEvents, ) PerformOrderCancellationStatefulValidation( ctx sdk.Context, msgCancelOrder *MsgCancelOrder, blockHeight uint32, ) error PerformStatefulOrderValidation( ctx sdk.Context, order *Order, blockHeight uint32, isPreexistingStatefulOrder bool, ) error GetIndexerEventManager() indexer_manager.IndexerEventManager RateLimitCancelOrder(ctx sdk.Context, order *MsgCancelOrder) error RateLimitPlaceOrder(ctx sdk.Context, order *MsgPlaceOrder) error RateLimitBatchCancel(ctx sdk.Context, order *MsgBatchCancel) error InitializeBlockRateLimit(ctx sdk.Context, config BlockRateLimitConfiguration) error GetBlockRateLimitConfiguration( ctx sdk.Context, ) (config BlockRateLimitConfiguration) InitializeEquityTierLimit(ctx sdk.Context, config EquityTierLimitConfiguration) error Logger(ctx sdk.Context) log.Logger UpdateClobPair( ctx sdk.Context, clobPair ClobPair, ) error UpdateLiquidationsConfig(ctx sdk.Context, config LiquidationsConfig) error // Gprc streaming InitializeNewGrpcStreams(ctx sdk.Context) SendOrderbookUpdates( ctx sdk.Context, offchainUpdates *OffchainUpdates, snapshot bool, ) }
type ClobMatch ¶
type ClobMatch struct { // The match type that this message includes. // // Types that are valid to be assigned to Match: // *ClobMatch_MatchOrders // *ClobMatch_MatchPerpetualLiquidation // *ClobMatch_MatchPerpetualDeleveraging Match isClobMatch_Match `protobuf_oneof:"match"` }
ClobMatch represents an operations queue entry around all different types of matches, specifically regular matches, liquidation matches, and deleveraging matches.
func NewClobMatchFromMatchOrders ¶
func NewClobMatchFromMatchOrders( msgMatchOrders *MatchOrders, ) *ClobMatch
NewClobMatchFromMatchOrders creates a `ClobMatch` from the provided `MatchOrders`.
func NewClobMatchFromMatchPerpetualLiquidation ¶
func NewClobMatchFromMatchPerpetualLiquidation( msgMatchPerpetualLiquidation *MatchPerpetualLiquidation, ) *ClobMatch
NewClobMatchFromMatchPerpetualLiquidation creates a `ClobMatch` from the provided `MatchPerpetualLiquidation`.
func (*ClobMatch) Descriptor ¶
func (*ClobMatch) GetMatchOrders ¶
func (m *ClobMatch) GetMatchOrders() *MatchOrders
func (*ClobMatch) GetMatchPerpetualDeleveraging ¶
func (m *ClobMatch) GetMatchPerpetualDeleveraging() *MatchPerpetualDeleveraging
func (*ClobMatch) GetMatchPerpetualLiquidation ¶
func (m *ClobMatch) GetMatchPerpetualLiquidation() *MatchPerpetualLiquidation
func (*ClobMatch) MarshalToSizedBuffer ¶
func (*ClobMatch) ProtoMessage ¶
func (*ClobMatch) ProtoMessage()
func (*ClobMatch) XXX_DiscardUnknown ¶
func (m *ClobMatch) XXX_DiscardUnknown()
func (*ClobMatch) XXX_Marshal ¶
func (*ClobMatch) XXX_OneofWrappers ¶
func (*ClobMatch) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ClobMatch) XXX_Unmarshal ¶
type ClobMatch_MatchOrders ¶
type ClobMatch_MatchOrders struct {
MatchOrders *MatchOrders `protobuf:"bytes,1,opt,name=match_orders,json=matchOrders,proto3,oneof" json:"match_orders,omitempty"`
}
func (*ClobMatch_MatchOrders) MarshalTo ¶
func (m *ClobMatch_MatchOrders) MarshalTo(dAtA []byte) (int, error)
func (*ClobMatch_MatchOrders) MarshalToSizedBuffer ¶
func (m *ClobMatch_MatchOrders) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobMatch_MatchOrders) Size ¶
func (m *ClobMatch_MatchOrders) Size() (n int)
type ClobMatch_MatchPerpetualDeleveraging ¶
type ClobMatch_MatchPerpetualDeleveraging struct {
MatchPerpetualDeleveraging *MatchPerpetualDeleveraging `` /* 147-byte string literal not displayed */
}
func (*ClobMatch_MatchPerpetualDeleveraging) MarshalTo ¶
func (m *ClobMatch_MatchPerpetualDeleveraging) MarshalTo(dAtA []byte) (int, error)
func (*ClobMatch_MatchPerpetualDeleveraging) MarshalToSizedBuffer ¶
func (m *ClobMatch_MatchPerpetualDeleveraging) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobMatch_MatchPerpetualDeleveraging) Size ¶
func (m *ClobMatch_MatchPerpetualDeleveraging) Size() (n int)
type ClobMatch_MatchPerpetualLiquidation ¶
type ClobMatch_MatchPerpetualLiquidation struct {
MatchPerpetualLiquidation *MatchPerpetualLiquidation `` /* 144-byte string literal not displayed */
}
func (*ClobMatch_MatchPerpetualLiquidation) MarshalTo ¶
func (m *ClobMatch_MatchPerpetualLiquidation) MarshalTo(dAtA []byte) (int, error)
func (*ClobMatch_MatchPerpetualLiquidation) MarshalToSizedBuffer ¶
func (m *ClobMatch_MatchPerpetualLiquidation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobMatch_MatchPerpetualLiquidation) Size ¶
func (m *ClobMatch_MatchPerpetualLiquidation) Size() (n int)
type ClobMetadata ¶
type ClobMidPrice ¶
type ClobMidPrice struct { ClobPair ClobPair `protobuf:"bytes,1,opt,name=clob_pair,json=clobPair,proto3" json:"clob_pair"` Subticks uint64 `protobuf:"varint,2,opt,name=subticks,proto3" json:"subticks,omitempty"` }
ClobMidPrice contains the mid price of a CLOB pair, represented by it's ID.
func (*ClobMidPrice) Descriptor ¶
func (*ClobMidPrice) Descriptor() ([]byte, []int)
func (*ClobMidPrice) GetClobPair ¶
func (m *ClobMidPrice) GetClobPair() ClobPair
func (*ClobMidPrice) GetSubticks ¶
func (m *ClobMidPrice) GetSubticks() uint64
func (*ClobMidPrice) Marshal ¶
func (m *ClobMidPrice) Marshal() (dAtA []byte, err error)
func (*ClobMidPrice) MarshalToSizedBuffer ¶
func (m *ClobMidPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobMidPrice) ProtoMessage ¶
func (*ClobMidPrice) ProtoMessage()
func (*ClobMidPrice) Reset ¶
func (m *ClobMidPrice) Reset()
func (*ClobMidPrice) Size ¶
func (m *ClobMidPrice) Size() (n int)
func (*ClobMidPrice) String ¶
func (m *ClobMidPrice) String() string
func (*ClobMidPrice) Unmarshal ¶
func (m *ClobMidPrice) Unmarshal(dAtA []byte) error
func (*ClobMidPrice) XXX_DiscardUnknown ¶
func (m *ClobMidPrice) XXX_DiscardUnknown()
func (*ClobMidPrice) XXX_Marshal ¶
func (m *ClobMidPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClobMidPrice) XXX_Merge ¶
func (m *ClobMidPrice) XXX_Merge(src proto.Message)
func (*ClobMidPrice) XXX_Size ¶
func (m *ClobMidPrice) XXX_Size() int
func (*ClobMidPrice) XXX_Unmarshal ¶
func (m *ClobMidPrice) XXX_Unmarshal(b []byte) error
type ClobOrder ¶
type ClobOrder struct { // The order that is resting on the CLOB. Order Order // The signature on the transaction containing the `MsgPlaceOrder` message, // from the user who placed this order [PENDING ABCI++]. Signature []byte }
ClobOrder represents an order that is resting on the CLOB.
type ClobPair ¶
type ClobPair struct { // ID of the orderbook that stores all resting liquidity for this CLOB. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Product-specific metadata. Perpetual CLOBs will have // PerpetualClobMetadata, and Spot CLOBs will have SpotClobMetadata. // // Types that are valid to be assigned to Metadata: // // *ClobPair_PerpetualClobMetadata // *ClobPair_SpotClobMetadata Metadata isClobPair_Metadata `protobuf_oneof:"metadata"` // Minimum increment in the size of orders on the CLOB, in base quantums. StepBaseQuantums uint64 `protobuf:"varint,4,opt,name=step_base_quantums,json=stepBaseQuantums,proto3" json:"step_base_quantums,omitempty"` // Defines the tick size of the orderbook by defining how many subticks // are in one tick. That is, the subticks of any valid order must be a // multiple of this value. Generally this value should start `>= 100`to // allow room for decreasing it. SubticksPerTick uint32 `protobuf:"varint,5,opt,name=subticks_per_tick,json=subticksPerTick,proto3" json:"subticks_per_tick,omitempty"` // `10^Exponent` gives the number of QuoteQuantums traded per BaseQuantum // per Subtick. QuantumConversionExponent int32 `` /* 141-byte string literal not displayed */ Status ClobPair_Status `protobuf:"varint,7,opt,name=status,proto3,enum=klyraprotocol.clob.ClobPair_Status" json:"status,omitempty"` }
ClobPair represents a single CLOB pair for a given product in state.
func (*ClobPair) Descriptor ¶
func (*ClobPair) GetClobPairId ¶
func (c *ClobPair) GetClobPairId() ClobPairId
GetId returns the `ClobPairId` for the provided `clobPair`.
func (*ClobPair) GetClobPairMinOrderBaseQuantums ¶
func (c *ClobPair) GetClobPairMinOrderBaseQuantums() satypes.BaseQuantums
func (*ClobPair) GetClobPairSubticksPerTick ¶
func (c *ClobPair) GetClobPairSubticksPerTick() SubticksPerTick
func (*ClobPair) GetMetadata ¶
func (m *ClobPair) GetMetadata() isClobPair_Metadata
func (*ClobPair) GetPerpetualClobMetadata ¶
func (m *ClobPair) GetPerpetualClobMetadata() *PerpetualClobMetadata
func (*ClobPair) GetPerpetualId ¶
GetPerpetualId returns the `PerpetualId` for the provided `clobPair`.
func (*ClobPair) GetQuantumConversionExponent ¶
func (*ClobPair) GetSpotClobMetadata ¶
func (m *ClobPair) GetSpotClobMetadata() *SpotClobMetadata
func (*ClobPair) GetStatus ¶
func (m *ClobPair) GetStatus() ClobPair_Status
func (*ClobPair) GetStepBaseQuantums ¶
func (*ClobPair) GetSubticksPerTick ¶
func (*ClobPair) MarshalToSizedBuffer ¶
func (*ClobPair) MustGetPerpetualId ¶
MustGetPerpetualId returns the `PerpetualId` for the provided `clobPair`. Will panic if `GetPerpetualId` returns an error.
func (*ClobPair) ProtoMessage ¶
func (*ClobPair) ProtoMessage()
func (*ClobPair) XXX_DiscardUnknown ¶
func (m *ClobPair) XXX_DiscardUnknown()
func (*ClobPair) XXX_Marshal ¶
func (*ClobPair) XXX_OneofWrappers ¶
func (*ClobPair) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ClobPair) XXX_Unmarshal ¶
type ClobPairId ¶
type ClobPairId uint32
func (ClobPairId) ToUint32 ¶
func (cp ClobPairId) ToUint32() uint32
type ClobPair_PerpetualClobMetadata ¶
type ClobPair_PerpetualClobMetadata struct {
PerpetualClobMetadata *PerpetualClobMetadata `` /* 132-byte string literal not displayed */
}
func (*ClobPair_PerpetualClobMetadata) MarshalTo ¶
func (m *ClobPair_PerpetualClobMetadata) MarshalTo(dAtA []byte) (int, error)
func (*ClobPair_PerpetualClobMetadata) MarshalToSizedBuffer ¶
func (m *ClobPair_PerpetualClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobPair_PerpetualClobMetadata) Size ¶
func (m *ClobPair_PerpetualClobMetadata) Size() (n int)
type ClobPair_SpotClobMetadata ¶
type ClobPair_SpotClobMetadata struct {
SpotClobMetadata *SpotClobMetadata `protobuf:"bytes,3,opt,name=spot_clob_metadata,json=spotClobMetadata,proto3,oneof" json:"spot_clob_metadata,omitempty"`
}
func (*ClobPair_SpotClobMetadata) MarshalTo ¶
func (m *ClobPair_SpotClobMetadata) MarshalTo(dAtA []byte) (int, error)
func (*ClobPair_SpotClobMetadata) MarshalToSizedBuffer ¶
func (m *ClobPair_SpotClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClobPair_SpotClobMetadata) Size ¶
func (m *ClobPair_SpotClobMetadata) Size() (n int)
type ClobPair_Status ¶
type ClobPair_Status int32
Status of the CLOB.
const ( // Default value. This value is invalid and unused. ClobPair_STATUS_UNSPECIFIED ClobPair_Status = 0 // STATUS_ACTIVE represents an active clob pair. ClobPair_STATUS_ACTIVE ClobPair_Status = 1 // STATUS_PAUSED behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPair_STATUS_PAUSED ClobPair_Status = 2 // STATUS_CANCEL_ONLY behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPair_STATUS_CANCEL_ONLY ClobPair_Status = 3 // STATUS_POST_ONLY behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPair_STATUS_POST_ONLY ClobPair_Status = 4 // STATUS_INITIALIZING represents a newly-added clob pair. // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPair_STATUS_INITIALIZING ClobPair_Status = 5 // STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated // and trading has ceased. All open positions will be closed by the // protocol. Open stateful orders will be cancelled. Open short-term // orders will be left to expire. ClobPair_STATUS_FINAL_SETTLEMENT ClobPair_Status = 6 )
func (ClobPair_Status) EnumDescriptor ¶
func (ClobPair_Status) EnumDescriptor() ([]byte, []int)
func (ClobPair_Status) String ¶
func (x ClobPair_Status) String() string
type ConditionalOrderPlacement ¶
type ConditionalOrderPlacement struct { Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"` // The block height and transaction index at which the order was placed. PlacementIndex TransactionOrdering `protobuf:"bytes,2,opt,name=placement_index,json=placementIndex,proto3" json:"placement_index"` // The block height and transaction index at which the order was triggered. // Set to be nil if the transaction has not been triggered. // Used for ordering by time priority when the chain is restarted. TriggerIndex *TransactionOrdering `protobuf:"bytes,3,opt,name=trigger_index,json=triggerIndex,proto3" json:"trigger_index,omitempty"` }
ConditionalOrderPlacement represents the placement of a conditional order in state. It stores the stateful order itself, the `BlockHeight` and `TransactionIndex` at which the order was placed and triggered.
func (*ConditionalOrderPlacement) Descriptor ¶
func (*ConditionalOrderPlacement) Descriptor() ([]byte, []int)
func (*ConditionalOrderPlacement) GetOrder ¶
func (m *ConditionalOrderPlacement) GetOrder() Order
func (*ConditionalOrderPlacement) GetPlacementIndex ¶
func (m *ConditionalOrderPlacement) GetPlacementIndex() TransactionOrdering
func (*ConditionalOrderPlacement) GetTransactionIndex ¶
func (orderPlacement *ConditionalOrderPlacement) GetTransactionIndex() TransactionOrdering
GetTransactionIndex returns a ConditionalOrderPlacement's TransactionOrdering. If the conditional order is triggered, the trigger index is used. If the conditional order is placed but not triggered, the placement index is used.
func (*ConditionalOrderPlacement) GetTriggerIndex ¶
func (m *ConditionalOrderPlacement) GetTriggerIndex() *TransactionOrdering
func (*ConditionalOrderPlacement) Marshal ¶
func (m *ConditionalOrderPlacement) Marshal() (dAtA []byte, err error)
func (*ConditionalOrderPlacement) MarshalTo ¶
func (m *ConditionalOrderPlacement) MarshalTo(dAtA []byte) (int, error)
func (*ConditionalOrderPlacement) MarshalToSizedBuffer ¶
func (m *ConditionalOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConditionalOrderPlacement) ProtoMessage ¶
func (*ConditionalOrderPlacement) ProtoMessage()
func (*ConditionalOrderPlacement) Reset ¶
func (m *ConditionalOrderPlacement) Reset()
func (*ConditionalOrderPlacement) Size ¶
func (m *ConditionalOrderPlacement) Size() (n int)
func (*ConditionalOrderPlacement) String ¶
func (m *ConditionalOrderPlacement) String() string
func (*ConditionalOrderPlacement) Unmarshal ¶
func (m *ConditionalOrderPlacement) Unmarshal(dAtA []byte) error
func (*ConditionalOrderPlacement) XXX_DiscardUnknown ¶
func (m *ConditionalOrderPlacement) XXX_DiscardUnknown()
func (*ConditionalOrderPlacement) XXX_Marshal ¶
func (m *ConditionalOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConditionalOrderPlacement) XXX_Merge ¶
func (m *ConditionalOrderPlacement) XXX_Merge(src proto.Message)
func (*ConditionalOrderPlacement) XXX_Size ¶
func (m *ConditionalOrderPlacement) XXX_Size() int
func (*ConditionalOrderPlacement) XXX_Unmarshal ¶
func (m *ConditionalOrderPlacement) XXX_Unmarshal(b []byte) error
type EquityTierLimit ¶
type EquityTierLimit struct { // The total net collateral in TDAI quote quantums of equity required. UsdTncRequired github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 185-byte string literal not displayed */ // What the limit is for `usd_tnc_required`. Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` }
Defines an equity tier limit.
func (*EquityTierLimit) Descriptor ¶
func (*EquityTierLimit) Descriptor() ([]byte, []int)
func (*EquityTierLimit) GetLimit ¶
func (m *EquityTierLimit) GetLimit() uint32
func (*EquityTierLimit) Marshal ¶
func (m *EquityTierLimit) Marshal() (dAtA []byte, err error)
func (*EquityTierLimit) MarshalToSizedBuffer ¶
func (m *EquityTierLimit) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EquityTierLimit) ProtoMessage ¶
func (*EquityTierLimit) ProtoMessage()
func (*EquityTierLimit) Reset ¶
func (m *EquityTierLimit) Reset()
func (*EquityTierLimit) Size ¶
func (m *EquityTierLimit) Size() (n int)
func (*EquityTierLimit) String ¶
func (m *EquityTierLimit) String() string
func (*EquityTierLimit) Unmarshal ¶
func (m *EquityTierLimit) Unmarshal(dAtA []byte) error
func (*EquityTierLimit) XXX_DiscardUnknown ¶
func (m *EquityTierLimit) XXX_DiscardUnknown()
func (*EquityTierLimit) XXX_Marshal ¶
func (m *EquityTierLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EquityTierLimit) XXX_Merge ¶
func (m *EquityTierLimit) XXX_Merge(src proto.Message)
func (*EquityTierLimit) XXX_Size ¶
func (m *EquityTierLimit) XXX_Size() int
func (*EquityTierLimit) XXX_Unmarshal ¶
func (m *EquityTierLimit) XXX_Unmarshal(b []byte) error
type EquityTierLimitConfiguration ¶
type EquityTierLimitConfiguration struct { // How many short term stateful orders are allowed per equity tier. // Specifying 0 values disables this limit. ShortTermOrderEquityTiers []EquityTierLimit `` /* 132-byte string literal not displayed */ // How many open stateful orders are allowed per equity tier. // Specifying 0 values disables this limit. StatefulOrderEquityTiers []EquityTierLimit `` /* 127-byte string literal not displayed */ }
Defines the set of equity tiers to limit how many open orders a subaccount is allowed to have.
func (*EquityTierLimitConfiguration) Descriptor ¶
func (*EquityTierLimitConfiguration) Descriptor() ([]byte, []int)
func (*EquityTierLimitConfiguration) GetShortTermOrderEquityTiers ¶
func (m *EquityTierLimitConfiguration) GetShortTermOrderEquityTiers() []EquityTierLimit
func (*EquityTierLimitConfiguration) GetStatefulOrderEquityTiers ¶
func (m *EquityTierLimitConfiguration) GetStatefulOrderEquityTiers() []EquityTierLimit
func (EquityTierLimitConfiguration) Initialize ¶
func (lc EquityTierLimitConfiguration) Initialize()
Initialize ensures the fields are ordered by the application requirements:
- ShortTermOrderEquityTiers by UsdTncRequired in ascending order.
- StatefulOrderEquityTiers by UsdTncRequired in ascending order.
func (*EquityTierLimitConfiguration) Marshal ¶
func (m *EquityTierLimitConfiguration) Marshal() (dAtA []byte, err error)
func (*EquityTierLimitConfiguration) MarshalTo ¶
func (m *EquityTierLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*EquityTierLimitConfiguration) MarshalToSizedBuffer ¶
func (m *EquityTierLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EquityTierLimitConfiguration) ProtoMessage ¶
func (*EquityTierLimitConfiguration) ProtoMessage()
func (*EquityTierLimitConfiguration) Reset ¶
func (m *EquityTierLimitConfiguration) Reset()
func (*EquityTierLimitConfiguration) Size ¶
func (m *EquityTierLimitConfiguration) Size() (n int)
func (*EquityTierLimitConfiguration) String ¶
func (m *EquityTierLimitConfiguration) String() string
func (*EquityTierLimitConfiguration) Unmarshal ¶
func (m *EquityTierLimitConfiguration) Unmarshal(dAtA []byte) error
func (EquityTierLimitConfiguration) Validate ¶
func (lc EquityTierLimitConfiguration) Validate() error
Validate validates each individual EquityTierLimit. It returns an error if any of the equity tier limits fail the following validations:
- `Limit > MaxShortTermOrdersForEquityTier` for short term order equity tier limits.
- `Limit > MaxStatefulOrdersPerEquityTier` for stateful order equity tier limits.
- There are multiple equity tier limits for the same `UsdTncRequired` in `ShortTermOrderEquityTiers`, or `StatefulOrderEquityTiers`.
func (*EquityTierLimitConfiguration) XXX_DiscardUnknown ¶
func (m *EquityTierLimitConfiguration) XXX_DiscardUnknown()
func (*EquityTierLimitConfiguration) XXX_Marshal ¶
func (m *EquityTierLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EquityTierLimitConfiguration) XXX_Merge ¶
func (m *EquityTierLimitConfiguration) XXX_Merge(src proto.Message)
func (*EquityTierLimitConfiguration) XXX_Size ¶
func (m *EquityTierLimitConfiguration) XXX_Size() int
func (*EquityTierLimitConfiguration) XXX_Unmarshal ¶
func (m *EquityTierLimitConfiguration) XXX_Unmarshal(b []byte) error
type FeeTiersKeeper ¶
type FillablePriceConfig ¶
type FillablePriceConfig struct { // The rate at which the Adjusted Bankruptcy Rating increases. BankruptcyAdjustmentPpm uint32 `` /* 133-byte string literal not displayed */ // The maximum value that the liquidation spread can take, as // a ratio against the position's maintenance margin. SpreadToMaintenanceMarginRatioPpm uint32 `` /* 169-byte string literal not displayed */ }
FillablePriceConfig stores all configurable fields related to calculating the fillable price for liquidating a position.
func (*FillablePriceConfig) Descriptor ¶
func (*FillablePriceConfig) Descriptor() ([]byte, []int)
func (*FillablePriceConfig) GetBankruptcyAdjustmentPpm ¶
func (m *FillablePriceConfig) GetBankruptcyAdjustmentPpm() uint32
func (*FillablePriceConfig) GetSpreadToMaintenanceMarginRatioPpm ¶
func (m *FillablePriceConfig) GetSpreadToMaintenanceMarginRatioPpm() uint32
func (*FillablePriceConfig) Marshal ¶
func (m *FillablePriceConfig) Marshal() (dAtA []byte, err error)
func (*FillablePriceConfig) MarshalTo ¶
func (m *FillablePriceConfig) MarshalTo(dAtA []byte) (int, error)
func (*FillablePriceConfig) MarshalToSizedBuffer ¶
func (m *FillablePriceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FillablePriceConfig) ProtoMessage ¶
func (*FillablePriceConfig) ProtoMessage()
func (*FillablePriceConfig) Reset ¶
func (m *FillablePriceConfig) Reset()
func (*FillablePriceConfig) Size ¶
func (m *FillablePriceConfig) Size() (n int)
func (*FillablePriceConfig) String ¶
func (m *FillablePriceConfig) String() string
func (*FillablePriceConfig) Unmarshal ¶
func (m *FillablePriceConfig) Unmarshal(dAtA []byte) error
func (*FillablePriceConfig) XXX_DiscardUnknown ¶
func (m *FillablePriceConfig) XXX_DiscardUnknown()
func (*FillablePriceConfig) XXX_Marshal ¶
func (m *FillablePriceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FillablePriceConfig) XXX_Merge ¶
func (m *FillablePriceConfig) XXX_Merge(src proto.Message)
func (*FillablePriceConfig) XXX_Size ¶
func (m *FillablePriceConfig) XXX_Size() int
func (*FillablePriceConfig) XXX_Unmarshal ¶
func (m *FillablePriceConfig) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { ClobPairs []ClobPair `protobuf:"bytes,1,rep,name=clob_pairs,json=clobPairs,proto3" json:"clob_pairs"` LiquidationsConfig LiquidationsConfig `protobuf:"bytes,2,opt,name=liquidations_config,json=liquidationsConfig,proto3" json:"liquidations_config"` BlockRateLimitConfig BlockRateLimitConfiguration `protobuf:"bytes,3,opt,name=block_rate_limit_config,json=blockRateLimitConfig,proto3" json:"block_rate_limit_config"` EquityTierLimitConfig EquityTierLimitConfiguration `protobuf:"bytes,4,opt,name=equity_tier_limit_config,json=equityTierLimitConfig,proto3" json:"equity_tier_limit_config"` }
GenesisState defines the clob module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetBlockRateLimitConfig ¶
func (m *GenesisState) GetBlockRateLimitConfig() BlockRateLimitConfiguration
func (*GenesisState) GetClobPairs ¶
func (m *GenesisState) GetClobPairs() []ClobPair
func (*GenesisState) GetEquityTierLimitConfig ¶
func (m *GenesisState) GetEquityTierLimitConfig() EquityTierLimitConfiguration
func (*GenesisState) GetLiquidationsConfig ¶
func (m *GenesisState) GetLiquidationsConfig() LiquidationsConfig
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type GetStatePositionFn ¶
type GetStatePositionFn func( subaccountId satypes.SubaccountId, clobPairId ClobPairId, ) ( positionSizeQuantums *big.Int, )
GetStatePositionFn defines a function interface that can be used for getting the position size of an order in state. It is used for determining whether reduce-only orders need to be resized or canceled.
type InternalOperation ¶
type InternalOperation struct { // operation represents the operation that occurred, which can be a match, // Short-Term order placement, or the placement of a pre-existing stateful // order. // // Types that are valid to be assigned to Operation: // *InternalOperation_Match // *InternalOperation_ShortTermOrderPlacement // *InternalOperation_PreexistingStatefulOrder // *InternalOperation_OrderRemoval Operation isInternalOperation_Operation `protobuf_oneof:"operation"` }
InternalOperation represents an internal operation in the operations to propose. InternalOperation is used internally within the memclob only.
func NewMatchOrdersInternalOperation ¶
func NewMatchOrdersInternalOperation( takerOrder Order, makerFills []MakerFill, ) InternalOperation
NewMatchOrdersInternalOperation returns a new operation for matching maker orders against a taker order. This function panics if there are zero maker fills.
func NewMatchPerpetualDeleveragingInternalOperation ¶
func NewMatchPerpetualDeleveragingInternalOperation( liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, fills []MatchPerpetualDeleveraging_Fill, isFinalSettlement bool, ) InternalOperation
NewMatchPerpetualDeleveragingInternalOperation returns a new operation for deleveraging liquidated subaccount's position against one or more offsetting subaccounts.
func NewMatchPerpetualLiquidationInternalOperation ¶
func NewMatchPerpetualLiquidationInternalOperation( takerLiquidationOrder MatchableOrder, makerFills []MakerFill, ) InternalOperation
NewMatchPerpetualLiquidationInternalOperation returns a new operation for matching maker orders against a perpetual liquidation order. This function panics if this is called with a non-liquidation order or there are zero maker fills.
func NewOrderRemovalInternalOperation ¶
func NewOrderRemovalInternalOperation( orderId OrderId, removalReason OrderRemoval_RemovalReason, ) InternalOperation
NewOrderRemovalInternalOperation returns a new operation for removing an order. This function panics if it's called with an order removal containing an OrderId for a non stateful order or the removal reason is unspecified.
func NewPreexistingStatefulOrderPlacementInternalOperation ¶
func NewPreexistingStatefulOrderPlacementInternalOperation(order Order) InternalOperation
NewPreexistingStatefulOrderPlacementInternalOperation returns a new internal operation for placing a stateful order. This function will panic if it's called with a non stateful order.
func NewShortTermOrderPlacementInternalOperation ¶
func NewShortTermOrderPlacementInternalOperation(order Order) InternalOperation
NewShortTermOrderPlacementInternalOperation returns a new internal operation for placing a Short-Term order. This function will panic if it's called with a non Short-Term order.
func ValidateAndTransformRawOperations ¶
func ValidateAndTransformRawOperations( ctx sdk.Context, rawOperations []OperationRaw, decoder sdk.TxDecoder, anteHandler sdk.AnteHandler, ) ([]InternalOperation, error)
ValidateAndTransformRawOperations performs stateless validation on the proposed operation queue and transforms the input []OperationRaw into []InternalOperation. Validations differ based on operation types. We are able to supply a TxDecoder and AnteHandler to this function. These are needed to decode OperationRaw tx bytes and to validate that the operations' transactions were signed correctly.
func (*InternalOperation) Descriptor ¶
func (*InternalOperation) Descriptor() ([]byte, []int)
func (*InternalOperation) GetInternalOperationTextString ¶
func (o *InternalOperation) GetInternalOperationTextString() string
GetInternalOperationTextString returns the text string representation of this operation. TODO(DEC-1772): Add method for encoding operation protos as JSON to make debugging easier.
func (*InternalOperation) GetMatch ¶
func (m *InternalOperation) GetMatch() *ClobMatch
func (*InternalOperation) GetOperation ¶
func (m *InternalOperation) GetOperation() isInternalOperation_Operation
func (*InternalOperation) GetOrderRemoval ¶
func (m *InternalOperation) GetOrderRemoval() *OrderRemoval
func (*InternalOperation) GetPreexistingStatefulOrder ¶
func (m *InternalOperation) GetPreexistingStatefulOrder() *OrderId
func (*InternalOperation) GetShortTermOrderPlacement ¶
func (m *InternalOperation) GetShortTermOrderPlacement() *MsgPlaceOrder
func (*InternalOperation) Marshal ¶
func (m *InternalOperation) Marshal() (dAtA []byte, err error)
func (*InternalOperation) MarshalTo ¶
func (m *InternalOperation) MarshalTo(dAtA []byte) (int, error)
func (*InternalOperation) MarshalToSizedBuffer ¶
func (m *InternalOperation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InternalOperation) ProtoMessage ¶
func (*InternalOperation) ProtoMessage()
func (*InternalOperation) Reset ¶
func (m *InternalOperation) Reset()
func (*InternalOperation) Size ¶
func (m *InternalOperation) Size() (n int)
func (*InternalOperation) String ¶
func (m *InternalOperation) String() string
func (*InternalOperation) Unmarshal ¶
func (m *InternalOperation) Unmarshal(dAtA []byte) error
func (*InternalOperation) XXX_DiscardUnknown ¶
func (m *InternalOperation) XXX_DiscardUnknown()
func (*InternalOperation) XXX_Marshal ¶
func (m *InternalOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InternalOperation) XXX_Merge ¶
func (m *InternalOperation) XXX_Merge(src proto.Message)
func (*InternalOperation) XXX_OneofWrappers ¶
func (*InternalOperation) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*InternalOperation) XXX_Size ¶
func (m *InternalOperation) XXX_Size() int
func (*InternalOperation) XXX_Unmarshal ¶
func (m *InternalOperation) XXX_Unmarshal(b []byte) error
type InternalOperation_Match ¶
type InternalOperation_Match struct {
Match *ClobMatch `protobuf:"bytes,1,opt,name=match,proto3,oneof" json:"match,omitempty"`
}
func (*InternalOperation_Match) MarshalTo ¶
func (m *InternalOperation_Match) MarshalTo(dAtA []byte) (int, error)
func (*InternalOperation_Match) MarshalToSizedBuffer ¶
func (m *InternalOperation_Match) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InternalOperation_Match) Size ¶
func (m *InternalOperation_Match) Size() (n int)
type InternalOperation_OrderRemoval ¶
type InternalOperation_OrderRemoval struct {
OrderRemoval *OrderRemoval `protobuf:"bytes,4,opt,name=order_removal,json=orderRemoval,proto3,oneof" json:"order_removal,omitempty"`
}
func (*InternalOperation_OrderRemoval) MarshalTo ¶
func (m *InternalOperation_OrderRemoval) MarshalTo(dAtA []byte) (int, error)
func (*InternalOperation_OrderRemoval) MarshalToSizedBuffer ¶
func (m *InternalOperation_OrderRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InternalOperation_OrderRemoval) Size ¶
func (m *InternalOperation_OrderRemoval) Size() (n int)
type InternalOperation_PreexistingStatefulOrder ¶
type InternalOperation_PreexistingStatefulOrder struct {
PreexistingStatefulOrder *OrderId `` /* 141-byte string literal not displayed */
}
func (*InternalOperation_PreexistingStatefulOrder) MarshalTo ¶
func (m *InternalOperation_PreexistingStatefulOrder) MarshalTo(dAtA []byte) (int, error)
func (*InternalOperation_PreexistingStatefulOrder) MarshalToSizedBuffer ¶
func (m *InternalOperation_PreexistingStatefulOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InternalOperation_PreexistingStatefulOrder) Size ¶
func (m *InternalOperation_PreexistingStatefulOrder) Size() (n int)
type InternalOperation_ShortTermOrderPlacement ¶
type InternalOperation_ShortTermOrderPlacement struct {
ShortTermOrderPlacement *MsgPlaceOrder `` /* 140-byte string literal not displayed */
}
func (*InternalOperation_ShortTermOrderPlacement) MarshalTo ¶
func (m *InternalOperation_ShortTermOrderPlacement) MarshalTo(dAtA []byte) (int, error)
func (*InternalOperation_ShortTermOrderPlacement) MarshalToSizedBuffer ¶
func (m *InternalOperation_ShortTermOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InternalOperation_ShortTermOrderPlacement) Size ¶
func (m *InternalOperation_ShortTermOrderPlacement) Size() (n int)
type Level ¶
type Level struct { // LevelOrders represents a doubly-linked list of `ClobOrder`s sorted in chronical // order (ascending). Note that this should always be non-`nil`, since the // `Level` should not exist if there are no elements in the linked list. LevelOrders list.List[ClobOrder] }
Level represents a price level on the CLOB.
type LevelOrder ¶
LevelOrder represents the queue position of an order that is within a specific price level of the CLOB.
type LiquidationOrder ¶
type LiquidationOrder struct {
// contains filtered or unexported fields
}
LiquidationOrder is used to represent an IOC liquidation order.
func NewLiquidationOrder ¶
func NewLiquidationOrder( subaccountId satypes.SubaccountId, clobPair ClobPair, isBuy bool, quantums satypes.BaseQuantums, subticks Subticks, ) *LiquidationOrder
NewLiquidationOrder creates and returns a new liquidation order. This function will panic if the caller attempts to create a liquidation order with a non-perpetual CLOB pair.
func (*LiquidationOrder) GetBaseQuantums ¶
func (lo *LiquidationOrder) GetBaseQuantums() satypes.BaseQuantums
GetBaseQuantums returns the quantums of this liquidation order. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) GetClobPairId ¶
func (lo *LiquidationOrder) GetClobPairId() ClobPairId
GetClobPairId returns the CLOB pair ID of this liquidation order. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) GetDeltaQuantums ¶
func (o *LiquidationOrder) GetDeltaQuantums() *big.Int
GetDeltaQuantums returns the delta quantums of this liquidation order.
func (*LiquidationOrder) GetOrderHash ¶
func (lo *LiquidationOrder) GetOrderHash() OrderHash
GetOrderHash returns the SHA256 hash of the `PerpetualLiquidationInfo` field. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) GetOrderSubticks ¶
func (lo *LiquidationOrder) GetOrderSubticks() Subticks
GetOrderSubticks returns the subticks of this liquidation order. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) GetSubaccountId ¶
func (lo *LiquidationOrder) GetSubaccountId() satypes.SubaccountId
GetSubaccountId returns the subaccount ID that is being liquidated. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) IsBuy ¶
func (lo *LiquidationOrder) IsBuy() bool
IsBuy returns true if this is a buy order, false if not. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) IsLiquidation ¶
func (lo *LiquidationOrder) IsLiquidation() bool
IsLiquidation always returns true since this order is a liquidation order. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) IsReduceOnly ¶
func (o *LiquidationOrder) IsReduceOnly() bool
IsReduceOnly returns whether this is a reduce-only order. This always returns false for liquidation orders.
func (*LiquidationOrder) MustGetLiquidatedPerpetualId ¶
func (lo *LiquidationOrder) MustGetLiquidatedPerpetualId() uint32
MustGetLiquidatedPerpetualId returns the perpetual ID that this perpetual order is liquidating. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
func (*LiquidationOrder) MustGetOrder ¶
func (lo *LiquidationOrder) MustGetOrder() Order
MustGetOrder always panics since there is no underlying `Order` type for a liquidation. This function is necessary for the `LiquidationOrder` type to implement the `MatchableOrder` interface.
type LiquidationsConfig ¶
type LiquidationsConfig struct { // The maximum liquidation fee (in parts-per-million). This fee goes // 100% to the insurance fund. InsuranceFundFeePpm uint32 `protobuf:"varint,1,opt,name=insurance_fund_fee_ppm,json=insuranceFundFeePpm,proto3" json:"insurance_fund_fee_ppm,omitempty"` // The fraction of the remaining collateral taken as a validator fee. ValidatorFeePpm uint32 `protobuf:"varint,2,opt,name=validator_fee_ppm,json=validatorFeePpm,proto3" json:"validator_fee_ppm,omitempty"` // The fraction of the remaining collateral taken as a liquidity fee. LiquidityFeePpm uint32 `protobuf:"varint,3,opt,name=liquidity_fee_ppm,json=liquidityFeePpm,proto3" json:"liquidity_fee_ppm,omitempty"` // Config about how the fillable-price spread from the oracle price // increases based on the adjusted bankruptcy rating of the subaccount. FillablePriceConfig FillablePriceConfig `protobuf:"bytes,4,opt,name=fillable_price_config,json=fillablePriceConfig,proto3" json:"fillable_price_config"` // The maximum value that the cumulative insurance fund delta can take. MaxCumulativeInsuranceFundDelta uint64 `` /* 161-byte string literal not displayed */ }
LiquidationsConfig stores all configurable fields related to liquidations.
func (*LiquidationsConfig) Descriptor ¶
func (*LiquidationsConfig) Descriptor() ([]byte, []int)
func (*LiquidationsConfig) GetFillablePriceConfig ¶
func (m *LiquidationsConfig) GetFillablePriceConfig() FillablePriceConfig
func (*LiquidationsConfig) GetInsuranceFundFeePpm ¶
func (m *LiquidationsConfig) GetInsuranceFundFeePpm() uint32
func (*LiquidationsConfig) GetLiquidityFeePpm ¶
func (m *LiquidationsConfig) GetLiquidityFeePpm() uint32
func (*LiquidationsConfig) GetMaxCumulativeInsuranceFundDelta ¶
func (m *LiquidationsConfig) GetMaxCumulativeInsuranceFundDelta() uint64
func (*LiquidationsConfig) GetValidatorFeePpm ¶
func (m *LiquidationsConfig) GetValidatorFeePpm() uint32
func (*LiquidationsConfig) Marshal ¶
func (m *LiquidationsConfig) Marshal() (dAtA []byte, err error)
func (*LiquidationsConfig) MarshalTo ¶
func (m *LiquidationsConfig) MarshalTo(dAtA []byte) (int, error)
func (*LiquidationsConfig) MarshalToSizedBuffer ¶
func (m *LiquidationsConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LiquidationsConfig) ProtoMessage ¶
func (*LiquidationsConfig) ProtoMessage()
func (*LiquidationsConfig) Reset ¶
func (m *LiquidationsConfig) Reset()
func (*LiquidationsConfig) Size ¶
func (m *LiquidationsConfig) Size() (n int)
func (*LiquidationsConfig) String ¶
func (m *LiquidationsConfig) String() string
func (*LiquidationsConfig) Unmarshal ¶
func (m *LiquidationsConfig) Unmarshal(dAtA []byte) error
func (*LiquidationsConfig) Validate ¶
func (lc *LiquidationsConfig) Validate() error
func (*LiquidationsConfig) XXX_DiscardUnknown ¶
func (m *LiquidationsConfig) XXX_DiscardUnknown()
func (*LiquidationsConfig) XXX_Marshal ¶
func (m *LiquidationsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LiquidationsConfig) XXX_Merge ¶
func (m *LiquidationsConfig) XXX_Merge(src proto.Message)
func (*LiquidationsConfig) XXX_Size ¶
func (m *LiquidationsConfig) XXX_Size() int
func (*LiquidationsConfig) XXX_Unmarshal ¶
func (m *LiquidationsConfig) XXX_Unmarshal(b []byte) error
type LiquidationsConfigKeeper ¶
type LiquidationsConfigKeeper interface { GetLiquidationsConfig( ctx sdk.Context, ) LiquidationsConfig }
LiquidationsConfigKeeper is an interface that encapsulates all reads and writes to the liquidation configuration values written to state.
type LiquidationsKeeper ¶
type LiquidationsKeeper interface { LiquidateSubaccountsAgainstOrderbookInternal( ctx sdk.Context, subaccountIds *heap.LiquidationPriorityHeap, isolatedPositionsPriorityHeap *heap.LiquidationPriorityHeap, ) ( subaccountsToDeleverage []heap.SubaccountToDeleverage, err error, ) PlacePerpetualLiquidation( ctx sdk.Context, liquidationOrder LiquidationOrder, ) ( orderSizeOptimisticallyFilledFromMatchingQuantums satypes.BaseQuantums, orderStatus OrderStatus, err error, ) MaybeDeleverageSubaccount( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, ) ( quantumsDeleveraged *big.Int, err error, ) IsLiquidatable( ctx sdk.Context, subaccountId satypes.SubaccountId, ) ( bool, error, ) GetBankruptcyPriceInQuoteQuantums( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, deltaQuantums *big.Int, ) ( bankruptcyPriceQuoteQuantumsBig *big.Int, err error, ) GetFillablePrice( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, ) ( fillablePrice *big.Rat, err error, ) GetInsuranceFundBalanceInQuoteQuantums( ctx sdk.Context, perpetualId uint32, ) ( balance *big.Int, ) GetLiquidationInsuranceFundFeeAndRemainingAvailableCollateral( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, isBuy bool, fillAmount uint64, subticks Subticks, ) ( remainingQuoteQuantumsBig *big.Int, insuranceFundFeeQuoteQuantums *big.Int, err error, ) ConvertLiquidationPriceToSubticks( ctx sdk.Context, liquidationPrice *big.Rat, isLiquidatingLong bool, clobPair ClobPair, ) ( subticks Subticks, ) GetBestPerpetualPositionToLiquidate( ctx sdk.Context, subaccountId satypes.SubaccountId, ) ( perpetualId uint32, err error, ) GetMaxQuantumsInsuranceDelta( ctx sdk.Context, perpetualId uint32, ) ( bigMaxQuantumsInsuranceLost *big.Int, err error, ) MaybeGetLiquidationOrder( ctx sdk.Context, subaccountId satypes.SubaccountId, ) ( liquidationOrder *LiquidationOrder, err error, ) GetNextSubaccountToLiquidate( ctx sdk.Context, subaccountIds *heap.LiquidationPriorityHeap, isolatedPositionsPriorityHeap *heap.LiquidationPriorityHeap, numIsolatedLiquidations *int, ) ( subaccount satypes.Subaccount, subaccountId *heap.LiquidationPriority, ) GetSubaccountLiquidationInfo( ctx sdk.Context, subaccountId satypes.SubaccountId, ) ( liquidationInfo SubaccountLiquidationInfo, ) MustUpdateSubaccountPerpetualLiquidated( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, ) }
LiquidationsKeeper is an interface that encapsulates all reads and writes to the in-memory data structures that store liquidation information.
type LongTermOrderPlacement ¶
type LongTermOrderPlacement struct { Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"` // The block height and transaction index at which the order was placed. // Used for ordering by time priority when the chain is restarted. PlacementIndex TransactionOrdering `protobuf:"bytes,2,opt,name=placement_index,json=placementIndex,proto3" json:"placement_index"` }
LongTermOrderPlacement represents the placement of a stateful order in state. It stores the stateful order itself and the `BlockHeight` and `TransactionIndex` at which the order was placed.
func (*LongTermOrderPlacement) Descriptor ¶
func (*LongTermOrderPlacement) Descriptor() ([]byte, []int)
func (*LongTermOrderPlacement) GetOrder ¶
func (m *LongTermOrderPlacement) GetOrder() Order
func (*LongTermOrderPlacement) GetPlacementIndex ¶
func (m *LongTermOrderPlacement) GetPlacementIndex() TransactionOrdering
func (*LongTermOrderPlacement) GetTransactionIndex ¶
func (orderPlacement *LongTermOrderPlacement) GetTransactionIndex() TransactionOrdering
GetTransactionIndex returns a LongTermOrderPlacement's placement index.
func (*LongTermOrderPlacement) Marshal ¶
func (m *LongTermOrderPlacement) Marshal() (dAtA []byte, err error)
func (*LongTermOrderPlacement) MarshalTo ¶
func (m *LongTermOrderPlacement) MarshalTo(dAtA []byte) (int, error)
func (*LongTermOrderPlacement) MarshalToSizedBuffer ¶
func (m *LongTermOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LongTermOrderPlacement) ProtoMessage ¶
func (*LongTermOrderPlacement) ProtoMessage()
func (*LongTermOrderPlacement) Reset ¶
func (m *LongTermOrderPlacement) Reset()
func (*LongTermOrderPlacement) Size ¶
func (m *LongTermOrderPlacement) Size() (n int)
func (*LongTermOrderPlacement) String ¶
func (m *LongTermOrderPlacement) String() string
func (*LongTermOrderPlacement) Unmarshal ¶
func (m *LongTermOrderPlacement) Unmarshal(dAtA []byte) error
func (*LongTermOrderPlacement) XXX_DiscardUnknown ¶
func (m *LongTermOrderPlacement) XXX_DiscardUnknown()
func (*LongTermOrderPlacement) XXX_Marshal ¶
func (m *LongTermOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LongTermOrderPlacement) XXX_Merge ¶
func (m *LongTermOrderPlacement) XXX_Merge(src proto.Message)
func (*LongTermOrderPlacement) XXX_Size ¶
func (m *LongTermOrderPlacement) XXX_Size() int
func (*LongTermOrderPlacement) XXX_Unmarshal ¶
func (m *LongTermOrderPlacement) XXX_Unmarshal(b []byte) error
type MEVDatapoint ¶
type MEVDatapoint struct { Height uint32 `json:"block_height"` ChainID string `json:"chain_id"` VolumeQuoteQuantums map[ClobPairId]*big.Int `json:"volume_quote_quantums"` MEV map[ClobPairId]float32 `json:"mev"` Identifier string `json:"identifier"` }
MEVDatapoint contains the Volume (ValidatorVolumeQuoteQuantums) and MEV per market to be sent to the MEV telemetry service. Every datapoint contains a self-reported identifier and a block height for which the metric is reported.
type MEVLiquidationMatch ¶
type MEVLiquidationMatch struct { LiquidatedSubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=liquidated_subaccount_id,json=liquidatedSubaccountId,proto3" json:"liquidated_subaccount_id"` InsuranceFundDeltaQuoteQuantums int64 `` /* 161-byte string literal not displayed */ ValidatorFeeQuoteQuantums int64 `` /* 141-byte string literal not displayed */ LiquidityFeeQuoteQuantums int64 `` /* 141-byte string literal not displayed */ MakerOrderSubaccountId types.SubaccountId `protobuf:"bytes,5,opt,name=maker_order_subaccount_id,json=makerOrderSubaccountId,proto3" json:"maker_order_subaccount_id"` MakerOrderSubticks uint64 `protobuf:"varint,6,opt,name=maker_order_subticks,json=makerOrderSubticks,proto3" json:"maker_order_subticks,omitempty"` MakerOrderIsBuy bool `protobuf:"varint,7,opt,name=maker_order_is_buy,json=makerOrderIsBuy,proto3" json:"maker_order_is_buy,omitempty"` MakerFeePpm int32 `protobuf:"varint,8,opt,name=maker_fee_ppm,json=makerFeePpm,proto3" json:"maker_fee_ppm,omitempty"` ClobPairId uint32 `protobuf:"varint,9,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` FillAmount uint64 `protobuf:"varint,10,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` }
MEVLiquidationMatch represents all necessary data to calculate MEV for a liquidation.
func (*MEVLiquidationMatch) Descriptor ¶
func (*MEVLiquidationMatch) Descriptor() ([]byte, []int)
func (*MEVLiquidationMatch) GetClobPairId ¶
func (m *MEVLiquidationMatch) GetClobPairId() uint32
func (*MEVLiquidationMatch) GetFillAmount ¶
func (m *MEVLiquidationMatch) GetFillAmount() uint64
func (*MEVLiquidationMatch) GetInsuranceFundDeltaQuoteQuantums ¶
func (m *MEVLiquidationMatch) GetInsuranceFundDeltaQuoteQuantums() int64
func (*MEVLiquidationMatch) GetLiquidatedSubaccountId ¶
func (m *MEVLiquidationMatch) GetLiquidatedSubaccountId() types.SubaccountId
func (*MEVLiquidationMatch) GetLiquidityFeeQuoteQuantums ¶
func (m *MEVLiquidationMatch) GetLiquidityFeeQuoteQuantums() int64
func (*MEVLiquidationMatch) GetMakerFeePpm ¶
func (m *MEVLiquidationMatch) GetMakerFeePpm() int32
func (*MEVLiquidationMatch) GetMakerOrderIsBuy ¶
func (m *MEVLiquidationMatch) GetMakerOrderIsBuy() bool
func (*MEVLiquidationMatch) GetMakerOrderSubaccountId ¶
func (m *MEVLiquidationMatch) GetMakerOrderSubaccountId() types.SubaccountId
func (*MEVLiquidationMatch) GetMakerOrderSubticks ¶
func (m *MEVLiquidationMatch) GetMakerOrderSubticks() uint64
func (*MEVLiquidationMatch) GetValidatorFeeQuoteQuantums ¶
func (m *MEVLiquidationMatch) GetValidatorFeeQuoteQuantums() int64
func (*MEVLiquidationMatch) Marshal ¶
func (m *MEVLiquidationMatch) Marshal() (dAtA []byte, err error)
func (*MEVLiquidationMatch) MarshalTo ¶
func (m *MEVLiquidationMatch) MarshalTo(dAtA []byte) (int, error)
func (*MEVLiquidationMatch) MarshalToSizedBuffer ¶
func (m *MEVLiquidationMatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MEVLiquidationMatch) ProtoMessage ¶
func (*MEVLiquidationMatch) ProtoMessage()
func (*MEVLiquidationMatch) Reset ¶
func (m *MEVLiquidationMatch) Reset()
func (*MEVLiquidationMatch) Size ¶
func (m *MEVLiquidationMatch) Size() (n int)
func (*MEVLiquidationMatch) String ¶
func (m *MEVLiquidationMatch) String() string
func (*MEVLiquidationMatch) Unmarshal ¶
func (m *MEVLiquidationMatch) Unmarshal(dAtA []byte) error
func (*MEVLiquidationMatch) XXX_DiscardUnknown ¶
func (m *MEVLiquidationMatch) XXX_DiscardUnknown()
func (*MEVLiquidationMatch) XXX_Marshal ¶
func (m *MEVLiquidationMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MEVLiquidationMatch) XXX_Merge ¶
func (m *MEVLiquidationMatch) XXX_Merge(src proto.Message)
func (*MEVLiquidationMatch) XXX_Size ¶
func (m *MEVLiquidationMatch) XXX_Size() int
func (*MEVLiquidationMatch) XXX_Unmarshal ¶
func (m *MEVLiquidationMatch) XXX_Unmarshal(b []byte) error
type MEVMatch ¶
type MEVMatch struct { TakerOrderSubaccountId *types.SubaccountId `` /* 131-byte string literal not displayed */ TakerFeePpm int32 `protobuf:"varint,2,opt,name=taker_fee_ppm,json=takerFeePpm,proto3" json:"taker_fee_ppm,omitempty"` MakerOrderSubaccountId *types.SubaccountId `` /* 131-byte string literal not displayed */ MakerOrderSubticks uint64 `protobuf:"varint,4,opt,name=maker_order_subticks,json=makerOrderSubticks,proto3" json:"maker_order_subticks,omitempty"` MakerOrderIsBuy bool `protobuf:"varint,5,opt,name=maker_order_is_buy,json=makerOrderIsBuy,proto3" json:"maker_order_is_buy,omitempty"` MakerFeePpm int32 `protobuf:"varint,6,opt,name=maker_fee_ppm,json=makerFeePpm,proto3" json:"maker_fee_ppm,omitempty"` ClobPairId uint32 `protobuf:"varint,7,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` FillAmount uint64 `protobuf:"varint,8,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` }
MEVMatch represents all necessary data to calculate MEV for a regular match.
func (*MEVMatch) Descriptor ¶
func (*MEVMatch) GetClobPairId ¶
func (*MEVMatch) GetFillAmount ¶
func (*MEVMatch) GetMakerFeePpm ¶
func (*MEVMatch) GetMakerOrderIsBuy ¶
func (*MEVMatch) GetMakerOrderSubaccountId ¶
func (m *MEVMatch) GetMakerOrderSubaccountId() *types.SubaccountId
func (*MEVMatch) GetMakerOrderSubticks ¶
func (*MEVMatch) GetTakerFeePpm ¶
func (*MEVMatch) GetTakerOrderSubaccountId ¶
func (m *MEVMatch) GetTakerOrderSubaccountId() *types.SubaccountId
func (*MEVMatch) MarshalToSizedBuffer ¶
func (*MEVMatch) ProtoMessage ¶
func (*MEVMatch) ProtoMessage()
func (*MEVMatch) XXX_DiscardUnknown ¶
func (m *MEVMatch) XXX_DiscardUnknown()
func (*MEVMatch) XXX_Marshal ¶
func (*MEVMatch) XXX_Unmarshal ¶
type MakerFill ¶
type MakerFill struct { // The filled amount of the matched maker order, in base quantums. // TODO(CLOB-571): update to use SerializableInt. FillAmount uint64 `protobuf:"varint,1,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` // The `OrderId` of the matched maker order. MakerOrderId OrderId `protobuf:"bytes,2,opt,name=maker_order_id,json=makerOrderId,proto3" json:"maker_order_id"` }
MakerFill represents the filled amount of a matched maker order.
func MakerFillsWithOrderToMakerFills ¶
func MakerFillsWithOrderToMakerFills(mfos []MakerFillWithOrder) []MakerFill
MakerFillsWithOrderToMakerFills converts a slice of `MakerFillWithOrder` to a slice of `MakerFill`.
func (*MakerFill) Descriptor ¶
func (*MakerFill) GetFillAmount ¶
func (*MakerFill) GetMakerOrderId ¶
func (*MakerFill) MarshalToSizedBuffer ¶
func (*MakerFill) ProtoMessage ¶
func (*MakerFill) ProtoMessage()
func (*MakerFill) XXX_DiscardUnknown ¶
func (m *MakerFill) XXX_DiscardUnknown()
func (*MakerFill) XXX_Marshal ¶
func (*MakerFill) XXX_Unmarshal ¶
type MakerFillWithOrder ¶
type MakerFillWithOrder struct { MakerFill // The `Order` representing the matched maker order. Order Order }
MakerFillWithOrder represents the filled amount of a matched maker order, along with the `Order` representing the matched maker order.
type MatchOrders ¶
type MatchOrders struct { // The `OrderId` of the taker order. TakerOrderId OrderId `protobuf:"bytes,1,opt,name=taker_order_id,json=takerOrderId,proto3" json:"taker_order_id"` // An ordered list of fills created by this taker order. Fills []MakerFill `protobuf:"bytes,2,rep,name=fills,proto3" json:"fills"` }
MatchOrders is an injected message used for matching orders.
func (*MatchOrders) Descriptor ¶
func (*MatchOrders) Descriptor() ([]byte, []int)
func (*MatchOrders) GetFills ¶
func (m *MatchOrders) GetFills() []MakerFill
func (*MatchOrders) GetMakerSubaccountIds ¶
func (m *MatchOrders) GetMakerSubaccountIds() []satypes.SubaccountId
GetMakerSubaccountIds gets a list of SubaccountIds belonging to subaccounts which placed the maker orders in the Fills property of this MatchOrdersNew object.
func (*MatchOrders) GetTakerOrderId ¶
func (m *MatchOrders) GetTakerOrderId() OrderId
func (*MatchOrders) Marshal ¶
func (m *MatchOrders) Marshal() (dAtA []byte, err error)
func (*MatchOrders) MarshalToSizedBuffer ¶
func (m *MatchOrders) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MatchOrders) ProtoMessage ¶
func (*MatchOrders) ProtoMessage()
func (*MatchOrders) Reset ¶
func (m *MatchOrders) Reset()
func (*MatchOrders) Size ¶
func (m *MatchOrders) Size() (n int)
func (*MatchOrders) String ¶
func (m *MatchOrders) String() string
func (*MatchOrders) Unmarshal ¶
func (m *MatchOrders) Unmarshal(dAtA []byte) error
func (*MatchOrders) XXX_DiscardUnknown ¶
func (m *MatchOrders) XXX_DiscardUnknown()
func (*MatchOrders) XXX_Marshal ¶
func (m *MatchOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchOrders) XXX_Merge ¶
func (m *MatchOrders) XXX_Merge(src proto.Message)
func (*MatchOrders) XXX_Size ¶
func (m *MatchOrders) XXX_Size() int
func (*MatchOrders) XXX_Unmarshal ¶
func (m *MatchOrders) XXX_Unmarshal(b []byte) error
type MatchPerpetualDeleveraging ¶
type MatchPerpetualDeleveraging struct { // ID of the subaccount that was liquidated. Liquidated types.SubaccountId `protobuf:"bytes,1,opt,name=liquidated,proto3" json:"liquidated"` // The ID of the perpetual that was liquidated. PerpetualId uint32 `protobuf:"varint,2,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // An ordered list of fills created by this liquidation. Fills []MatchPerpetualDeleveraging_Fill `protobuf:"bytes,3,rep,name=fills,proto3" json:"fills"` // Flag denoting whether the deleveraging operation was for the purpose // of final settlement. Final settlement matches are at the oracle price, // whereas deleveraging happens at the bankruptcy price of the deleveraged // subaccount. IsFinalSettlement bool `protobuf:"varint,4,opt,name=is_final_settlement,json=isFinalSettlement,proto3" json:"is_final_settlement,omitempty"` }
MatchPerpetualDeleveraging is an injected message used for deleveraging a subaccount.
func (*MatchPerpetualDeleveraging) Descriptor ¶
func (*MatchPerpetualDeleveraging) Descriptor() ([]byte, []int)
func (*MatchPerpetualDeleveraging) GetFills ¶
func (m *MatchPerpetualDeleveraging) GetFills() []MatchPerpetualDeleveraging_Fill
func (*MatchPerpetualDeleveraging) GetIsFinalSettlement ¶
func (m *MatchPerpetualDeleveraging) GetIsFinalSettlement() bool
func (*MatchPerpetualDeleveraging) GetLiquidated ¶
func (m *MatchPerpetualDeleveraging) GetLiquidated() types.SubaccountId
func (*MatchPerpetualDeleveraging) GetPerpetualId ¶
func (m *MatchPerpetualDeleveraging) GetPerpetualId() uint32
func (*MatchPerpetualDeleveraging) GetTotalFilledQuantums ¶
func (m *MatchPerpetualDeleveraging) GetTotalFilledQuantums() *big.Int
GetTotalFilledQuantums gets the total filled quantums from a MatchPerpetualDeleveraging match.
func (*MatchPerpetualDeleveraging) Marshal ¶
func (m *MatchPerpetualDeleveraging) Marshal() (dAtA []byte, err error)
func (*MatchPerpetualDeleveraging) MarshalTo ¶
func (m *MatchPerpetualDeleveraging) MarshalTo(dAtA []byte) (int, error)
func (*MatchPerpetualDeleveraging) MarshalToSizedBuffer ¶
func (m *MatchPerpetualDeleveraging) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MatchPerpetualDeleveraging) ProtoMessage ¶
func (*MatchPerpetualDeleveraging) ProtoMessage()
func (*MatchPerpetualDeleveraging) Reset ¶
func (m *MatchPerpetualDeleveraging) Reset()
func (*MatchPerpetualDeleveraging) Size ¶
func (m *MatchPerpetualDeleveraging) Size() (n int)
func (*MatchPerpetualDeleveraging) String ¶
func (m *MatchPerpetualDeleveraging) String() string
func (*MatchPerpetualDeleveraging) Unmarshal ¶
func (m *MatchPerpetualDeleveraging) Unmarshal(dAtA []byte) error
func (*MatchPerpetualDeleveraging) Validate ¶
func (match *MatchPerpetualDeleveraging) Validate() error
Validate performs stateless validation on a `MatchPerpetualDeleveraging` object. It checks the following conditions to be true: - Validation for all subaccount Ids - For each fill, fill amount must be greater than zero - Subaccount ids in fills are all unique - Subaccount ids in fills cannot be the same as the liquidated subaccount id
func (*MatchPerpetualDeleveraging) XXX_DiscardUnknown ¶
func (m *MatchPerpetualDeleveraging) XXX_DiscardUnknown()
func (*MatchPerpetualDeleveraging) XXX_Marshal ¶
func (m *MatchPerpetualDeleveraging) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchPerpetualDeleveraging) XXX_Merge ¶
func (m *MatchPerpetualDeleveraging) XXX_Merge(src proto.Message)
func (*MatchPerpetualDeleveraging) XXX_Size ¶
func (m *MatchPerpetualDeleveraging) XXX_Size() int
func (*MatchPerpetualDeleveraging) XXX_Unmarshal ¶
func (m *MatchPerpetualDeleveraging) XXX_Unmarshal(b []byte) error
type MatchPerpetualDeleveraging_Fill ¶
type MatchPerpetualDeleveraging_Fill struct { // ID of the subaccount that was used to offset the liquidated subaccount's // position. OffsettingSubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=offsetting_subaccount_id,json=offsettingSubaccountId,proto3" json:"offsetting_subaccount_id"` // The amount filled between the liquidated and offsetting position, in // base quantums. // TODO(CLOB-571): update to use SerializableInt. FillAmount uint64 `protobuf:"varint,2,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` }
Fill represents a fill between the liquidated and offsetting subaccount.
func (*MatchPerpetualDeleveraging_Fill) Descriptor ¶
func (*MatchPerpetualDeleveraging_Fill) Descriptor() ([]byte, []int)
func (*MatchPerpetualDeleveraging_Fill) GetFillAmount ¶
func (m *MatchPerpetualDeleveraging_Fill) GetFillAmount() uint64
func (*MatchPerpetualDeleveraging_Fill) GetOffsettingSubaccountId ¶
func (m *MatchPerpetualDeleveraging_Fill) GetOffsettingSubaccountId() types.SubaccountId
func (*MatchPerpetualDeleveraging_Fill) Marshal ¶
func (m *MatchPerpetualDeleveraging_Fill) Marshal() (dAtA []byte, err error)
func (*MatchPerpetualDeleveraging_Fill) MarshalTo ¶
func (m *MatchPerpetualDeleveraging_Fill) MarshalTo(dAtA []byte) (int, error)
func (*MatchPerpetualDeleveraging_Fill) MarshalToSizedBuffer ¶
func (m *MatchPerpetualDeleveraging_Fill) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MatchPerpetualDeleveraging_Fill) ProtoMessage ¶
func (*MatchPerpetualDeleveraging_Fill) ProtoMessage()
func (*MatchPerpetualDeleveraging_Fill) Reset ¶
func (m *MatchPerpetualDeleveraging_Fill) Reset()
func (*MatchPerpetualDeleveraging_Fill) Size ¶
func (m *MatchPerpetualDeleveraging_Fill) Size() (n int)
func (*MatchPerpetualDeleveraging_Fill) String ¶
func (m *MatchPerpetualDeleveraging_Fill) String() string
func (*MatchPerpetualDeleveraging_Fill) Unmarshal ¶
func (m *MatchPerpetualDeleveraging_Fill) Unmarshal(dAtA []byte) error
func (*MatchPerpetualDeleveraging_Fill) XXX_DiscardUnknown ¶
func (m *MatchPerpetualDeleveraging_Fill) XXX_DiscardUnknown()
func (*MatchPerpetualDeleveraging_Fill) XXX_Marshal ¶
func (m *MatchPerpetualDeleveraging_Fill) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchPerpetualDeleveraging_Fill) XXX_Merge ¶
func (m *MatchPerpetualDeleveraging_Fill) XXX_Merge(src proto.Message)
func (*MatchPerpetualDeleveraging_Fill) XXX_Size ¶
func (m *MatchPerpetualDeleveraging_Fill) XXX_Size() int
func (*MatchPerpetualDeleveraging_Fill) XXX_Unmarshal ¶
func (m *MatchPerpetualDeleveraging_Fill) XXX_Unmarshal(b []byte) error
type MatchPerpetualLiquidation ¶
type MatchPerpetualLiquidation struct { // ID of the subaccount that was liquidated. Liquidated types.SubaccountId `protobuf:"bytes,1,opt,name=liquidated,proto3" json:"liquidated"` // The ID of the clob pair involved in the liquidation. ClobPairId uint32 `protobuf:"varint,2,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` // The ID of the perpetual involved in the liquidation. PerpetualId uint32 `protobuf:"varint,3,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // The total size of the liquidation order including any unfilled size. TotalSize uint64 `protobuf:"varint,4,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // `true` if liquidating a short position, `false` otherwise. IsBuy bool `protobuf:"varint,5,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` // An ordered list of fills created by this liquidation. Fills []MakerFill `protobuf:"bytes,6,rep,name=fills,proto3" json:"fills"` }
MatchPerpetualLiquidation is an injected message used for liquidating a subaccount.
func (*MatchPerpetualLiquidation) Descriptor ¶
func (*MatchPerpetualLiquidation) Descriptor() ([]byte, []int)
func (*MatchPerpetualLiquidation) GetClobPairId ¶
func (m *MatchPerpetualLiquidation) GetClobPairId() uint32
func (*MatchPerpetualLiquidation) GetFills ¶
func (m *MatchPerpetualLiquidation) GetFills() []MakerFill
func (*MatchPerpetualLiquidation) GetIsBuy ¶
func (m *MatchPerpetualLiquidation) GetIsBuy() bool
func (*MatchPerpetualLiquidation) GetLiquidated ¶
func (m *MatchPerpetualLiquidation) GetLiquidated() types.SubaccountId
func (*MatchPerpetualLiquidation) GetMakerSubaccountIds ¶
func (m *MatchPerpetualLiquidation) GetMakerSubaccountIds() []satypes.SubaccountId
GetMakerSubaccountIds gets a list of SubaccountIds belonging to subaccounts which placed the maker orders in the Fills property of this MatchPerpetualLiquidationNew object.
func (MatchPerpetualLiquidation) GetMetricLabels ¶
func (m MatchPerpetualLiquidation) GetMetricLabels() []gometrics.Label
GetMetricLabels returns a slice of gometrics labels for a match perpetual liquidation. Currently, the only label is the perpetual id.
func (*MatchPerpetualLiquidation) GetPerpetualId ¶
func (m *MatchPerpetualLiquidation) GetPerpetualId() uint32
func (*MatchPerpetualLiquidation) GetTotalSize ¶
func (m *MatchPerpetualLiquidation) GetTotalSize() uint64
func (*MatchPerpetualLiquidation) Marshal ¶
func (m *MatchPerpetualLiquidation) Marshal() (dAtA []byte, err error)
func (*MatchPerpetualLiquidation) MarshalTo ¶
func (m *MatchPerpetualLiquidation) MarshalTo(dAtA []byte) (int, error)
func (*MatchPerpetualLiquidation) MarshalToSizedBuffer ¶
func (m *MatchPerpetualLiquidation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MatchPerpetualLiquidation) ProtoMessage ¶
func (*MatchPerpetualLiquidation) ProtoMessage()
func (*MatchPerpetualLiquidation) Reset ¶
func (m *MatchPerpetualLiquidation) Reset()
func (*MatchPerpetualLiquidation) Size ¶
func (m *MatchPerpetualLiquidation) Size() (n int)
func (*MatchPerpetualLiquidation) String ¶
func (m *MatchPerpetualLiquidation) String() string
func (*MatchPerpetualLiquidation) Unmarshal ¶
func (m *MatchPerpetualLiquidation) Unmarshal(dAtA []byte) error
func (*MatchPerpetualLiquidation) XXX_DiscardUnknown ¶
func (m *MatchPerpetualLiquidation) XXX_DiscardUnknown()
func (*MatchPerpetualLiquidation) XXX_Marshal ¶
func (m *MatchPerpetualLiquidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchPerpetualLiquidation) XXX_Merge ¶
func (m *MatchPerpetualLiquidation) XXX_Merge(src proto.Message)
func (*MatchPerpetualLiquidation) XXX_Size ¶
func (m *MatchPerpetualLiquidation) XXX_Size() int
func (*MatchPerpetualLiquidation) XXX_Unmarshal ¶
func (m *MatchPerpetualLiquidation) XXX_Unmarshal(b []byte) error
type MatchWithOrders ¶
type MatchWithOrders struct { MakerOrder MatchableOrder TakerOrder MatchableOrder FillAmount satypes.BaseQuantums MakerFee int64 TakerFee int64 }
MatchWithOrders represents a match which occurred between two orders and the amount that was matched.
func (MatchWithOrders) Validate ¶
func (match MatchWithOrders) Validate() error
Validate performs stateless validation on an order match. This validation does not perform any state reads, or memclob reads.
This validation ensures:
- Order match does not constitute a self-trade.
- Order match contains a `fillAmount` greater than 0.
- Orders in match are for the same `ClobPairId`.
- Orders in match are for opposing sides.
- Orders are crossing.
- The minimum of the takerOrder and makerOrder initial quantums does not exceed the FillAmount.
- The maker order referenced in the match is not a liquidation order.
- The maker order referenced in the match is not an IOC order.
type MatchableOrder ¶
type MatchableOrder interface { // GetSubaccountID returns the `SubaccountId` of the subaccount that placed the order. // In the case of a `LiquidationOrder`, it refers to the subaccount that is being liquidated. GetSubaccountId() satypes.SubaccountId // GetClobPairId returns the CLOB pair ID that this order should be matched against. GetClobPairId() ClobPairId // IsBuy returns true if this is a buy order, false if it's a sell order. IsBuy() bool // IsLiquidation returns true if this is a liquidation order, false if not. IsLiquidation() bool // MustGetOrder returns the underlying order if this is not a liquidation order. Panics if called // for a liquidation order. MustGetOrder() Order // MustGetLiquidatedPerpetualId returns the perpetual ID if this is a liquidation order. Panics // if called for a non-liquidation order. MustGetLiquidatedPerpetualId() uint32 // GetBaseQuantums returns the base quantums of this order. GetBaseQuantums() satypes.BaseQuantums // GetOrderSubticks returns the subticks of this order. GetOrderSubticks() Subticks // GetOrderHash returns the hash of this order. // If this is a liquidation it returns the hash of the `PerpetualLiquidationInfo`. // Else, it returns the hash of the `Order` proto. GetOrderHash() OrderHash // IsReduceOnly returns whether this is a reduce-only order. // This always returns false for liquidation orders. IsReduceOnly() bool }
MatchableOrder is an interface that a matchable order must conform to. This interface is used to generalize matching between standard orders and liquidations.
type MaxPerNBlocksRateLimit ¶
type MaxPerNBlocksRateLimit struct { // How many blocks the rate limit is over. // Specifying 0 is invalid. NumBlocks uint32 `protobuf:"varint,1,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` // What the limit is for `num_blocks`. // Specifying 0 is invalid. Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` }
Defines a rate limit over a specific number of blocks.
func (*MaxPerNBlocksRateLimit) Descriptor ¶
func (*MaxPerNBlocksRateLimit) Descriptor() ([]byte, []int)
func (*MaxPerNBlocksRateLimit) GetLimit ¶
func (m *MaxPerNBlocksRateLimit) GetLimit() uint32
func (*MaxPerNBlocksRateLimit) GetNumBlocks ¶
func (m *MaxPerNBlocksRateLimit) GetNumBlocks() uint32
func (*MaxPerNBlocksRateLimit) Marshal ¶
func (m *MaxPerNBlocksRateLimit) Marshal() (dAtA []byte, err error)
func (*MaxPerNBlocksRateLimit) MarshalTo ¶
func (m *MaxPerNBlocksRateLimit) MarshalTo(dAtA []byte) (int, error)
func (*MaxPerNBlocksRateLimit) MarshalToSizedBuffer ¶
func (m *MaxPerNBlocksRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MaxPerNBlocksRateLimit) ProtoMessage ¶
func (*MaxPerNBlocksRateLimit) ProtoMessage()
func (*MaxPerNBlocksRateLimit) Reset ¶
func (m *MaxPerNBlocksRateLimit) Reset()
func (*MaxPerNBlocksRateLimit) Size ¶
func (m *MaxPerNBlocksRateLimit) Size() (n int)
func (*MaxPerNBlocksRateLimit) String ¶
func (m *MaxPerNBlocksRateLimit) String() string
func (*MaxPerNBlocksRateLimit) Unmarshal ¶
func (m *MaxPerNBlocksRateLimit) Unmarshal(dAtA []byte) error
func (*MaxPerNBlocksRateLimit) XXX_DiscardUnknown ¶
func (m *MaxPerNBlocksRateLimit) XXX_DiscardUnknown()
func (*MaxPerNBlocksRateLimit) XXX_Marshal ¶
func (m *MaxPerNBlocksRateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MaxPerNBlocksRateLimit) XXX_Merge ¶
func (m *MaxPerNBlocksRateLimit) XXX_Merge(src proto.Message)
func (*MaxPerNBlocksRateLimit) XXX_Size ¶
func (m *MaxPerNBlocksRateLimit) XXX_Size() int
func (*MaxPerNBlocksRateLimit) XXX_Unmarshal ¶
func (m *MaxPerNBlocksRateLimit) XXX_Unmarshal(b []byte) error
type MemClob ¶
type MemClob interface { SetClobKeeper( keeper MemClobKeeper, ) CancelOrder( ctx sdk.Context, msgCancelOrder *MsgCancelOrder, ) (offchainUpdates *OffchainUpdates, err error) CreateOrderbook( ctx sdk.Context, clobPair ClobPair, ) MaybeCreateOrderbook( ctx sdk.Context, clobPair ClobPair, ) CountSubaccountShortTermOrders( ctx sdk.Context, subaccountId satypes.SubaccountId, ) uint32 GetOperationsToReplay( ctx sdk.Context, ) ( []InternalOperation, map[OrderHash][]byte, ) GetOperationsRaw( ctx sdk.Context, ) ( operationsQueue []OperationRaw, ) GetOrder( ctx sdk.Context, orderId OrderId, ) (Order, bool) GetCancelOrder( ctx sdk.Context, orderId OrderId, ) (uint32, bool) GetOrderFilledAmount( ctx sdk.Context, orderId OrderId, ) satypes.BaseQuantums GetOrderRemainingAmount( ctx sdk.Context, order Order, ) ( remainingAmount satypes.BaseQuantums, hasRemainingAmount bool, ) GetSubaccountOrders( ctx sdk.Context, clobPairId ClobPairId, subaccountId satypes.SubaccountId, side Order_Side, ) ([]Order, error) PlaceOrder( ctx sdk.Context, order Order, ) (satypes.BaseQuantums, OrderStatus, *OffchainUpdates, error) PlacePerpetualLiquidation( ctx sdk.Context, liquidationOrder LiquidationOrder, ) ( orderSizeOptimisticallyFilledFromMatchingQuantums satypes.BaseQuantums, orderStatus OrderStatus, offchainUpdates *OffchainUpdates, err error, ) DeleverageSubaccount( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, deltaQuantums *big.Int, isFinalSettlement bool, ) ( quantumsDeleveraged *big.Int, err error, ) RemoveOrderIfFilled( ctx sdk.Context, orderId OrderId, ) GetPricePremium( ctx sdk.Context, clobPair ClobPair, params perptypes.GetPricePremiumParams, ) ( premiumPpm int32, err error, ) RemoveAndClearOperationsQueue( ctx sdk.Context, localValidatorOperationsQueue []InternalOperation, ) PurgeInvalidMemclobState( ctx sdk.Context, fullyFilledOrderIds []OrderId, expiredStatefulOrderIds []OrderId, canceledStatefulOrderIds []OrderId, removedStatefulOrderIds []OrderId, existingOffchainUpdates *OffchainUpdates, ) (offchainUpdates *OffchainUpdates) ReplayOperations( ctx sdk.Context, localOperations []InternalOperation, shortTermOrderTxBytes map[OrderHash][]byte, existingOffchainUpdates *OffchainUpdates, ) (offchainUpdates *OffchainUpdates) SetMemclobGauges( ctx sdk.Context, ) GetMidPrice( ctx sdk.Context, clobPairId ClobPairId, ) ( midPrice Subticks, bestBid Order, bestAsk Order, exists bool, ) InsertZeroFillDeleveragingIntoOperationsQueue( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, ) GetOffchainUpdatesForOrderbookSnapshot( ctx sdk.Context, clobPairId ClobPairId, ) (offchainUpdates *OffchainUpdates) GetOrderbookUpdatesForOrderPlacement( ctx sdk.Context, order Order, ) (offchainUpdates *OffchainUpdates) GetOrderbookUpdatesForOrderRemoval( ctx sdk.Context, orderId OrderId, ) (offchainUpdates *OffchainUpdates) GetOrderbookUpdatesForOrderUpdate( ctx sdk.Context, orderId OrderId, ) (offchainUpdates *OffchainUpdates) }
MemClob is an interface that encapsulates all reads and writes to the CLOB's in-memory data structures.
type MemClobKeeper ¶
type MemClobKeeper interface { GetOrderFillAmount( ctx sdk.Context, orderId OrderId, ) ( exists bool, fillAmount satypes.BaseQuantums, prunableBlockHeight uint32, ) ProcessSingleMatch( ctx sdk.Context, matchWithOrders *MatchWithOrders, ) ( success bool, takerUpdateResult satypes.UpdateResult, makerUpdateResult satypes.UpdateResult, offchainUpdates *OffchainUpdates, err error, ) AddOrderToOrderbookSubaccountUpdatesCheck( ctx sdk.Context, clobPairId ClobPairId, subaccountOpenOrders map[satypes.SubaccountId][]PendingOpenOrder, ) ( success bool, successPerUpdate map[satypes.SubaccountId]satypes.UpdateResult, ) CanDeleverageSubaccount( ctx sdk.Context, subaccountId satypes.SubaccountId, perpetualId uint32, ) (bool, bool, error) GetStatePosition( ctx sdk.Context, subaccountId satypes.SubaccountId, clobPairId ClobPairId, ) ( positionSizeQuantums *big.Int, ) ReplayPlaceOrder( ctx sdk.Context, msg *MsgPlaceOrder, ) ( orderSizeOptimisticallyFilledFromMatchingQuantums satypes.BaseQuantums, orderStatus OrderStatus, offchainUpdates *OffchainUpdates, err error, ) AddPreexistingStatefulOrder( ctx sdk.Context, order *Order, memclob MemClob, ) ( orderSizeOptimisticallyFilledFromMatchingQuantums satypes.BaseQuantums, orderStatus OrderStatus, offchainUpdates *OffchainUpdates, err error, ) CancelShortTermOrder( ctx sdk.Context, msgCancelOrder *MsgCancelOrder, ) error GetLongTermOrderPlacement( ctx sdk.Context, orderId OrderId, ) (val LongTermOrderPlacement, found bool) SetLongTermOrderPlacement( ctx sdk.Context, order Order, blockHeight uint32, ) MustAddOrderToStatefulOrdersTimeSlice( ctx sdk.Context, goodTilBlockTime time.Time, orderId OrderId, ) OffsetSubaccountPerpetualPosition( ctx sdk.Context, liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, deltaQuantumsTotal *big.Int, isFinalSettlement bool, ) ( fills []MatchPerpetualDeleveraging_Fill, deltaQuantumsRemaining *big.Int, ) GetIndexerEventManager() indexer_manager.IndexerEventManager IsLiquidatable( ctx sdk.Context, subaccountId satypes.SubaccountId, ) ( bool, error, ) ValidateSubaccountEquityTierLimitForNewOrder( ctx sdk.Context, order Order, ) error Logger( ctx sdk.Context, ) log.Logger SendOrderbookUpdates( ctx sdk.Context, offchainUpdates *OffchainUpdates, snapshot bool, ) }
type MevMetrics ¶
type MevMetrics struct { MevNodeToNode MevNodeToNodeMetrics `json:"mev_node_to_node"` MevDatapoint MEVDatapoint `json:"mev_datapoint"` }
MevMetrics represents all MEV metrics to send to the MEV telemetry service.
type MevNodeToNodeCalculationRequest ¶
type MevNodeToNodeCalculationRequest struct { // Represents the matches on the "block proposer". Note that this field // does not need to be the actual block proposer's matches for a block, since // the MEV calculation logic is run with this nodes matches as the "block // proposer" matches. BlockProposerMatches *ValidatorMevMatches `protobuf:"bytes,1,opt,name=block_proposer_matches,json=blockProposerMatches,proto3" json:"block_proposer_matches,omitempty"` // Represents the matches and mid-prices on the validator. ValidatorMevMetrics *MevNodeToNodeMetrics `protobuf:"bytes,2,opt,name=validator_mev_metrics,json=validatorMevMetrics,proto3" json:"validator_mev_metrics,omitempty"` }
MevNodeToNodeCalculationRequest is a request message used to run the MEV node <> node calculation.
func (*MevNodeToNodeCalculationRequest) Descriptor ¶
func (*MevNodeToNodeCalculationRequest) Descriptor() ([]byte, []int)
func (*MevNodeToNodeCalculationRequest) GetBlockProposerMatches ¶
func (m *MevNodeToNodeCalculationRequest) GetBlockProposerMatches() *ValidatorMevMatches
func (*MevNodeToNodeCalculationRequest) GetValidatorMevMetrics ¶
func (m *MevNodeToNodeCalculationRequest) GetValidatorMevMetrics() *MevNodeToNodeMetrics
func (*MevNodeToNodeCalculationRequest) Marshal ¶
func (m *MevNodeToNodeCalculationRequest) Marshal() (dAtA []byte, err error)
func (*MevNodeToNodeCalculationRequest) MarshalTo ¶
func (m *MevNodeToNodeCalculationRequest) MarshalTo(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationRequest) MarshalToSizedBuffer ¶
func (m *MevNodeToNodeCalculationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationRequest) ProtoMessage ¶
func (*MevNodeToNodeCalculationRequest) ProtoMessage()
func (*MevNodeToNodeCalculationRequest) Reset ¶
func (m *MevNodeToNodeCalculationRequest) Reset()
func (*MevNodeToNodeCalculationRequest) Size ¶
func (m *MevNodeToNodeCalculationRequest) Size() (n int)
func (*MevNodeToNodeCalculationRequest) String ¶
func (m *MevNodeToNodeCalculationRequest) String() string
func (*MevNodeToNodeCalculationRequest) Unmarshal ¶
func (m *MevNodeToNodeCalculationRequest) Unmarshal(dAtA []byte) error
func (*MevNodeToNodeCalculationRequest) XXX_DiscardUnknown ¶
func (m *MevNodeToNodeCalculationRequest) XXX_DiscardUnknown()
func (*MevNodeToNodeCalculationRequest) XXX_Marshal ¶
func (m *MevNodeToNodeCalculationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MevNodeToNodeCalculationRequest) XXX_Merge ¶
func (m *MevNodeToNodeCalculationRequest) XXX_Merge(src proto.Message)
func (*MevNodeToNodeCalculationRequest) XXX_Size ¶
func (m *MevNodeToNodeCalculationRequest) XXX_Size() int
func (*MevNodeToNodeCalculationRequest) XXX_Unmarshal ¶
func (m *MevNodeToNodeCalculationRequest) XXX_Unmarshal(b []byte) error
type MevNodeToNodeCalculationResponse ¶
type MevNodeToNodeCalculationResponse struct {
Results []MevNodeToNodeCalculationResponse_MevAndVolumePerClob `protobuf:"bytes,1,rep,name=results,proto3" json:"results"`
}
MevNodeToNodeCalculationResponse is a response message that contains the MEV node <> node calculation result.
func (*MevNodeToNodeCalculationResponse) Descriptor ¶
func (*MevNodeToNodeCalculationResponse) Descriptor() ([]byte, []int)
func (*MevNodeToNodeCalculationResponse) GetResults ¶
func (m *MevNodeToNodeCalculationResponse) GetResults() []MevNodeToNodeCalculationResponse_MevAndVolumePerClob
func (*MevNodeToNodeCalculationResponse) Marshal ¶
func (m *MevNodeToNodeCalculationResponse) Marshal() (dAtA []byte, err error)
func (*MevNodeToNodeCalculationResponse) MarshalTo ¶
func (m *MevNodeToNodeCalculationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationResponse) MarshalToSizedBuffer ¶
func (m *MevNodeToNodeCalculationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationResponse) ProtoMessage ¶
func (*MevNodeToNodeCalculationResponse) ProtoMessage()
func (*MevNodeToNodeCalculationResponse) Reset ¶
func (m *MevNodeToNodeCalculationResponse) Reset()
func (*MevNodeToNodeCalculationResponse) Size ¶
func (m *MevNodeToNodeCalculationResponse) Size() (n int)
func (*MevNodeToNodeCalculationResponse) String ¶
func (m *MevNodeToNodeCalculationResponse) String() string
func (*MevNodeToNodeCalculationResponse) Unmarshal ¶
func (m *MevNodeToNodeCalculationResponse) Unmarshal(dAtA []byte) error
func (*MevNodeToNodeCalculationResponse) XXX_DiscardUnknown ¶
func (m *MevNodeToNodeCalculationResponse) XXX_DiscardUnknown()
func (*MevNodeToNodeCalculationResponse) XXX_Marshal ¶
func (m *MevNodeToNodeCalculationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MevNodeToNodeCalculationResponse) XXX_Merge ¶
func (m *MevNodeToNodeCalculationResponse) XXX_Merge(src proto.Message)
func (*MevNodeToNodeCalculationResponse) XXX_Size ¶
func (m *MevNodeToNodeCalculationResponse) XXX_Size() int
func (*MevNodeToNodeCalculationResponse) XXX_Unmarshal ¶
func (m *MevNodeToNodeCalculationResponse) XXX_Unmarshal(b []byte) error
type MevNodeToNodeCalculationResponse_MevAndVolumePerClob ¶
type MevNodeToNodeCalculationResponse_MevAndVolumePerClob struct { ClobPairId uint32 `protobuf:"varint,1,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` Mev float32 `protobuf:"fixed32,2,opt,name=mev,proto3" json:"mev,omitempty"` Volume uint64 `protobuf:"varint,3,opt,name=volume,proto3" json:"volume,omitempty"` }
MevAndVolumePerClob contains information about the MEV and volume per CLOB.
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Descriptor ¶
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Descriptor() ([]byte, []int)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetClobPairId ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetClobPairId() uint32
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetMev ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetMev() float32
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetVolume ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) GetVolume() uint64
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Marshal ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Marshal() (dAtA []byte, err error)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalTo ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalTo(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalToSizedBuffer ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) ProtoMessage ¶
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) ProtoMessage()
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Reset ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Reset()
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Size ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Size() (n int)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) String ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) String() string
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Unmarshal ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) Unmarshal(dAtA []byte) error
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_DiscardUnknown ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_DiscardUnknown()
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Marshal ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Merge ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Merge(src proto.Message)
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Size ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Size() int
func (*MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Unmarshal ¶
func (m *MevNodeToNodeCalculationResponse_MevAndVolumePerClob) XXX_Unmarshal(b []byte) error
type MevNodeToNodeMetrics ¶
type MevNodeToNodeMetrics struct { ValidatorMevMatches *ValidatorMevMatches `protobuf:"bytes,1,opt,name=validator_mev_matches,json=validatorMevMatches,proto3" json:"validator_mev_matches,omitempty"` ClobMidPrices []ClobMidPrice `protobuf:"bytes,2,rep,name=clob_mid_prices,json=clobMidPrices,proto3" json:"clob_mid_prices"` BpMevMatches *ValidatorMevMatches `protobuf:"bytes,3,opt,name=bp_mev_matches,json=bpMevMatches,proto3" json:"bp_mev_matches,omitempty"` ProposalReceiveTime uint64 `protobuf:"varint,4,opt,name=proposal_receive_time,json=proposalReceiveTime,proto3" json:"proposal_receive_time,omitempty"` }
MevNodeToNodeMetrics is a data structure for encapsulating all MEV node <> node metrics.
func (*MevNodeToNodeMetrics) Descriptor ¶
func (*MevNodeToNodeMetrics) Descriptor() ([]byte, []int)
func (*MevNodeToNodeMetrics) GetBpMevMatches ¶
func (m *MevNodeToNodeMetrics) GetBpMevMatches() *ValidatorMevMatches
func (*MevNodeToNodeMetrics) GetClobMidPrices ¶
func (m *MevNodeToNodeMetrics) GetClobMidPrices() []ClobMidPrice
func (*MevNodeToNodeMetrics) GetProposalReceiveTime ¶
func (m *MevNodeToNodeMetrics) GetProposalReceiveTime() uint64
func (*MevNodeToNodeMetrics) GetValidatorMevMatches ¶
func (m *MevNodeToNodeMetrics) GetValidatorMevMatches() *ValidatorMevMatches
func (*MevNodeToNodeMetrics) Marshal ¶
func (m *MevNodeToNodeMetrics) Marshal() (dAtA []byte, err error)
func (*MevNodeToNodeMetrics) MarshalTo ¶
func (m *MevNodeToNodeMetrics) MarshalTo(dAtA []byte) (int, error)
func (*MevNodeToNodeMetrics) MarshalToSizedBuffer ¶
func (m *MevNodeToNodeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MevNodeToNodeMetrics) ProtoMessage ¶
func (*MevNodeToNodeMetrics) ProtoMessage()
func (*MevNodeToNodeMetrics) Reset ¶
func (m *MevNodeToNodeMetrics) Reset()
func (*MevNodeToNodeMetrics) Size ¶
func (m *MevNodeToNodeMetrics) Size() (n int)
func (*MevNodeToNodeMetrics) String ¶
func (m *MevNodeToNodeMetrics) String() string
func (*MevNodeToNodeMetrics) Unmarshal ¶
func (m *MevNodeToNodeMetrics) Unmarshal(dAtA []byte) error
func (*MevNodeToNodeMetrics) XXX_DiscardUnknown ¶
func (m *MevNodeToNodeMetrics) XXX_DiscardUnknown()
func (*MevNodeToNodeMetrics) XXX_Marshal ¶
func (m *MevNodeToNodeMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MevNodeToNodeMetrics) XXX_Merge ¶
func (m *MevNodeToNodeMetrics) XXX_Merge(src proto.Message)
func (*MevNodeToNodeMetrics) XXX_Size ¶
func (m *MevNodeToNodeMetrics) XXX_Size() int
func (*MevNodeToNodeMetrics) XXX_Unmarshal ¶
func (m *MevNodeToNodeMetrics) XXX_Unmarshal(b []byte) error
type MevTelemetryConfig ¶
type MsgBatchCancel ¶
type MsgBatchCancel struct { // The subaccount this batch cancel will be applied for. SubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"` // The batch of short term orders that will be cancelled. ShortTermCancels []OrderBatch `protobuf:"bytes,2,rep,name=short_term_cancels,json=shortTermCancels,proto3" json:"short_term_cancels"` // The last block the short term order cancellations can be executed at. GoodTilBlock uint32 `protobuf:"varint,3,opt,name=good_til_block,json=goodTilBlock,proto3" json:"good_til_block,omitempty"` }
MsgBatchCancel is a request type used for batch canceling orders. This msg is not atomic. Cancels will be performed optimistically even if some cancels are invalid or fail.
func NewMsgBatchCancel ¶
func NewMsgBatchCancel( subaccountId satypes.SubaccountId, cancelBatch []OrderBatch, goodTilBlock uint32, ) *MsgBatchCancel
NewMsgBatchCancel constructs a MsgBatchCancel.
func (*MsgBatchCancel) Descriptor ¶
func (*MsgBatchCancel) Descriptor() ([]byte, []int)
func (*MsgBatchCancel) GetGoodTilBlock ¶
func (m *MsgBatchCancel) GetGoodTilBlock() uint32
func (*MsgBatchCancel) GetShortTermCancels ¶
func (m *MsgBatchCancel) GetShortTermCancels() []OrderBatch
func (*MsgBatchCancel) GetSubaccountId ¶
func (m *MsgBatchCancel) GetSubaccountId() types.SubaccountId
func (*MsgBatchCancel) Marshal ¶
func (m *MsgBatchCancel) Marshal() (dAtA []byte, err error)
func (*MsgBatchCancel) MarshalToSizedBuffer ¶
func (m *MsgBatchCancel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBatchCancel) ProtoMessage ¶
func (*MsgBatchCancel) ProtoMessage()
func (*MsgBatchCancel) Reset ¶
func (m *MsgBatchCancel) Reset()
func (*MsgBatchCancel) Size ¶
func (m *MsgBatchCancel) Size() (n int)
func (*MsgBatchCancel) String ¶
func (m *MsgBatchCancel) String() string
func (*MsgBatchCancel) Unmarshal ¶
func (m *MsgBatchCancel) Unmarshal(dAtA []byte) error
func (*MsgBatchCancel) ValidateBasic ¶
func (msg *MsgBatchCancel) ValidateBasic() (err error)
ValidateBasic performs stateless validation for the `MsgBatchCancel` msg.
func (*MsgBatchCancel) XXX_DiscardUnknown ¶
func (m *MsgBatchCancel) XXX_DiscardUnknown()
func (*MsgBatchCancel) XXX_Marshal ¶
func (m *MsgBatchCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBatchCancel) XXX_Merge ¶
func (m *MsgBatchCancel) XXX_Merge(src proto.Message)
func (*MsgBatchCancel) XXX_Size ¶
func (m *MsgBatchCancel) XXX_Size() int
func (*MsgBatchCancel) XXX_Unmarshal ¶
func (m *MsgBatchCancel) XXX_Unmarshal(b []byte) error
type MsgBatchCancelResponse ¶
type MsgBatchCancelResponse struct { // A batch of short term cancel orders that have succeeded. ShortTermSucceeded []*OrderBatch `protobuf:"bytes,1,rep,name=short_term_succeeded,json=shortTermSucceeded,proto3" json:"short_term_succeeded,omitempty"` // A batch of short term cancel orders that have failed. ShortTermFailed []*OrderBatch `protobuf:"bytes,2,rep,name=short_term_failed,json=shortTermFailed,proto3" json:"short_term_failed,omitempty"` }
MsgBatchCancelResponse is a response type used for batch canceling orders. It indicates which cancel orders have succeeded or failed.
func (*MsgBatchCancelResponse) Descriptor ¶
func (*MsgBatchCancelResponse) Descriptor() ([]byte, []int)
func (*MsgBatchCancelResponse) GetShortTermFailed ¶
func (m *MsgBatchCancelResponse) GetShortTermFailed() []*OrderBatch
func (*MsgBatchCancelResponse) GetShortTermSucceeded ¶
func (m *MsgBatchCancelResponse) GetShortTermSucceeded() []*OrderBatch
func (*MsgBatchCancelResponse) Marshal ¶
func (m *MsgBatchCancelResponse) Marshal() (dAtA []byte, err error)
func (*MsgBatchCancelResponse) MarshalTo ¶
func (m *MsgBatchCancelResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgBatchCancelResponse) MarshalToSizedBuffer ¶
func (m *MsgBatchCancelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBatchCancelResponse) ProtoMessage ¶
func (*MsgBatchCancelResponse) ProtoMessage()
func (*MsgBatchCancelResponse) Reset ¶
func (m *MsgBatchCancelResponse) Reset()
func (*MsgBatchCancelResponse) Size ¶
func (m *MsgBatchCancelResponse) Size() (n int)
func (*MsgBatchCancelResponse) String ¶
func (m *MsgBatchCancelResponse) String() string
func (*MsgBatchCancelResponse) Unmarshal ¶
func (m *MsgBatchCancelResponse) Unmarshal(dAtA []byte) error
func (*MsgBatchCancelResponse) XXX_DiscardUnknown ¶
func (m *MsgBatchCancelResponse) XXX_DiscardUnknown()
func (*MsgBatchCancelResponse) XXX_Marshal ¶
func (m *MsgBatchCancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBatchCancelResponse) XXX_Merge ¶
func (m *MsgBatchCancelResponse) XXX_Merge(src proto.Message)
func (*MsgBatchCancelResponse) XXX_Size ¶
func (m *MsgBatchCancelResponse) XXX_Size() int
func (*MsgBatchCancelResponse) XXX_Unmarshal ¶
func (m *MsgBatchCancelResponse) XXX_Unmarshal(b []byte) error
type MsgCancelOrder ¶
type MsgCancelOrder struct { OrderId OrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"` // Information about when the order cancellation expires. // // Types that are valid to be assigned to GoodTilOneof: // *MsgCancelOrder_GoodTilBlock // *MsgCancelOrder_GoodTilBlockTime GoodTilOneof isMsgCancelOrder_GoodTilOneof `protobuf_oneof:"good_til_oneof"` }
MsgCancelOrder is a request type used for canceling orders.
func NewMsgCancelOrderShortTerm ¶
func NewMsgCancelOrderShortTerm(orderId OrderId, goodTilBlock uint32) *MsgCancelOrder
NewMsgCancelOrderShortTerm constructs a MsgCancelOrder from an `OrderId` and a `GoodTilBlock`. `OrderId` must be for a Short-Term order.
func NewMsgCancelOrderStateful ¶
func NewMsgCancelOrderStateful(orderId OrderId, goodTilBlockTime uint32) *MsgCancelOrder
NewMsgCancelOrderStateful constructs a MsgCancelOrder from an `OrderId` and a `GoodTillBlockTime`. `OrderId` must be for a Stateful Order. Long term and conditional orderIds are acceptable.
func (*MsgCancelOrder) Descriptor ¶
func (*MsgCancelOrder) Descriptor() ([]byte, []int)
func (*MsgCancelOrder) GetGoodTilBlock ¶
func (m *MsgCancelOrder) GetGoodTilBlock() uint32
func (*MsgCancelOrder) GetGoodTilBlockTime ¶
func (m *MsgCancelOrder) GetGoodTilBlockTime() uint32
func (*MsgCancelOrder) GetGoodTilOneof ¶
func (m *MsgCancelOrder) GetGoodTilOneof() isMsgCancelOrder_GoodTilOneof
func (*MsgCancelOrder) GetOrderId ¶
func (m *MsgCancelOrder) GetOrderId() OrderId
func (*MsgCancelOrder) Marshal ¶
func (m *MsgCancelOrder) Marshal() (dAtA []byte, err error)
func (*MsgCancelOrder) MarshalToSizedBuffer ¶
func (m *MsgCancelOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCancelOrder) MustGetUnixGoodTilBlockTime ¶
func (msg *MsgCancelOrder) MustGetUnixGoodTilBlockTime() time.Time
MustGetUnixGoodTilBlockTime returns an instance of `Time` that represents the cancel's `GoodTilBlockTime`. This function panics when the order is a short-term order or when its `GoodTilBlockTime` is zero.
func (*MsgCancelOrder) ProtoMessage ¶
func (*MsgCancelOrder) ProtoMessage()
func (*MsgCancelOrder) Reset ¶
func (m *MsgCancelOrder) Reset()
func (*MsgCancelOrder) Size ¶
func (m *MsgCancelOrder) Size() (n int)
func (*MsgCancelOrder) String ¶
func (m *MsgCancelOrder) String() string
func (*MsgCancelOrder) Unmarshal ¶
func (m *MsgCancelOrder) Unmarshal(dAtA []byte) error
func (*MsgCancelOrder) ValidateBasic ¶
func (msg *MsgCancelOrder) ValidateBasic() (err error)
func (*MsgCancelOrder) XXX_DiscardUnknown ¶
func (m *MsgCancelOrder) XXX_DiscardUnknown()
func (*MsgCancelOrder) XXX_Marshal ¶
func (m *MsgCancelOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCancelOrder) XXX_Merge ¶
func (m *MsgCancelOrder) XXX_Merge(src proto.Message)
func (*MsgCancelOrder) XXX_OneofWrappers ¶
func (*MsgCancelOrder) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*MsgCancelOrder) XXX_Size ¶
func (m *MsgCancelOrder) XXX_Size() int
func (*MsgCancelOrder) XXX_Unmarshal ¶
func (m *MsgCancelOrder) XXX_Unmarshal(b []byte) error
type MsgCancelOrderResponse ¶
type MsgCancelOrderResponse struct { }
MsgCancelOrderResponse is a response type used for canceling orders.
func (*MsgCancelOrderResponse) Descriptor ¶
func (*MsgCancelOrderResponse) Descriptor() ([]byte, []int)
func (*MsgCancelOrderResponse) Marshal ¶
func (m *MsgCancelOrderResponse) Marshal() (dAtA []byte, err error)
func (*MsgCancelOrderResponse) MarshalTo ¶
func (m *MsgCancelOrderResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCancelOrderResponse) MarshalToSizedBuffer ¶
func (m *MsgCancelOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCancelOrderResponse) ProtoMessage ¶
func (*MsgCancelOrderResponse) ProtoMessage()
func (*MsgCancelOrderResponse) Reset ¶
func (m *MsgCancelOrderResponse) Reset()
func (*MsgCancelOrderResponse) Size ¶
func (m *MsgCancelOrderResponse) Size() (n int)
func (*MsgCancelOrderResponse) String ¶
func (m *MsgCancelOrderResponse) String() string
func (*MsgCancelOrderResponse) Unmarshal ¶
func (m *MsgCancelOrderResponse) Unmarshal(dAtA []byte) error
func (*MsgCancelOrderResponse) XXX_DiscardUnknown ¶
func (m *MsgCancelOrderResponse) XXX_DiscardUnknown()
func (*MsgCancelOrderResponse) XXX_Marshal ¶
func (m *MsgCancelOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCancelOrderResponse) XXX_Merge ¶
func (m *MsgCancelOrderResponse) XXX_Merge(src proto.Message)
func (*MsgCancelOrderResponse) XXX_Size ¶
func (m *MsgCancelOrderResponse) XXX_Size() int
func (*MsgCancelOrderResponse) XXX_Unmarshal ¶
func (m *MsgCancelOrderResponse) XXX_Unmarshal(b []byte) error
type MsgCancelOrder_GoodTilBlock ¶
type MsgCancelOrder_GoodTilBlock struct {
GoodTilBlock uint32 `protobuf:"varint,2,opt,name=good_til_block,json=goodTilBlock,proto3,oneof" json:"good_til_block,omitempty"`
}
func (*MsgCancelOrder_GoodTilBlock) MarshalTo ¶
func (m *MsgCancelOrder_GoodTilBlock) MarshalTo(dAtA []byte) (int, error)
func (*MsgCancelOrder_GoodTilBlock) MarshalToSizedBuffer ¶
func (m *MsgCancelOrder_GoodTilBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCancelOrder_GoodTilBlock) Size ¶
func (m *MsgCancelOrder_GoodTilBlock) Size() (n int)
type MsgCancelOrder_GoodTilBlockTime ¶
type MsgCancelOrder_GoodTilBlockTime struct {
GoodTilBlockTime uint32 `protobuf:"fixed32,3,opt,name=good_til_block_time,json=goodTilBlockTime,proto3,oneof" json:"good_til_block_time,omitempty"`
}
func (*MsgCancelOrder_GoodTilBlockTime) MarshalTo ¶
func (m *MsgCancelOrder_GoodTilBlockTime) MarshalTo(dAtA []byte) (int, error)
func (*MsgCancelOrder_GoodTilBlockTime) MarshalToSizedBuffer ¶
func (m *MsgCancelOrder_GoodTilBlockTime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCancelOrder_GoodTilBlockTime) Size ¶
func (m *MsgCancelOrder_GoodTilBlockTime) Size() (n int)
type MsgClient ¶
type MsgClient interface { // ProposedOperations is a temporary message used by block proposers // for matching orders as part of the ABCI++ workaround. ProposedOperations(ctx context.Context, in *MsgProposedOperations, opts ...grpc.CallOption) (*MsgProposedOperationsResponse, error) // PlaceOrder allows accounts to place orders on the orderbook. PlaceOrder(ctx context.Context, in *MsgPlaceOrder, opts ...grpc.CallOption) (*MsgPlaceOrderResponse, error) // CancelOrder allows accounts to cancel existing orders on the orderbook. CancelOrder(ctx context.Context, in *MsgCancelOrder, opts ...grpc.CallOption) (*MsgCancelOrderResponse, error) // BatchCancel allows accounts to cancel a batch of orders on the orderbook. BatchCancel(ctx context.Context, in *MsgBatchCancel, opts ...grpc.CallOption) (*MsgBatchCancelResponse, error) // CreateClobPair creates a new clob pair. CreateClobPair(ctx context.Context, in *MsgCreateClobPair, opts ...grpc.CallOption) (*MsgCreateClobPairResponse, error) // UpdateClobPair sets the status of a clob pair. Should return an error // if the authority is not in the clob keeper's set of authorities, // if the ClobPair id is not found in state, or if the update includes // an unsupported status transition. UpdateClobPair(ctx context.Context, in *MsgUpdateClobPair, opts ...grpc.CallOption) (*MsgUpdateClobPairResponse, error) // UpdateEquityTierLimitConfiguration updates the equity tier limit // configuration in state. UpdateEquityTierLimitConfiguration(ctx context.Context, in *MsgUpdateEquityTierLimitConfiguration, opts ...grpc.CallOption) (*MsgUpdateEquityTierLimitConfigurationResponse, error) // UpdateBlockRateLimitConfiguration updates the block rate limit // configuration in state. UpdateBlockRateLimitConfiguration(ctx context.Context, in *MsgUpdateBlockRateLimitConfiguration, opts ...grpc.CallOption) (*MsgUpdateBlockRateLimitConfigurationResponse, error) // UpdateLiquidationsConfig updates the liquidations configuration in state. UpdateLiquidationsConfig(ctx context.Context, in *MsgUpdateLiquidationsConfig, opts ...grpc.CallOption) (*MsgUpdateLiquidationsConfigResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgCreateClobPair ¶
type MsgCreateClobPair struct { // The address that controls the module. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // `clob_pair` defines parameters for the new clob pair. ClobPair ClobPair `protobuf:"bytes,2,opt,name=clob_pair,json=clobPair,proto3" json:"clob_pair"` }
MsgCreateClobPair is a message used by x/gov for creating a new clob pair.
func (*MsgCreateClobPair) Descriptor ¶
func (*MsgCreateClobPair) Descriptor() ([]byte, []int)
func (*MsgCreateClobPair) GetAuthority ¶
func (m *MsgCreateClobPair) GetAuthority() string
func (*MsgCreateClobPair) GetClobPair ¶
func (m *MsgCreateClobPair) GetClobPair() ClobPair
func (*MsgCreateClobPair) Marshal ¶
func (m *MsgCreateClobPair) Marshal() (dAtA []byte, err error)
func (*MsgCreateClobPair) MarshalTo ¶
func (m *MsgCreateClobPair) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateClobPair) MarshalToSizedBuffer ¶
func (m *MsgCreateClobPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateClobPair) ProtoMessage ¶
func (*MsgCreateClobPair) ProtoMessage()
func (*MsgCreateClobPair) Reset ¶
func (m *MsgCreateClobPair) Reset()
func (*MsgCreateClobPair) Size ¶
func (m *MsgCreateClobPair) Size() (n int)
func (*MsgCreateClobPair) String ¶
func (m *MsgCreateClobPair) String() string
func (*MsgCreateClobPair) Unmarshal ¶
func (m *MsgCreateClobPair) Unmarshal(dAtA []byte) error
func (*MsgCreateClobPair) ValidateBasic ¶
func (msg *MsgCreateClobPair) ValidateBasic() error
func (*MsgCreateClobPair) XXX_DiscardUnknown ¶
func (m *MsgCreateClobPair) XXX_DiscardUnknown()
func (*MsgCreateClobPair) XXX_Marshal ¶
func (m *MsgCreateClobPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateClobPair) XXX_Merge ¶
func (m *MsgCreateClobPair) XXX_Merge(src proto.Message)
func (*MsgCreateClobPair) XXX_Size ¶
func (m *MsgCreateClobPair) XXX_Size() int
func (*MsgCreateClobPair) XXX_Unmarshal ¶
func (m *MsgCreateClobPair) XXX_Unmarshal(b []byte) error
type MsgCreateClobPairResponse ¶
type MsgCreateClobPairResponse struct { }
MsgCreateClobPairResponse defines the CreateClobPair response type.
func (*MsgCreateClobPairResponse) Descriptor ¶
func (*MsgCreateClobPairResponse) Descriptor() ([]byte, []int)
func (*MsgCreateClobPairResponse) Marshal ¶
func (m *MsgCreateClobPairResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateClobPairResponse) MarshalTo ¶
func (m *MsgCreateClobPairResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateClobPairResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateClobPairResponse) ProtoMessage ¶
func (*MsgCreateClobPairResponse) ProtoMessage()
func (*MsgCreateClobPairResponse) Reset ¶
func (m *MsgCreateClobPairResponse) Reset()
func (*MsgCreateClobPairResponse) Size ¶
func (m *MsgCreateClobPairResponse) Size() (n int)
func (*MsgCreateClobPairResponse) String ¶
func (m *MsgCreateClobPairResponse) String() string
func (*MsgCreateClobPairResponse) Unmarshal ¶
func (m *MsgCreateClobPairResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateClobPairResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateClobPairResponse) XXX_DiscardUnknown()
func (*MsgCreateClobPairResponse) XXX_Marshal ¶
func (m *MsgCreateClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateClobPairResponse) XXX_Merge ¶
func (m *MsgCreateClobPairResponse) XXX_Merge(src proto.Message)
func (*MsgCreateClobPairResponse) XXX_Size ¶
func (m *MsgCreateClobPairResponse) XXX_Size() int
func (*MsgCreateClobPairResponse) XXX_Unmarshal ¶
func (m *MsgCreateClobPairResponse) XXX_Unmarshal(b []byte) error
type MsgPlaceOrder ¶
type MsgPlaceOrder struct {
Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"`
}
MsgPlaceOrder is a request type used for placing orders.
func NewMsgPlaceOrder ¶
func NewMsgPlaceOrder(order Order) *MsgPlaceOrder
func (*MsgPlaceOrder) Descriptor ¶
func (*MsgPlaceOrder) Descriptor() ([]byte, []int)
func (*MsgPlaceOrder) GetOrder ¶
func (m *MsgPlaceOrder) GetOrder() Order
func (*MsgPlaceOrder) Marshal ¶
func (m *MsgPlaceOrder) Marshal() (dAtA []byte, err error)
func (*MsgPlaceOrder) MarshalToSizedBuffer ¶
func (m *MsgPlaceOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceOrder) ProtoMessage ¶
func (*MsgPlaceOrder) ProtoMessage()
func (*MsgPlaceOrder) Reset ¶
func (m *MsgPlaceOrder) Reset()
func (*MsgPlaceOrder) Size ¶
func (m *MsgPlaceOrder) Size() (n int)
func (*MsgPlaceOrder) String ¶
func (m *MsgPlaceOrder) String() string
func (*MsgPlaceOrder) Unmarshal ¶
func (m *MsgPlaceOrder) Unmarshal(dAtA []byte) error
func (*MsgPlaceOrder) ValidateBasic ¶
func (msg *MsgPlaceOrder) ValidateBasic() (err error)
func (*MsgPlaceOrder) XXX_DiscardUnknown ¶
func (m *MsgPlaceOrder) XXX_DiscardUnknown()
func (*MsgPlaceOrder) XXX_Marshal ¶
func (m *MsgPlaceOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceOrder) XXX_Merge ¶
func (m *MsgPlaceOrder) XXX_Merge(src proto.Message)
func (*MsgPlaceOrder) XXX_Size ¶
func (m *MsgPlaceOrder) XXX_Size() int
func (*MsgPlaceOrder) XXX_Unmarshal ¶
func (m *MsgPlaceOrder) XXX_Unmarshal(b []byte) error
type MsgPlaceOrderResponse ¶
type MsgPlaceOrderResponse struct { }
MsgPlaceOrderResponse is a response type used for placing orders.
func (*MsgPlaceOrderResponse) Descriptor ¶
func (*MsgPlaceOrderResponse) Descriptor() ([]byte, []int)
func (*MsgPlaceOrderResponse) Marshal ¶
func (m *MsgPlaceOrderResponse) Marshal() (dAtA []byte, err error)
func (*MsgPlaceOrderResponse) MarshalTo ¶
func (m *MsgPlaceOrderResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgPlaceOrderResponse) MarshalToSizedBuffer ¶
func (m *MsgPlaceOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceOrderResponse) ProtoMessage ¶
func (*MsgPlaceOrderResponse) ProtoMessage()
func (*MsgPlaceOrderResponse) Reset ¶
func (m *MsgPlaceOrderResponse) Reset()
func (*MsgPlaceOrderResponse) Size ¶
func (m *MsgPlaceOrderResponse) Size() (n int)
func (*MsgPlaceOrderResponse) String ¶
func (m *MsgPlaceOrderResponse) String() string
func (*MsgPlaceOrderResponse) Unmarshal ¶
func (m *MsgPlaceOrderResponse) Unmarshal(dAtA []byte) error
func (*MsgPlaceOrderResponse) XXX_DiscardUnknown ¶
func (m *MsgPlaceOrderResponse) XXX_DiscardUnknown()
func (*MsgPlaceOrderResponse) XXX_Marshal ¶
func (m *MsgPlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceOrderResponse) XXX_Merge ¶
func (m *MsgPlaceOrderResponse) XXX_Merge(src proto.Message)
func (*MsgPlaceOrderResponse) XXX_Size ¶
func (m *MsgPlaceOrderResponse) XXX_Size() int
func (*MsgPlaceOrderResponse) XXX_Unmarshal ¶
func (m *MsgPlaceOrderResponse) XXX_Unmarshal(b []byte) error
type MsgProposedOperations ¶
type MsgProposedOperations struct { // The list of operations proposed by the block proposer. OperationsQueue []OperationRaw `protobuf:"bytes,1,rep,name=operations_queue,json=operationsQueue,proto3" json:"operations_queue"` }
MsgProposedOperations is a message injected by block proposers to specify the operations that occurred in a block.
func (*MsgProposedOperations) Descriptor ¶
func (*MsgProposedOperations) Descriptor() ([]byte, []int)
func (*MsgProposedOperations) GetOperationsQueue ¶
func (m *MsgProposedOperations) GetOperationsQueue() []OperationRaw
func (*MsgProposedOperations) Marshal ¶
func (m *MsgProposedOperations) Marshal() (dAtA []byte, err error)
func (*MsgProposedOperations) MarshalTo ¶
func (m *MsgProposedOperations) MarshalTo(dAtA []byte) (int, error)
func (*MsgProposedOperations) MarshalToSizedBuffer ¶
func (m *MsgProposedOperations) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgProposedOperations) ProtoMessage ¶
func (*MsgProposedOperations) ProtoMessage()
func (*MsgProposedOperations) Reset ¶
func (m *MsgProposedOperations) Reset()
func (*MsgProposedOperations) Size ¶
func (m *MsgProposedOperations) Size() (n int)
func (*MsgProposedOperations) String ¶
func (m *MsgProposedOperations) String() string
func (*MsgProposedOperations) Unmarshal ¶
func (m *MsgProposedOperations) Unmarshal(dAtA []byte) error
func (*MsgProposedOperations) ValidateBasic ¶
func (msg *MsgProposedOperations) ValidateBasic() error
Stateless validation for MsgProposedOperations is located in ValidateAndTransformRawOperations.
func (*MsgProposedOperations) XXX_DiscardUnknown ¶
func (m *MsgProposedOperations) XXX_DiscardUnknown()
func (*MsgProposedOperations) XXX_Marshal ¶
func (m *MsgProposedOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgProposedOperations) XXX_Merge ¶
func (m *MsgProposedOperations) XXX_Merge(src proto.Message)
func (*MsgProposedOperations) XXX_Size ¶
func (m *MsgProposedOperations) XXX_Size() int
func (*MsgProposedOperations) XXX_Unmarshal ¶
func (m *MsgProposedOperations) XXX_Unmarshal(b []byte) error
type MsgProposedOperationsResponse ¶
type MsgProposedOperationsResponse struct { }
MsgProposedOperationsResponse is the response type of the message injected by block proposers to specify the operations that occurred in a block.
func (*MsgProposedOperationsResponse) Descriptor ¶
func (*MsgProposedOperationsResponse) Descriptor() ([]byte, []int)
func (*MsgProposedOperationsResponse) Marshal ¶
func (m *MsgProposedOperationsResponse) Marshal() (dAtA []byte, err error)
func (*MsgProposedOperationsResponse) MarshalTo ¶
func (m *MsgProposedOperationsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgProposedOperationsResponse) MarshalToSizedBuffer ¶
func (m *MsgProposedOperationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgProposedOperationsResponse) ProtoMessage ¶
func (*MsgProposedOperationsResponse) ProtoMessage()
func (*MsgProposedOperationsResponse) Reset ¶
func (m *MsgProposedOperationsResponse) Reset()
func (*MsgProposedOperationsResponse) Size ¶
func (m *MsgProposedOperationsResponse) Size() (n int)
func (*MsgProposedOperationsResponse) String ¶
func (m *MsgProposedOperationsResponse) String() string
func (*MsgProposedOperationsResponse) Unmarshal ¶
func (m *MsgProposedOperationsResponse) Unmarshal(dAtA []byte) error
func (*MsgProposedOperationsResponse) XXX_DiscardUnknown ¶
func (m *MsgProposedOperationsResponse) XXX_DiscardUnknown()
func (*MsgProposedOperationsResponse) XXX_Marshal ¶
func (m *MsgProposedOperationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgProposedOperationsResponse) XXX_Merge ¶
func (m *MsgProposedOperationsResponse) XXX_Merge(src proto.Message)
func (*MsgProposedOperationsResponse) XXX_Size ¶
func (m *MsgProposedOperationsResponse) XXX_Size() int
func (*MsgProposedOperationsResponse) XXX_Unmarshal ¶
func (m *MsgProposedOperationsResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // ProposedOperations is a temporary message used by block proposers // for matching orders as part of the ABCI++ workaround. ProposedOperations(context.Context, *MsgProposedOperations) (*MsgProposedOperationsResponse, error) // PlaceOrder allows accounts to place orders on the orderbook. PlaceOrder(context.Context, *MsgPlaceOrder) (*MsgPlaceOrderResponse, error) // CancelOrder allows accounts to cancel existing orders on the orderbook. CancelOrder(context.Context, *MsgCancelOrder) (*MsgCancelOrderResponse, error) // BatchCancel allows accounts to cancel a batch of orders on the orderbook. BatchCancel(context.Context, *MsgBatchCancel) (*MsgBatchCancelResponse, error) // CreateClobPair creates a new clob pair. CreateClobPair(context.Context, *MsgCreateClobPair) (*MsgCreateClobPairResponse, error) // UpdateClobPair sets the status of a clob pair. Should return an error // if the authority is not in the clob keeper's set of authorities, // if the ClobPair id is not found in state, or if the update includes // an unsupported status transition. UpdateClobPair(context.Context, *MsgUpdateClobPair) (*MsgUpdateClobPairResponse, error) // UpdateEquityTierLimitConfiguration updates the equity tier limit // configuration in state. UpdateEquityTierLimitConfiguration(context.Context, *MsgUpdateEquityTierLimitConfiguration) (*MsgUpdateEquityTierLimitConfigurationResponse, error) // UpdateBlockRateLimitConfiguration updates the block rate limit // configuration in state. UpdateBlockRateLimitConfiguration(context.Context, *MsgUpdateBlockRateLimitConfiguration) (*MsgUpdateBlockRateLimitConfigurationResponse, error) // UpdateLiquidationsConfig updates the liquidations configuration in state. UpdateLiquidationsConfig(context.Context, *MsgUpdateLiquidationsConfig) (*MsgUpdateLiquidationsConfigResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateBlockRateLimitConfiguration ¶
type MsgUpdateBlockRateLimitConfiguration struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Defines the block rate limit configuration to update to. All fields must be // set. BlockRateLimitConfig BlockRateLimitConfiguration `protobuf:"bytes,3,opt,name=block_rate_limit_config,json=blockRateLimitConfig,proto3" json:"block_rate_limit_config"` }
MsgUpdateBlockRateLimitConfiguration is the Msg/BlockRateLimitConfiguration request type.
func (*MsgUpdateBlockRateLimitConfiguration) Descriptor ¶
func (*MsgUpdateBlockRateLimitConfiguration) Descriptor() ([]byte, []int)
func (*MsgUpdateBlockRateLimitConfiguration) GetAuthority ¶
func (m *MsgUpdateBlockRateLimitConfiguration) GetAuthority() string
func (*MsgUpdateBlockRateLimitConfiguration) GetBlockRateLimitConfig ¶
func (m *MsgUpdateBlockRateLimitConfiguration) GetBlockRateLimitConfig() BlockRateLimitConfiguration
func (*MsgUpdateBlockRateLimitConfiguration) Marshal ¶
func (m *MsgUpdateBlockRateLimitConfiguration) Marshal() (dAtA []byte, err error)
func (*MsgUpdateBlockRateLimitConfiguration) MarshalTo ¶
func (m *MsgUpdateBlockRateLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateBlockRateLimitConfiguration) MarshalToSizedBuffer ¶
func (m *MsgUpdateBlockRateLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateBlockRateLimitConfiguration) ProtoMessage ¶
func (*MsgUpdateBlockRateLimitConfiguration) ProtoMessage()
func (*MsgUpdateBlockRateLimitConfiguration) Reset ¶
func (m *MsgUpdateBlockRateLimitConfiguration) Reset()
func (*MsgUpdateBlockRateLimitConfiguration) Size ¶
func (m *MsgUpdateBlockRateLimitConfiguration) Size() (n int)
func (*MsgUpdateBlockRateLimitConfiguration) String ¶
func (m *MsgUpdateBlockRateLimitConfiguration) String() string
func (*MsgUpdateBlockRateLimitConfiguration) Unmarshal ¶
func (m *MsgUpdateBlockRateLimitConfiguration) Unmarshal(dAtA []byte) error
func (*MsgUpdateBlockRateLimitConfiguration) ValidateBasic ¶
func (msg *MsgUpdateBlockRateLimitConfiguration) ValidateBasic() error
func (*MsgUpdateBlockRateLimitConfiguration) XXX_DiscardUnknown ¶
func (m *MsgUpdateBlockRateLimitConfiguration) XXX_DiscardUnknown()
func (*MsgUpdateBlockRateLimitConfiguration) XXX_Marshal ¶
func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateBlockRateLimitConfiguration) XXX_Merge ¶
func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Merge(src proto.Message)
func (*MsgUpdateBlockRateLimitConfiguration) XXX_Size ¶
func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Size() int
func (*MsgUpdateBlockRateLimitConfiguration) XXX_Unmarshal ¶
func (m *MsgUpdateBlockRateLimitConfiguration) XXX_Unmarshal(b []byte) error
type MsgUpdateBlockRateLimitConfigurationResponse ¶
type MsgUpdateBlockRateLimitConfigurationResponse struct { }
MsgUpdateBlockRateLimitConfiguration is a response type for updating the liquidations config.
func (*MsgUpdateBlockRateLimitConfigurationResponse) Descriptor ¶
func (*MsgUpdateBlockRateLimitConfigurationResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateBlockRateLimitConfigurationResponse) Marshal ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateBlockRateLimitConfigurationResponse) MarshalTo ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateBlockRateLimitConfigurationResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateBlockRateLimitConfigurationResponse) ProtoMessage ¶
func (*MsgUpdateBlockRateLimitConfigurationResponse) ProtoMessage()
func (*MsgUpdateBlockRateLimitConfigurationResponse) Reset ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) Reset()
func (*MsgUpdateBlockRateLimitConfigurationResponse) Size ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) Size() (n int)
func (*MsgUpdateBlockRateLimitConfigurationResponse) String ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) String() string
func (*MsgUpdateBlockRateLimitConfigurationResponse) Unmarshal ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateBlockRateLimitConfigurationResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_DiscardUnknown()
func (*MsgUpdateBlockRateLimitConfigurationResponse) XXX_Marshal ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateBlockRateLimitConfigurationResponse) XXX_Merge ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateBlockRateLimitConfigurationResponse) XXX_Size ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Size() int
func (*MsgUpdateBlockRateLimitConfigurationResponse) XXX_Unmarshal ¶
func (m *MsgUpdateBlockRateLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateClobPair ¶
type MsgUpdateClobPair struct { // Authority is the address that may send this message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // `clob_pair` is the ClobPair to write to state. ClobPair ClobPair `protobuf:"bytes,2,opt,name=clob_pair,json=clobPair,proto3" json:"clob_pair"` }
MsgUpdateClobPair is a request type used for updating a ClobPair in state.
func (*MsgUpdateClobPair) Descriptor ¶
func (*MsgUpdateClobPair) Descriptor() ([]byte, []int)
func (*MsgUpdateClobPair) GetAuthority ¶
func (m *MsgUpdateClobPair) GetAuthority() string
func (*MsgUpdateClobPair) GetClobPair ¶
func (m *MsgUpdateClobPair) GetClobPair() ClobPair
func (*MsgUpdateClobPair) Marshal ¶
func (m *MsgUpdateClobPair) Marshal() (dAtA []byte, err error)
func (*MsgUpdateClobPair) MarshalTo ¶
func (m *MsgUpdateClobPair) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateClobPair) MarshalToSizedBuffer ¶
func (m *MsgUpdateClobPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateClobPair) ProtoMessage ¶
func (*MsgUpdateClobPair) ProtoMessage()
func (*MsgUpdateClobPair) Reset ¶
func (m *MsgUpdateClobPair) Reset()
func (*MsgUpdateClobPair) Size ¶
func (m *MsgUpdateClobPair) Size() (n int)
func (*MsgUpdateClobPair) String ¶
func (m *MsgUpdateClobPair) String() string
func (*MsgUpdateClobPair) Unmarshal ¶
func (m *MsgUpdateClobPair) Unmarshal(dAtA []byte) error
func (*MsgUpdateClobPair) ValidateBasic ¶
func (msg *MsgUpdateClobPair) ValidateBasic() error
ValidateBasic validates that the message's ClobPair status is a supported status.
func (*MsgUpdateClobPair) XXX_DiscardUnknown ¶
func (m *MsgUpdateClobPair) XXX_DiscardUnknown()
func (*MsgUpdateClobPair) XXX_Marshal ¶
func (m *MsgUpdateClobPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateClobPair) XXX_Merge ¶
func (m *MsgUpdateClobPair) XXX_Merge(src proto.Message)
func (*MsgUpdateClobPair) XXX_Size ¶
func (m *MsgUpdateClobPair) XXX_Size() int
func (*MsgUpdateClobPair) XXX_Unmarshal ¶
func (m *MsgUpdateClobPair) XXX_Unmarshal(b []byte) error
type MsgUpdateClobPairResponse ¶
type MsgUpdateClobPairResponse struct { }
MsgUpdateClobPairResponse is a response type used for setting a ClobPair's status.
func (*MsgUpdateClobPairResponse) Descriptor ¶
func (*MsgUpdateClobPairResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateClobPairResponse) Marshal ¶
func (m *MsgUpdateClobPairResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateClobPairResponse) MarshalTo ¶
func (m *MsgUpdateClobPairResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateClobPairResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateClobPairResponse) ProtoMessage ¶
func (*MsgUpdateClobPairResponse) ProtoMessage()
func (*MsgUpdateClobPairResponse) Reset ¶
func (m *MsgUpdateClobPairResponse) Reset()
func (*MsgUpdateClobPairResponse) Size ¶
func (m *MsgUpdateClobPairResponse) Size() (n int)
func (*MsgUpdateClobPairResponse) String ¶
func (m *MsgUpdateClobPairResponse) String() string
func (*MsgUpdateClobPairResponse) Unmarshal ¶
func (m *MsgUpdateClobPairResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateClobPairResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateClobPairResponse) XXX_DiscardUnknown()
func (*MsgUpdateClobPairResponse) XXX_Marshal ¶
func (m *MsgUpdateClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateClobPairResponse) XXX_Merge ¶
func (m *MsgUpdateClobPairResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateClobPairResponse) XXX_Size ¶
func (m *MsgUpdateClobPairResponse) XXX_Size() int
func (*MsgUpdateClobPairResponse) XXX_Unmarshal ¶
func (m *MsgUpdateClobPairResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateEquityTierLimitConfiguration ¶
type MsgUpdateEquityTierLimitConfiguration struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Defines the equity tier limit configuration to update to. All fields must // be set. EquityTierLimitConfig EquityTierLimitConfiguration `protobuf:"bytes,2,opt,name=equity_tier_limit_config,json=equityTierLimitConfig,proto3" json:"equity_tier_limit_config"` }
MsgUpdateEquityTierLimitConfiguration is the Msg/EquityTierLimitConfiguration request type.
func (*MsgUpdateEquityTierLimitConfiguration) Descriptor ¶
func (*MsgUpdateEquityTierLimitConfiguration) Descriptor() ([]byte, []int)
func (*MsgUpdateEquityTierLimitConfiguration) GetAuthority ¶
func (m *MsgUpdateEquityTierLimitConfiguration) GetAuthority() string
func (*MsgUpdateEquityTierLimitConfiguration) GetEquityTierLimitConfig ¶
func (m *MsgUpdateEquityTierLimitConfiguration) GetEquityTierLimitConfig() EquityTierLimitConfiguration
func (*MsgUpdateEquityTierLimitConfiguration) Marshal ¶
func (m *MsgUpdateEquityTierLimitConfiguration) Marshal() (dAtA []byte, err error)
func (*MsgUpdateEquityTierLimitConfiguration) MarshalTo ¶
func (m *MsgUpdateEquityTierLimitConfiguration) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateEquityTierLimitConfiguration) MarshalToSizedBuffer ¶
func (m *MsgUpdateEquityTierLimitConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateEquityTierLimitConfiguration) ProtoMessage ¶
func (*MsgUpdateEquityTierLimitConfiguration) ProtoMessage()
func (*MsgUpdateEquityTierLimitConfiguration) Reset ¶
func (m *MsgUpdateEquityTierLimitConfiguration) Reset()
func (*MsgUpdateEquityTierLimitConfiguration) Size ¶
func (m *MsgUpdateEquityTierLimitConfiguration) Size() (n int)
func (*MsgUpdateEquityTierLimitConfiguration) String ¶
func (m *MsgUpdateEquityTierLimitConfiguration) String() string
func (*MsgUpdateEquityTierLimitConfiguration) Unmarshal ¶
func (m *MsgUpdateEquityTierLimitConfiguration) Unmarshal(dAtA []byte) error
func (*MsgUpdateEquityTierLimitConfiguration) ValidateBasic ¶
func (msg *MsgUpdateEquityTierLimitConfiguration) ValidateBasic() error
func (*MsgUpdateEquityTierLimitConfiguration) XXX_DiscardUnknown ¶
func (m *MsgUpdateEquityTierLimitConfiguration) XXX_DiscardUnknown()
func (*MsgUpdateEquityTierLimitConfiguration) XXX_Marshal ¶
func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateEquityTierLimitConfiguration) XXX_Merge ¶
func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Merge(src proto.Message)
func (*MsgUpdateEquityTierLimitConfiguration) XXX_Size ¶
func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Size() int
func (*MsgUpdateEquityTierLimitConfiguration) XXX_Unmarshal ¶
func (m *MsgUpdateEquityTierLimitConfiguration) XXX_Unmarshal(b []byte) error
type MsgUpdateEquityTierLimitConfigurationResponse ¶
type MsgUpdateEquityTierLimitConfigurationResponse struct { }
MsgUpdateEquityTierLimitConfiguration is the Msg/EquityTierLimitConfiguration response type.
func (*MsgUpdateEquityTierLimitConfigurationResponse) Descriptor ¶
func (*MsgUpdateEquityTierLimitConfigurationResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateEquityTierLimitConfigurationResponse) Marshal ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateEquityTierLimitConfigurationResponse) MarshalTo ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateEquityTierLimitConfigurationResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateEquityTierLimitConfigurationResponse) ProtoMessage ¶
func (*MsgUpdateEquityTierLimitConfigurationResponse) ProtoMessage()
func (*MsgUpdateEquityTierLimitConfigurationResponse) Reset ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) Reset()
func (*MsgUpdateEquityTierLimitConfigurationResponse) Size ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) Size() (n int)
func (*MsgUpdateEquityTierLimitConfigurationResponse) String ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) String() string
func (*MsgUpdateEquityTierLimitConfigurationResponse) Unmarshal ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateEquityTierLimitConfigurationResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_DiscardUnknown()
func (*MsgUpdateEquityTierLimitConfigurationResponse) XXX_Marshal ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateEquityTierLimitConfigurationResponse) XXX_Merge ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateEquityTierLimitConfigurationResponse) XXX_Size ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Size() int
func (*MsgUpdateEquityTierLimitConfigurationResponse) XXX_Unmarshal ¶
func (m *MsgUpdateEquityTierLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateLiquidationsConfig ¶
type MsgUpdateLiquidationsConfig struct { // Authority is the address that may send this message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Defines the liquidations configuration to update to. All fields must // be set. LiquidationsConfig LiquidationsConfig `protobuf:"bytes,2,opt,name=liquidations_config,json=liquidationsConfig,proto3" json:"liquidations_config"` }
MsgUpdateLiquidationsConfig is a request type for updating the liquidations config.
func (*MsgUpdateLiquidationsConfig) Descriptor ¶
func (*MsgUpdateLiquidationsConfig) Descriptor() ([]byte, []int)
func (*MsgUpdateLiquidationsConfig) GetAuthority ¶
func (m *MsgUpdateLiquidationsConfig) GetAuthority() string
func (*MsgUpdateLiquidationsConfig) GetLiquidationsConfig ¶
func (m *MsgUpdateLiquidationsConfig) GetLiquidationsConfig() LiquidationsConfig
func (*MsgUpdateLiquidationsConfig) Marshal ¶
func (m *MsgUpdateLiquidationsConfig) Marshal() (dAtA []byte, err error)
func (*MsgUpdateLiquidationsConfig) MarshalTo ¶
func (m *MsgUpdateLiquidationsConfig) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateLiquidationsConfig) MarshalToSizedBuffer ¶
func (m *MsgUpdateLiquidationsConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateLiquidationsConfig) ProtoMessage ¶
func (*MsgUpdateLiquidationsConfig) ProtoMessage()
func (*MsgUpdateLiquidationsConfig) Reset ¶
func (m *MsgUpdateLiquidationsConfig) Reset()
func (*MsgUpdateLiquidationsConfig) Size ¶
func (m *MsgUpdateLiquidationsConfig) Size() (n int)
func (*MsgUpdateLiquidationsConfig) String ¶
func (m *MsgUpdateLiquidationsConfig) String() string
func (*MsgUpdateLiquidationsConfig) Unmarshal ¶
func (m *MsgUpdateLiquidationsConfig) Unmarshal(dAtA []byte) error
func (*MsgUpdateLiquidationsConfig) ValidateBasic ¶
func (msg *MsgUpdateLiquidationsConfig) ValidateBasic() error
ValidateBasic validates the message's LiquidationConfig. Returns an error if the authority is empty or if the LiquidationsConfig is invalid.
func (*MsgUpdateLiquidationsConfig) XXX_DiscardUnknown ¶
func (m *MsgUpdateLiquidationsConfig) XXX_DiscardUnknown()
func (*MsgUpdateLiquidationsConfig) XXX_Marshal ¶
func (m *MsgUpdateLiquidationsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateLiquidationsConfig) XXX_Merge ¶
func (m *MsgUpdateLiquidationsConfig) XXX_Merge(src proto.Message)
func (*MsgUpdateLiquidationsConfig) XXX_Size ¶
func (m *MsgUpdateLiquidationsConfig) XXX_Size() int
func (*MsgUpdateLiquidationsConfig) XXX_Unmarshal ¶
func (m *MsgUpdateLiquidationsConfig) XXX_Unmarshal(b []byte) error
type MsgUpdateLiquidationsConfigResponse ¶
type MsgUpdateLiquidationsConfigResponse struct { }
MsgUpdateLiquidationsConfig is the Msg/LiquidationsConfig response type.
func (*MsgUpdateLiquidationsConfigResponse) Descriptor ¶
func (*MsgUpdateLiquidationsConfigResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateLiquidationsConfigResponse) Marshal ¶
func (m *MsgUpdateLiquidationsConfigResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateLiquidationsConfigResponse) MarshalTo ¶
func (m *MsgUpdateLiquidationsConfigResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateLiquidationsConfigResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateLiquidationsConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateLiquidationsConfigResponse) ProtoMessage ¶
func (*MsgUpdateLiquidationsConfigResponse) ProtoMessage()
func (*MsgUpdateLiquidationsConfigResponse) Reset ¶
func (m *MsgUpdateLiquidationsConfigResponse) Reset()
func (*MsgUpdateLiquidationsConfigResponse) Size ¶
func (m *MsgUpdateLiquidationsConfigResponse) Size() (n int)
func (*MsgUpdateLiquidationsConfigResponse) String ¶
func (m *MsgUpdateLiquidationsConfigResponse) String() string
func (*MsgUpdateLiquidationsConfigResponse) Unmarshal ¶
func (m *MsgUpdateLiquidationsConfigResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateLiquidationsConfigResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateLiquidationsConfigResponse) XXX_DiscardUnknown()
func (*MsgUpdateLiquidationsConfigResponse) XXX_Marshal ¶
func (m *MsgUpdateLiquidationsConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateLiquidationsConfigResponse) XXX_Merge ¶
func (m *MsgUpdateLiquidationsConfigResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateLiquidationsConfigResponse) XXX_Size ¶
func (m *MsgUpdateLiquidationsConfigResponse) XXX_Size() int
func (*MsgUpdateLiquidationsConfigResponse) XXX_Unmarshal ¶
func (m *MsgUpdateLiquidationsConfigResponse) XXX_Unmarshal(b []byte) error
type OffchainUpdateMessage ¶
type OffchainUpdateMessage struct { Type OffchainUpdateMessageType OrderId OrderId Message msgsender.Message }
Represents a single message added to the OffchainUpdates. It contains additional metadata needed for message manipulation for specific scenarios, such as Replay.
type OffchainUpdateMessageType ¶
type OffchainUpdateMessageType int
const ( PlaceMessageType OffchainUpdateMessageType = iota RemoveMessageType UpdateMessageType )
Enum used to track the types of messages, should correspond to the types of messages defined in https://github.com/StreamFinance-Protocol/v4-proto/blob/main/klyraprotocol/indexer/off_chain_updates/off_chain_updates.proto
type OffchainUpdates ¶
type OffchainUpdates struct {
Messages []OffchainUpdateMessage
}
Handles the collection of messages meant for Indexer's off-chain update ingestion.
func NewOffchainUpdates ¶
func NewOffchainUpdates() *OffchainUpdates
NewOffchainupdates creates a new OffchainUpdates struct and returns a pointer to it.
func (*OffchainUpdates) AddPlaceMessage ¶
func (om *OffchainUpdates) AddPlaceMessage(orderId OrderId, message msgsender.Message)
AddPlaceMessage adds an off-chain message for the placing of an order to the OffchainUpdates.
func (*OffchainUpdates) AddRemoveMessage ¶
func (om *OffchainUpdates) AddRemoveMessage(orderId OrderId, message msgsender.Message)
AddRemoveMessage adds an off-chain message for the removal of an order to the OffchainUpdates.
func (*OffchainUpdates) AddUpdateMessage ¶
func (om *OffchainUpdates) AddUpdateMessage(orderId OrderId, message msgsender.Message)
AddUpdateMessage adds an off-chain message for the update of an order to the OffchainUpdates.
func (*OffchainUpdates) Append ¶
func (om *OffchainUpdates) Append(newMessages *OffchainUpdates)
Append adds all of of the messages from another OffchainUpdates struct in order.
func (*OffchainUpdates) CondenseMessagesForReplay ¶
func (om *OffchainUpdates) CondenseMessagesForReplay()
CondenseMessageForReplay removes all but the last off-chain message for each OrderId from the slice of all off-chain messages tracked by the OffchainUpdates struct with the exception of OrderPlace messages. Intended for use after off-chain messages are generated when replaying multiple operations.
func (*OffchainUpdates) GetMessages ¶
func (om *OffchainUpdates) GetMessages() []msgsender.Message
GetMessages returns all the off-chaim messages in the OffchainUpdates struct.
type Operation ¶
type Operation struct { // operation represents the operation that occurred, which can be a match, // short term order placement, short term order cancellation, or the placement // of a pre-existing stateful order. // // Types that are valid to be assigned to Operation: // *Operation_Match // *Operation_ShortTermOrderPlacement // *Operation_ShortTermOrderCancellation // *Operation_PreexistingStatefulOrder Operation isOperation_Operation `protobuf_oneof:"operation"` }
Operation represents an operation in the proposed operations. Operation is used internally within the memclob only.
func (*Operation) Descriptor ¶
func (*Operation) GetOperation ¶
func (m *Operation) GetOperation() isOperation_Operation
func (*Operation) GetPreexistingStatefulOrder ¶
func (*Operation) GetShortTermOrderCancellation ¶
func (m *Operation) GetShortTermOrderCancellation() *MsgCancelOrder
func (*Operation) GetShortTermOrderPlacement ¶
func (m *Operation) GetShortTermOrderPlacement() *MsgPlaceOrder
func (*Operation) MarshalToSizedBuffer ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) XXX_DiscardUnknown ¶
func (m *Operation) XXX_DiscardUnknown()
func (*Operation) XXX_Marshal ¶
func (*Operation) XXX_OneofWrappers ¶
func (*Operation) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Operation) XXX_Unmarshal ¶
type OperationRaw ¶
type OperationRaw struct { // operationRaw represents an operation that occurred, which can be a match, // a signed order placement, or an order removal. // // Types that are valid to be assigned to Operation: // // *OperationRaw_Match // *OperationRaw_ShortTermOrderPlacement // *OperationRaw_OrderRemoval Operation isOperationRaw_Operation `protobuf_oneof:"operation"` }
OperationRaw represents an operation in the proposed operations. Note that the `order_placement` operation is a signed message.
func (*OperationRaw) Descriptor ¶
func (*OperationRaw) Descriptor() ([]byte, []int)
func (*OperationRaw) GetMatch ¶
func (m *OperationRaw) GetMatch() *ClobMatch
func (*OperationRaw) GetOperation ¶
func (m *OperationRaw) GetOperation() isOperationRaw_Operation
func (*OperationRaw) GetOrderRemoval ¶
func (m *OperationRaw) GetOrderRemoval() *OrderRemoval
func (*OperationRaw) GetShortTermOrderPlacement ¶
func (m *OperationRaw) GetShortTermOrderPlacement() []byte
func (*OperationRaw) Marshal ¶
func (m *OperationRaw) Marshal() (dAtA []byte, err error)
func (*OperationRaw) MarshalToSizedBuffer ¶
func (m *OperationRaw) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OperationRaw) ProtoMessage ¶
func (*OperationRaw) ProtoMessage()
func (*OperationRaw) Reset ¶
func (m *OperationRaw) Reset()
func (*OperationRaw) Size ¶
func (m *OperationRaw) Size() (n int)
func (*OperationRaw) String ¶
func (m *OperationRaw) String() string
func (*OperationRaw) Unmarshal ¶
func (m *OperationRaw) Unmarshal(dAtA []byte) error
func (*OperationRaw) XXX_DiscardUnknown ¶
func (m *OperationRaw) XXX_DiscardUnknown()
func (*OperationRaw) XXX_Marshal ¶
func (m *OperationRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OperationRaw) XXX_Merge ¶
func (m *OperationRaw) XXX_Merge(src proto.Message)
func (*OperationRaw) XXX_OneofWrappers ¶
func (*OperationRaw) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*OperationRaw) XXX_Size ¶
func (m *OperationRaw) XXX_Size() int
func (*OperationRaw) XXX_Unmarshal ¶
func (m *OperationRaw) XXX_Unmarshal(b []byte) error
type OperationRaw_Match ¶
type OperationRaw_Match struct {
Match *ClobMatch `protobuf:"bytes,1,opt,name=match,proto3,oneof" json:"match,omitempty"`
}
func (*OperationRaw_Match) MarshalTo ¶
func (m *OperationRaw_Match) MarshalTo(dAtA []byte) (int, error)
func (*OperationRaw_Match) MarshalToSizedBuffer ¶
func (m *OperationRaw_Match) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OperationRaw_Match) Size ¶
func (m *OperationRaw_Match) Size() (n int)
type OperationRaw_OrderRemoval ¶
type OperationRaw_OrderRemoval struct {
OrderRemoval *OrderRemoval `protobuf:"bytes,3,opt,name=order_removal,json=orderRemoval,proto3,oneof" json:"order_removal,omitempty"`
}
func (*OperationRaw_OrderRemoval) MarshalTo ¶
func (m *OperationRaw_OrderRemoval) MarshalTo(dAtA []byte) (int, error)
func (*OperationRaw_OrderRemoval) MarshalToSizedBuffer ¶
func (m *OperationRaw_OrderRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OperationRaw_OrderRemoval) Size ¶
func (m *OperationRaw_OrderRemoval) Size() (n int)
type OperationRaw_ShortTermOrderPlacement ¶
type OperationRaw_ShortTermOrderPlacement struct {
ShortTermOrderPlacement []byte `` /* 140-byte string literal not displayed */
}
func (*OperationRaw_ShortTermOrderPlacement) MarshalTo ¶
func (m *OperationRaw_ShortTermOrderPlacement) MarshalTo(dAtA []byte) (int, error)
func (*OperationRaw_ShortTermOrderPlacement) MarshalToSizedBuffer ¶
func (m *OperationRaw_ShortTermOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OperationRaw_ShortTermOrderPlacement) Size ¶
func (m *OperationRaw_ShortTermOrderPlacement) Size() (n int)
type Operation_Match ¶
type Operation_Match struct {
Match *ClobMatch `protobuf:"bytes,1,opt,name=match,proto3,oneof" json:"match,omitempty"`
}
func (*Operation_Match) MarshalToSizedBuffer ¶
func (m *Operation_Match) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Operation_Match) Size ¶
func (m *Operation_Match) Size() (n int)
type Operation_PreexistingStatefulOrder ¶
type Operation_PreexistingStatefulOrder struct {
PreexistingStatefulOrder *OrderId `` /* 141-byte string literal not displayed */
}
func (*Operation_PreexistingStatefulOrder) MarshalTo ¶
func (m *Operation_PreexistingStatefulOrder) MarshalTo(dAtA []byte) (int, error)
func (*Operation_PreexistingStatefulOrder) MarshalToSizedBuffer ¶
func (m *Operation_PreexistingStatefulOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Operation_PreexistingStatefulOrder) Size ¶
func (m *Operation_PreexistingStatefulOrder) Size() (n int)
type Operation_ShortTermOrderCancellation ¶
type Operation_ShortTermOrderCancellation struct {
ShortTermOrderCancellation *MsgCancelOrder `` /* 149-byte string literal not displayed */
}
func (*Operation_ShortTermOrderCancellation) MarshalTo ¶
func (m *Operation_ShortTermOrderCancellation) MarshalTo(dAtA []byte) (int, error)
func (*Operation_ShortTermOrderCancellation) MarshalToSizedBuffer ¶
func (m *Operation_ShortTermOrderCancellation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Operation_ShortTermOrderCancellation) Size ¶
func (m *Operation_ShortTermOrderCancellation) Size() (n int)
type Operation_ShortTermOrderPlacement ¶
type Operation_ShortTermOrderPlacement struct {
ShortTermOrderPlacement *MsgPlaceOrder `` /* 140-byte string literal not displayed */
}
func (*Operation_ShortTermOrderPlacement) MarshalTo ¶
func (m *Operation_ShortTermOrderPlacement) MarshalTo(dAtA []byte) (int, error)
func (*Operation_ShortTermOrderPlacement) MarshalToSizedBuffer ¶
func (m *Operation_ShortTermOrderPlacement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Operation_ShortTermOrderPlacement) Size ¶
func (m *Operation_ShortTermOrderPlacement) Size() (n int)
type OperationsStats ¶
type OperationsStats struct { // Stat fields. MatchedShortTermOrdersCount uint MatchedLongTermOrdersCount uint MatchedConditionalOrdersCount uint TakerOrdersCount uint LiquidationOrdersCount uint DeleveragingOperationsCount uint TotalFillsCount uint LongTermOrderRemovalsCount uint ConditionalOrderRemovalsCount uint UniqueSubaccountsLiquidated uint UniqueSubaccountsDeleveraged uint UniqueSubaccountsOffsettingDeleveraged uint // contains filtered or unexported fields }
OperationsStats is a struct that holds stats about a list of operations that were proposed in a block.
func StatMsgProposedOperations ¶
func StatMsgProposedOperations( rawOperations []OperationRaw, ) OperationsStats
StatMsgProposedOperations generates statistics from a list of internal operations and returns them in an `OperationsStats` struct.
func (*OperationsStats) EmitStats ¶
func (stats *OperationsStats) EmitStats(abciCallback string)
EmitStats emits stats about the internal operations. It includes the provided ABCI callback as a label in the stat.
type OperationsToPropose ¶
type OperationsToPropose struct { // An ordered list of operations to propose in a block. OperationsQueue []InternalOperation // A set of order hashes where the order placement has already been included in the operations queue. OrderHashesInOperationsQueue map[OrderHash]bool // A map of Short-Term order hashes to the raw transaction bytes of the order placement. // This is used in `GetOperationsQueueRaw` for returning a slice of `OperationRaw` for // the purposes of constructing `MsgProposedOperations`. ShortTermOrderHashToTxBytes map[OrderHash][]byte // A map from order ID to the orders themselves for each order that // was matched. Note: there may be multiple distinct orders with the same // ID that are matched. In that case, only the "greatest" of any such orders // is maintained in this map. MatchedOrderIdToOrder map[OrderId]Order // A set of order ids where the order removal has already been included in the operations queue. OrderRemovalsInOperationsQueue map[OrderId]bool }
OperationsToPropose is a struct encapsulating data required for determining the operations to propose in a block. TODO(DEC-1889): Fix hack where struct fields are public.
func NewOperationsToPropose ¶
func NewOperationsToPropose() *OperationsToPropose
NewOperationsToPropose returns a new instance of `OperationsToPropose`.
func (*OperationsToPropose) AddZeroFillDeleveragingToOperationsQueue ¶
func (o *OperationsToPropose) AddZeroFillDeleveragingToOperationsQueue( liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, )
AddZeroFillDeleveragingToOperationsQueue adds a zero-fill deleveraging match operation to the operations queue.
func (*OperationsToPropose) ClearOperationsQueue ¶
func (o *OperationsToPropose) ClearOperationsQueue()
ClearOperationsQueue clears out all operations in the operations queue and all entries in the `OrderHashesInOperationsQueue` set. Note that we don't clear `ShortTermOrderHashToTxBytes` because it is updated in the `mustRemoveOrder` and `RemoveAndClearOperationsQueue` functions.
func (*OperationsToPropose) GetOperationsToPropose ¶
func (o *OperationsToPropose) GetOperationsToPropose() []OperationRaw
GetOperationsToPropose returns a slice of OperationRaw. Note this function returns all operations in the operations queue *except* pre-existing stateful order placements, since those operations are only used when replaying a local validator’s operations queue. They do not need to be proposed again. This function will panic if any of the Short-Term order placement operations do not have an entry in ShortTermOrderHashToTxBytes, since that is necessary for constructing the list of OperationRaw.
func (*OperationsToPropose) GetOperationsToReplay ¶
func (o *OperationsToPropose) GetOperationsToReplay() ( []InternalOperation, map[OrderHash][]byte, )
GetOperationsToReplay returns all operations in the operations queue and a map of all Short-Term order hashes to their TX bytes. Note the returned operations include pre-existing stateful order placements, since those operations are only used when replaying a local validator’s operations queue. This function will panic if any of the Short-Term order placement operations do not have an entry in ShortTermOrderHashToTxBytes, since that is necessary for constructing the list of OperationWithTxBytes.
func (*OperationsToPropose) IsOrderPlacementInOperationsQueue ¶
func (o *OperationsToPropose) IsOrderPlacementInOperationsQueue( order Order, ) bool
IsOrderPlacementInOperationsQueue returns true if the provided order hash is included in `orderHashesInOperationsQueue`, false if not. This function should be used for determining if a Short-Term or stateful order placement should be added to the operations queue.
func (*OperationsToPropose) IsOrderRemovalInOperationsQueue ¶
func (o *OperationsToPropose) IsOrderRemovalInOperationsQueue( orderId OrderId, ) bool
IsOrderRemovalInOperationsQueue returns true if the provided order ID is included in `OrderRemovalsInOperationsQueue`, false if not.
func (*OperationsToPropose) MustAddDeleveragingToOperationsQueue ¶
func (o *OperationsToPropose) MustAddDeleveragingToOperationsQueue( liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, fills []MatchPerpetualDeleveraging_Fill, isFinalSettlement bool, )
MustAddDeleveragingToOperationsQueue adds a deleveraging match operation to the operations queue. This function will panic if:
- The number of maker fills is zero.
- The fill amount is zero for any of the maker fills.
- Maker fills contain duplicated subaccount IDs.
- Maker fills contain liquidated subaccount ID.
func (*OperationsToPropose) MustAddMatchToOperationsQueue ¶
func (o *OperationsToPropose) MustAddMatchToOperationsQueue( takerMatchableOrder MatchableOrder, makerFillsWithOrders []MakerFillWithOrder, )
MustAddMatchToOperationsQueue adds a match operation to the operations queue. This function will panic if any of the following conditions are true:
- The taker order is not a liquidation order and the number of maker fills is zero.
- The taker order hash is not present in `orderHashesInOperationsQueue`.
- There exist filled maker orders where the order hash is not present in `orderHashesInOperationsQueue`.
func (*OperationsToPropose) MustAddOrderRemovalToOperationsQueue ¶
func (o *OperationsToPropose) MustAddOrderRemovalToOperationsQueue( orderId OrderId, removalReason OrderRemoval_RemovalReason, )
MustAddOrderRemovalToOperationsQueue adds an order removal operation to the operations queue. This function will panic if given an unspecified removal reason.
func (*OperationsToPropose) MustAddShortTermOrderPlacementToOperationsQueue ¶
func (o *OperationsToPropose) MustAddShortTermOrderPlacementToOperationsQueue( order Order, )
MustAddShortTermOrderPlacementToOperationsQueue adds a Short-Term order placement operation to the operations queue. This function will panic if the order is not a Short-Term order, the order already exists in `OrderHashesInOperationsQueue`, or the order does not exist in `ShortTermOrderHashToTxBytes`.
func (*OperationsToPropose) MustAddShortTermOrderTxBytes ¶
func (o *OperationsToPropose) MustAddShortTermOrderTxBytes( order Order, txBytes []byte, )
MustAddShortTermOrderTxBytes adds the provided Short-Term order hash and TX bytes into `ShortTermOrderHashToTxBytes`. This function will panic if the provided order is not a Short-Term order or this order already exists in `ShortTermOrderHashToTxBytes`.
func (*OperationsToPropose) MustAddStatefulOrderPlacementToOperationsQueue ¶
func (o *OperationsToPropose) MustAddStatefulOrderPlacementToOperationsQueue( order Order, )
MustAddStatefulOrderPlacementToOperationsQueue adds a stateful order placement operation to the operations queue. This function will panic if this stateful order already exists in `OrderHashesInOperationsQueue`, or the provided order is not a stateful order.
func (*OperationsToPropose) RemoveShortTermOrderTxBytes ¶
func (o *OperationsToPropose) RemoveShortTermOrderTxBytes( order Order, )
RemoveShortTermOrderTxBytes removes a short term order from `ShortTermOrderHashToTxBytes`. This function will panic for any of the following: - the order is not a short term order. - the order hash is present in `OrderHashesInOperationsQueue` - the order hash is not present in `ShortTermOrderHashToTxBytes`
type Order ¶
type Order struct { // The unique ID of this order. Meant to be unique across all orders. OrderId OrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"` Side Order_Side `protobuf:"varint,2,opt,name=side,proto3,enum=klyraprotocol.clob.Order_Side" json:"side,omitempty"` // The size of this order in base quantums. Must be a multiple of // `ClobPair.StepBaseQuantums` (where `ClobPair.Id = orderId.ClobPairId`). Quantums uint64 `protobuf:"varint,3,opt,name=quantums,proto3" json:"quantums,omitempty"` // The price level that this order will be placed at on the orderbook, // in subticks. Must be a multiple of ClobPair.SubticksPerTick // (where `ClobPair.Id = orderId.ClobPairId`). Subticks uint64 `protobuf:"varint,4,opt,name=subticks,proto3" json:"subticks,omitempty"` // Information about when the order expires. // // Types that are valid to be assigned to GoodTilOneof: // // *Order_GoodTilBlock // *Order_GoodTilBlockTime GoodTilOneof isOrder_GoodTilOneof `protobuf_oneof:"good_til_oneof"` // The time in force of this order. TimeInForce Order_TimeInForce `` /* 139-byte string literal not displayed */ // Enforces that the order can only reduce the size of an existing position. // If a ReduceOnly order would change the side of the existing position, // its size is reduced to that of the remaining size of the position. // If existing orders on the book with ReduceOnly // would already close the position, the least aggressive (out-of-the-money) // ReduceOnly orders are resized and canceled first. ReduceOnly bool `protobuf:"varint,8,opt,name=reduce_only,json=reduceOnly,proto3" json:"reduce_only,omitempty"` // Set of bit flags set arbitrarily by clients and ignored by the protocol. // Used by indexer to infer information about a placed order. ClientMetadata uint32 `protobuf:"varint,9,opt,name=client_metadata,json=clientMetadata,proto3" json:"client_metadata,omitempty"` ConditionType Order_ConditionType `` /* 146-byte string literal not displayed */ // conditional_order_trigger_subticks represents the price at which this order // will be triggered. If the condition_type is CONDITION_TYPE_UNSPECIFIED, // this value is enforced to be 0. If this value is nonzero, condition_type // cannot be CONDITION_TYPE_UNSPECIFIED. Value is in subticks. // Must be a multiple of ClobPair.SubticksPerTick (where `ClobPair.Id = // orderId.ClobPairId`). ConditionalOrderTriggerSubticks uint64 `` /* 160-byte string literal not displayed */ // Router fee ppm for the order. RouterFeePpm int32 `protobuf:"varint,12,opt,name=router_fee_ppm,json=routerFeePpm,proto3" json:"router_fee_ppm,omitempty"` RouterSubaccountId *types.SubaccountId `protobuf:"bytes,13,opt,name=router_subaccount_id,json=routerSubaccountId,proto3" json:"router_subaccount_id,omitempty"` }
Order represents a single order belonging to a `Subaccount` for a particular `ClobPair`.
func (*Order) CanTrigger ¶
CanTrigger returns if a condition order is eligible to be triggered based on a given subticks value. Function will panic if order is not a conditional order.
func (*Order) Descriptor ¶
func (*Order) GetBaseQuantums ¶
func (o *Order) GetBaseQuantums() satypes.BaseQuantums
GetBaseQuantums returns the quantums of this order. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) GetBigQuantums ¶
GetBigQuantums returns the quantums of this order. The returned quantums is positive if long, negative if short, and zero if `o.Quantums == 0`. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) GetClientMetadata ¶
func (*Order) GetClobPairId ¶
func (o *Order) GetClobPairId() ClobPairId
GetClobPairId returns the CLOB pair ID of this order. This function implements the `MatchableOrder` interface.
func (*Order) GetConditionType ¶
func (m *Order) GetConditionType() Order_ConditionType
func (*Order) GetConditionalOrderTriggerSubticks ¶
func (*Order) GetGoodTilBlock ¶
func (*Order) GetGoodTilBlockTime ¶
func (*Order) GetGoodTilOneof ¶
func (m *Order) GetGoodTilOneof() isOrder_GoodTilOneof
func (*Order) GetOrderHash ¶
GetOrderHash returns the SHA256 hash of this order. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) GetOrderId ¶
func (*Order) GetOrderLabels ¶
GetOrderLabels returns the telemetry labels of this order.
func (*Order) GetOrderSubticks ¶
GetOrderSubticks returns the subticks of this order. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) GetOrderTextString ¶
GetOrderTextString returns the JSON representation of this order.
func (*Order) GetQuantums ¶
func (*Order) GetReduceOnly ¶
func (*Order) GetRouterFeePpm ¶
func (*Order) GetRouterSubaccountId ¶
func (m *Order) GetRouterSubaccountId() *types.SubaccountId
func (*Order) GetSide ¶
func (m *Order) GetSide() Order_Side
func (*Order) GetSubaccountId ¶
func (o *Order) GetSubaccountId() satypes.SubaccountId
GetSubaccountId returns the subaccount ID that placed this order. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) GetSubticks ¶
func (*Order) GetTimeInForce ¶
func (m *Order) GetTimeInForce() Order_TimeInForce
func (*Order) IsBuy ¶
IsBuy returns true if this is a buy order, false if not. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) IsConditionalOrder ¶
IsConditionalOrder returns whether this order is a conditional order.
func (*Order) IsIdenticalTo ¶
func (*Order) IsLiquidation ¶
IsLiquidation always returns false since this order is not a liquidation. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) IsReduceOnly ¶
IsReduceOnly returns whether this is a reduce-only order.
func (*Order) IsShortTermOrder ¶
IsShortTermOrder returns whether this is a Short-Term order.
func (*Order) IsStatefulOrder ¶
IsStatefulOrder returns whether this order is a stateful order, which is true for Long-Term and conditional orders and false for Short-Term orders.
func (*Order) IsStopLossOrder ¶
IsStopLossOrder returns whether this is order is a conditional stop loss order.
func (*Order) IsTakeProfitOrder ¶
IsTakeProfitOrder returns whether this is order is a conditional take profit order.
func (*Order) MustBeConditionalOrder ¶
func (o *Order) MustBeConditionalOrder()
MustBeConditionalOrder panics if the order is not a conditional order.
func (*Order) MustBeStatefulOrder ¶
func (o *Order) MustBeStatefulOrder()
MustBeStatefulOrder panics if the order is not a stateful order, else it does nothing.
func (*Order) MustBeValidOrderSide ¶
func (o *Order) MustBeValidOrderSide()
func (*Order) MustCmpReplacementOrder ¶
MustCmpReplacementOrder compares x to y and returns: 1 if x > y 0 if x = y -1 if x < y The orders are compared primarily by `GoodTilBlock` for Short-Term orders and `GoodTilBlockTime` for stateful orders. Note that this function panics if the order IDs are not equal.
func (*Order) MustGetLiquidatedPerpetualId ¶
MustGetLiquidatedPerpetualId always panics since there is no underlying perpetual ID for a `Order`. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) MustGetOrder ¶
MustGetOrder returns the underlying `Order` type. This function is necessary for the `Order` type to implement the `MatchableOrder` interface.
func (*Order) MustGetUnixGoodTilBlockTime ¶
MustGetUnixGoodTilBlockTime returns an instance of `Time` that represents the order's `GoodTilBlockTime`. This function panics when the order is a short-term order or when its `GoodTilBlockTime` is zero.
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) RequiresImmediateExecution ¶
RequiresImmediateExecution returns whether this order has to be executed immediately.
func (*Order) XXX_DiscardUnknown ¶
func (m *Order) XXX_DiscardUnknown()
func (*Order) XXX_Marshal ¶
func (*Order) XXX_OneofWrappers ¶
func (*Order) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Order) XXX_Unmarshal ¶
type OrderBatch ¶
type OrderBatch struct { // The Clob Pair ID all orders in this order batch belong to. ClobPairId uint32 `protobuf:"varint,1,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` // List of client ids in this order batch. // Note that this is serialized as a uint32 instead of a fixed32 to // avoid issues when decoding repeated packed fixed32. ClientIds []uint32 `protobuf:"varint,2,rep,packed,name=client_ids,json=clientIds,proto3" json:"client_ids,omitempty"` }
OrderBatch represents a batch of orders all belonging to a single clob pair id. Along with a subaccount id and an order flag, is used to represent a batch of orders that share the same subaccount, order flag, and clob pair id.
func (*OrderBatch) Descriptor ¶
func (*OrderBatch) Descriptor() ([]byte, []int)
func (*OrderBatch) GetClientIds ¶
func (m *OrderBatch) GetClientIds() []uint32
func (*OrderBatch) GetClobPairId ¶
func (m *OrderBatch) GetClobPairId() uint32
func (*OrderBatch) Marshal ¶
func (m *OrderBatch) Marshal() (dAtA []byte, err error)
func (*OrderBatch) MarshalToSizedBuffer ¶
func (m *OrderBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OrderBatch) ProtoMessage ¶
func (*OrderBatch) ProtoMessage()
func (*OrderBatch) Reset ¶
func (m *OrderBatch) Reset()
func (*OrderBatch) Size ¶
func (m *OrderBatch) Size() (n int)
func (*OrderBatch) String ¶
func (m *OrderBatch) String() string
func (*OrderBatch) Unmarshal ¶
func (m *OrderBatch) Unmarshal(dAtA []byte) error
func (*OrderBatch) XXX_DiscardUnknown ¶
func (m *OrderBatch) XXX_DiscardUnknown()
func (*OrderBatch) XXX_Marshal ¶
func (m *OrderBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrderBatch) XXX_Merge ¶
func (m *OrderBatch) XXX_Merge(src proto.Message)
func (*OrderBatch) XXX_Size ¶
func (m *OrderBatch) XXX_Size() int
func (*OrderBatch) XXX_Unmarshal ¶
func (m *OrderBatch) XXX_Unmarshal(b []byte) error
type OrderFillState ¶
type OrderFillState struct { // The current fillAmount of the order according to on-chain state. FillAmount uint64 `protobuf:"varint,1,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` // The block height at which the fillAmount state for this order can be // pruned. PrunableBlockHeight uint32 `protobuf:"varint,2,opt,name=prunable_block_height,json=prunableBlockHeight,proto3" json:"prunable_block_height,omitempty"` }
OrderFillState represents the fill amount of an order according to on-chain state. This proto includes both the current on-chain fill amount of the order, as well as the block at which this information can be pruned from state.
func (*OrderFillState) Descriptor ¶
func (*OrderFillState) Descriptor() ([]byte, []int)
func (*OrderFillState) GetFillAmount ¶
func (m *OrderFillState) GetFillAmount() uint64
func (*OrderFillState) GetPrunableBlockHeight ¶
func (m *OrderFillState) GetPrunableBlockHeight() uint32
func (*OrderFillState) Marshal ¶
func (m *OrderFillState) Marshal() (dAtA []byte, err error)
func (*OrderFillState) MarshalToSizedBuffer ¶
func (m *OrderFillState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OrderFillState) ProtoMessage ¶
func (*OrderFillState) ProtoMessage()
func (*OrderFillState) Reset ¶
func (m *OrderFillState) Reset()
func (*OrderFillState) Size ¶
func (m *OrderFillState) Size() (n int)
func (*OrderFillState) String ¶
func (m *OrderFillState) String() string
func (*OrderFillState) Unmarshal ¶
func (m *OrderFillState) Unmarshal(dAtA []byte) error
func (*OrderFillState) XXX_DiscardUnknown ¶
func (m *OrderFillState) XXX_DiscardUnknown()
func (*OrderFillState) XXX_Marshal ¶
func (m *OrderFillState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrderFillState) XXX_Merge ¶
func (m *OrderFillState) XXX_Merge(src proto.Message)
func (*OrderFillState) XXX_Size ¶
func (m *OrderFillState) XXX_Size() int
func (*OrderFillState) XXX_Unmarshal ¶
func (m *OrderFillState) XXX_Unmarshal(b []byte) error
type OrderHash ¶
type OrderHash [32]byte
OrderHash is used to represent the SHA256 hash of an order.
type OrderId ¶
type OrderId struct { // The subaccount ID that opened this order. // Note that this field has `gogoproto.nullable = false` so that it is // generated as a value instead of a pointer. This is because the `OrderId` // proto is used as a key within maps, and map comparisons will compare // pointers for equality (when the desired behavior is to compare the values). SubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"` // The client ID of this order, unique with respect to the specific // sub account (I.E., the same subaccount can't have two orders with // the same ClientId). ClientId uint32 `protobuf:"fixed32,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // order_flags represent order flags for the order. This field is invalid if // it's greater than 127 (larger than one byte). Each bit in the first byte // represents a different flag. Currently only two flags are supported. // // Starting from the bit after the most MSB (note that the MSB is used in // proto varint encoding, and therefore cannot be used): Bit 1 is set if this // order is a Long-Term order (0x40, or 64 as a uint8). Bit 2 is set if this // order is a Conditional order (0x20, or 32 as a uint8). // // If neither bit is set, the order is assumed to be a Short-Term order. // // If both bits are set or bits other than the 2nd and 3rd are set, the order // ID is invalid. OrderFlags uint32 `protobuf:"varint,3,opt,name=order_flags,json=orderFlags,proto3" json:"order_flags,omitempty"` // ID of the CLOB the order is created for. ClobPairId uint32 `protobuf:"varint,4,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` }
OrderId refers to a single order belonging to a Subaccount.
func (*OrderId) Descriptor ¶
func (*OrderId) GetClientId ¶
func (*OrderId) GetClobPairId ¶
func (*OrderId) GetOrderFlags ¶
func (*OrderId) GetOrderIdLabels ¶
GetOrderIdLabels returns the telemetry labels of this order ID.
func (*OrderId) GetSubaccountId ¶
func (m *OrderId) GetSubaccountId() types.SubaccountId
func (*OrderId) IsConditionalOrder ¶
IsConditionalOrder returns true if this order ID is for a conditional order, false if not (which implies the order ID is for a short-term or long-term order).
func (*OrderId) IsLongTermOrder ¶
IsLongTermOrder returns true if this order ID is for a long-term order, false if not (which implies the order ID is for a short-term or conditional order).
func (*OrderId) IsShortTermOrder ¶
IsShortTermOrder returns true if this order ID is for a short-term order, false if not (which implies the order ID is for a long-term or conditional order). Note that all short-term orders will have the `OrderFlags` field set to 0.
func (*OrderId) IsStatefulOrder ¶
IsStatefulOrder returns whether this order is a stateful order, which is true for Long-Term and conditional orders and false for Short-Term orders.
func (*OrderId) MarshalToSizedBuffer ¶
func (*OrderId) MustBeConditionalOrder ¶
func (o *OrderId) MustBeConditionalOrder()
MustBeConditionalOrder panics if the orderId is not a conditional order, else it does nothing.
func (*OrderId) MustBeShortTermOrder ¶
func (o *OrderId) MustBeShortTermOrder()
MustBeShortTermOrder panics if the orderId is not a short term order, else it does nothing.
func (*OrderId) MustBeStatefulOrder ¶
func (o *OrderId) MustBeStatefulOrder()
MustBeStatefulOrder panics if the orderId is not a stateful order, else it does nothing.
func (*OrderId) ProtoMessage ¶
func (*OrderId) ProtoMessage()
func (*OrderId) ToStateKey ¶
ToStateKey returns a bytes representation of a OrderId for use as a state key. The key uses the proto marshaling of the object such that it can be unmarshalled in the same way if it needs to be.
func (*OrderId) Validate ¶
Validate performs checks on the OrderId. It performs the following checks: - Validates subaccount id - checks OrderFlags for validity
func (*OrderId) XXX_DiscardUnknown ¶
func (m *OrderId) XXX_DiscardUnknown()
func (*OrderId) XXX_Marshal ¶
func (*OrderId) XXX_Unmarshal ¶
type OrderRemoval ¶
type OrderRemoval struct { OrderId OrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"` RemovalReason OrderRemoval_RemovalReason `` /* 152-byte string literal not displayed */ }
OrderRemoval is a request type used for forced removal of stateful orders.
func (*OrderRemoval) Descriptor ¶
func (*OrderRemoval) Descriptor() ([]byte, []int)
func (*OrderRemoval) GetOrderId ¶
func (m *OrderRemoval) GetOrderId() OrderId
func (*OrderRemoval) GetRemovalReason ¶
func (m *OrderRemoval) GetRemovalReason() OrderRemoval_RemovalReason
func (*OrderRemoval) Marshal ¶
func (m *OrderRemoval) Marshal() (dAtA []byte, err error)
func (*OrderRemoval) MarshalToSizedBuffer ¶
func (m *OrderRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OrderRemoval) ProtoMessage ¶
func (*OrderRemoval) ProtoMessage()
func (*OrderRemoval) Reset ¶
func (m *OrderRemoval) Reset()
func (*OrderRemoval) Size ¶
func (m *OrderRemoval) Size() (n int)
func (*OrderRemoval) String ¶
func (m *OrderRemoval) String() string
func (*OrderRemoval) Unmarshal ¶
func (m *OrderRemoval) Unmarshal(dAtA []byte) error
func (*OrderRemoval) XXX_DiscardUnknown ¶
func (m *OrderRemoval) XXX_DiscardUnknown()
func (*OrderRemoval) XXX_Marshal ¶
func (m *OrderRemoval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrderRemoval) XXX_Merge ¶
func (m *OrderRemoval) XXX_Merge(src proto.Message)
func (*OrderRemoval) XXX_Size ¶
func (m *OrderRemoval) XXX_Size() int
func (*OrderRemoval) XXX_Unmarshal ¶
func (m *OrderRemoval) XXX_Unmarshal(b []byte) error
type OrderRemoval_RemovalReason ¶
type OrderRemoval_RemovalReason int32
const ( // REMOVAL_REASON_UNSPECIFIED represents an unspecified removal reason. This // removal reason is used as a catchall and should never appear on an // OrderRemoval in the operations queue. OrderRemoval_REMOVAL_REASON_UNSPECIFIED OrderRemoval_RemovalReason = 0 // REMOVAL_REASON_UNDERCOLLATERALIZED represents a removal of an order which // if filled in isolation with respect to the current state of the // subaccount would leave the subaccount undercollateralized. OrderRemoval_REMOVAL_REASON_UNDERCOLLATERALIZED OrderRemoval_RemovalReason = 1 // REMOVAL_REASON_INVALID_REDUCE_ONLY represents a removal of a reduce-only // order which if filled in isolation with respect to the current state of // the subaccount would cause the subaccount's existing position to increase // or change sides. OrderRemoval_REMOVAL_REASON_INVALID_REDUCE_ONLY OrderRemoval_RemovalReason = 2 // REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER represents a removal of // a stateful post-only order that was deemed invalid because it crossed // maker orders on the book of the proposer. OrderRemoval_REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER OrderRemoval_RemovalReason = 3 // REMOVAL_REASON_INVALID_SELF_TRADE represents a removal of a stateful // order that was deemed invalid because it constituted a self trade on the // proposers orderbook. OrderRemoval_REMOVAL_REASON_INVALID_SELF_TRADE OrderRemoval_RemovalReason = 4 // REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED represents a // removal of a conditional FOK order that was deemed invalid because it // could not be completely filled. Conditional FOK orders should always be // fully-filled or removed in the block after they are triggered. OrderRemoval_REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED OrderRemoval_RemovalReason = 5 // REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK represents a removal // of a conditional IOC order. // Conditional IOC orders should always have their remaining size removed // in the block after they are triggered. OrderRemoval_REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK OrderRemoval_RemovalReason = 6 // REMOVAL_REASON_FULLY_FILLED represents a removal of an order that // was fully filled and should therefore be removed from state. OrderRemoval_REMOVAL_REASON_FULLY_FILLED OrderRemoval_RemovalReason = 7 // REMOVAL_REASON_FULLY_FILLED represents a removal of an order that // would lead to the subaccount violating isolated subaccount constraints. OrderRemoval_REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS OrderRemoval_RemovalReason = 8 )
func (OrderRemoval_RemovalReason) EnumDescriptor ¶
func (OrderRemoval_RemovalReason) EnumDescriptor() ([]byte, []int)
func (OrderRemoval_RemovalReason) String ¶
func (x OrderRemoval_RemovalReason) String() string
type OrderStatus ¶
type OrderStatus uint
OrderStatus represents the status of an order after attempting to place it on the orderbook.
const ( // Success indicates the order was successfully matched and / or added to the orderbook. Success OrderStatus = iota // Undercollateralized indicates the order failed collateralization checks while matching or // when placed on the orderbook, and was therefore canceled. Undercollateralized // InternalError indicates the order caused an internal error during collateralization checks // while matching or when placed on the orderbook, and was therefore canceled. InternalError // ImmediateOrCancelWouldRestOnBook indicates this is an IOC order that would have been placed // on the orderbook as resting liquidity, and was therefore canceled. ImmediateOrCancelWouldRestOnBook // ReduceOnlyResized indicates the reduce-only order was resized since it would have changed // the user's position side. ReduceOnlyResized // LiquidationRequiresDeleveraging indicates that there wasn't enough liquidity to liquidate // the subaccount profitably on the orderbook and the order was subsequently not fully matched // because the insurance fund did not have enough funds to cover the losses from performing // the liquidation. LiquidationRequiresDeleveraging // LiquidationExceededSubaccountMaxInsuranceLost indicates that the liquidation order could not // be matched because it exceeded the maximum funds lost for the insurance fund in this block. LiquidationExceededSubaccountMaxInsuranceLost // ViolatesIsolatedSubaccountConstraints indicates that matching the order would lead to the // subaccount violating constraints for isolated perpetuals, where the subaccount would end up // with either multiple positions in isolated perpetuals or both an isolated and a cross perpetual // position. ViolatesIsolatedSubaccountConstraints )
func (OrderStatus) IsSuccess ¶
func (os OrderStatus) IsSuccess() bool
IsSuccess returns `true` if this `OrderStatus` enum is `Success`, else returns `false`.
func (OrderStatus) String ¶
func (os OrderStatus) String() string
String returns a string representation of this `OrderStatus` enum.
type Order_ConditionType ¶
type Order_ConditionType int32
const ( // CONDITION_TYPE_UNSPECIFIED represents the default behavior where an // order will be placed immediately on the orderbook. Order_CONDITION_TYPE_UNSPECIFIED Order_ConditionType = 0 // CONDITION_TYPE_STOP_LOSS represents a stop order. A stop order will // trigger when the oracle price moves at or above the trigger price for // buys, and at or below the trigger price for sells. Order_CONDITION_TYPE_STOP_LOSS Order_ConditionType = 1 // CONDITION_TYPE_TAKE_PROFIT represents a take profit order. A take profit // order will trigger when the oracle price moves at or below the trigger // price for buys and at or above the trigger price for sells. Order_CONDITION_TYPE_TAKE_PROFIT Order_ConditionType = 2 )
func (Order_ConditionType) EnumDescriptor ¶
func (Order_ConditionType) EnumDescriptor() ([]byte, []int)
func (Order_ConditionType) String ¶
func (x Order_ConditionType) String() string
type Order_GoodTilBlock ¶
type Order_GoodTilBlock struct {
GoodTilBlock uint32 `protobuf:"varint,5,opt,name=good_til_block,json=goodTilBlock,proto3,oneof" json:"good_til_block,omitempty"`
}
func (*Order_GoodTilBlock) MarshalTo ¶
func (m *Order_GoodTilBlock) MarshalTo(dAtA []byte) (int, error)
func (*Order_GoodTilBlock) MarshalToSizedBuffer ¶
func (m *Order_GoodTilBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Order_GoodTilBlock) Size ¶
func (m *Order_GoodTilBlock) Size() (n int)
type Order_GoodTilBlockTime ¶
type Order_GoodTilBlockTime struct {
GoodTilBlockTime uint32 `protobuf:"fixed32,6,opt,name=good_til_block_time,json=goodTilBlockTime,proto3,oneof" json:"good_til_block_time,omitempty"`
}
func (*Order_GoodTilBlockTime) MarshalTo ¶
func (m *Order_GoodTilBlockTime) MarshalTo(dAtA []byte) (int, error)
func (*Order_GoodTilBlockTime) MarshalToSizedBuffer ¶
func (m *Order_GoodTilBlockTime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Order_GoodTilBlockTime) Size ¶
func (m *Order_GoodTilBlockTime) Size() (n int)
type Order_Side ¶
type Order_Side int32
Represents the side of the orderbook the order will be placed on. Note that Side.SIDE_UNSPECIFIED is an invalid order and cannot be placed on the orderbook.
const ( // Default value. This value is invalid and unused. Order_SIDE_UNSPECIFIED Order_Side = 0 // SIDE_BUY is used to represent a BUY order. Order_SIDE_BUY Order_Side = 1 // SIDE_SELL is used to represent a SELL order. Order_SIDE_SELL Order_Side = 2 )
func (Order_Side) EnumDescriptor ¶
func (Order_Side) EnumDescriptor() ([]byte, []int)
func (Order_Side) String ¶
func (x Order_Side) String() string
type Order_TimeInForce ¶
type Order_TimeInForce int32
TimeInForce indicates how long an order will remain active before it is executed or expires.
const ( // TIME_IN_FORCE_UNSPECIFIED represents the default behavior where an // order will first match with existing orders on the book, and any // remaining size will be added to the book as a maker order. Order_TIME_IN_FORCE_UNSPECIFIED Order_TimeInForce = 0 // TIME_IN_FORCE_IOC enforces that an order only be matched with // maker orders on the book. If the order has remaining size after // matching with existing orders on the book, the remaining size // is not placed on the book. Order_TIME_IN_FORCE_IOC Order_TimeInForce = 1 // TIME_IN_FORCE_POST_ONLY enforces that an order only be placed // on the book as a maker order. Note this means that validators will cancel // any newly-placed post only orders that would cross with other maker // orders. Order_TIME_IN_FORCE_POST_ONLY Order_TimeInForce = 2 // TIME_IN_FORCE_FILL_OR_KILL enforces that an order will either be filled // completely and immediately by maker orders on the book or canceled if the // entire amount can‘t be matched. Order_TIME_IN_FORCE_FILL_OR_KILL Order_TimeInForce = 3 )
func (Order_TimeInForce) EnumDescriptor ¶
func (Order_TimeInForce) EnumDescriptor() ([]byte, []int)
func (Order_TimeInForce) String ¶
func (x Order_TimeInForce) String() string
type Orderbook ¶
type Orderbook struct { // Defines the tick size of the orderbook by defining how many subticks // are in one tick. That is, the subticks of any valid order must be a // multiple of this value. Generally this value should start `>= 100` to // allow room for decreasing it. This field is stored in state as part of a // `ClobPair`, but must be made available to the in-memory `Orderbook` in // order to efficiently remove orders from the orderbook. See the `removeOrder` // implementation for more information. SubticksPerTick SubticksPerTick // Map of price level (in subticks) to buy orders contained at that level. Bids map[Subticks]*Level // Map of price level (in subticks) to sell orders contained at that level. Asks map[Subticks]*Level // The highest bid on this orderbook, in subticks. 0 if no bids exist. BestBid Subticks // The lowest ask on this orderbook, in subticks. math.MaxUint64 if no asks exist. BestAsk Subticks // Contains all open orders on this CLOB for a given subaccount and side. // Used for fetching open orders for the add to orderbook collateralization // check for a subaccount. SubaccountOpenClobOrders map[satypes.SubaccountId]map[Order_Side]map[OrderId]bool // Minimum size of an order on the CLOB, in base quantums. MinOrderBaseQuantums satypes.BaseQuantums // Contains all open reduce-only orders on this CLOB from each subaccount. Used for tracking // which open reduce-only orders should be canceled when a position changes sides. SubaccountOpenReduceOnlyOrders map[satypes.SubaccountId]map[OrderId]bool // TotalOpenOrders tracks the total number of open orders in an orderbook for observability purposes. TotalOpenOrders uint }
Orderbook holds the bids and asks for a specific product.
func (*Orderbook) GetMidPrice ¶
GetMidPrice returns the mid price of the orderbook and whether or not it exists.
type OrdersFilledDuringLatestBlock ¶
type OrdersFilledDuringLatestBlock struct { // A list of unique order_ids that were filled by any non-zero amount in the // latest block. OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"` }
OrdersFilledDuringLatestBlock represents a list of `OrderIds` that were filled by any non-zero amount in the latest block.
func (*OrdersFilledDuringLatestBlock) Descriptor ¶
func (*OrdersFilledDuringLatestBlock) Descriptor() ([]byte, []int)
func (*OrdersFilledDuringLatestBlock) GetOrderIds ¶
func (m *OrdersFilledDuringLatestBlock) GetOrderIds() []OrderId
func (*OrdersFilledDuringLatestBlock) Marshal ¶
func (m *OrdersFilledDuringLatestBlock) Marshal() (dAtA []byte, err error)
func (*OrdersFilledDuringLatestBlock) MarshalTo ¶
func (m *OrdersFilledDuringLatestBlock) MarshalTo(dAtA []byte) (int, error)
func (*OrdersFilledDuringLatestBlock) MarshalToSizedBuffer ¶
func (m *OrdersFilledDuringLatestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OrdersFilledDuringLatestBlock) ProtoMessage ¶
func (*OrdersFilledDuringLatestBlock) ProtoMessage()
func (*OrdersFilledDuringLatestBlock) Reset ¶
func (m *OrdersFilledDuringLatestBlock) Reset()
func (*OrdersFilledDuringLatestBlock) Size ¶
func (m *OrdersFilledDuringLatestBlock) Size() (n int)
func (*OrdersFilledDuringLatestBlock) String ¶
func (m *OrdersFilledDuringLatestBlock) String() string
func (*OrdersFilledDuringLatestBlock) Unmarshal ¶
func (m *OrdersFilledDuringLatestBlock) Unmarshal(dAtA []byte) error
func (*OrdersFilledDuringLatestBlock) XXX_DiscardUnknown ¶
func (m *OrdersFilledDuringLatestBlock) XXX_DiscardUnknown()
func (*OrdersFilledDuringLatestBlock) XXX_Marshal ¶
func (m *OrdersFilledDuringLatestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrdersFilledDuringLatestBlock) XXX_Merge ¶
func (m *OrdersFilledDuringLatestBlock) XXX_Merge(src proto.Message)
func (*OrdersFilledDuringLatestBlock) XXX_Size ¶
func (m *OrdersFilledDuringLatestBlock) XXX_Size() int
func (*OrdersFilledDuringLatestBlock) XXX_Unmarshal ¶
func (m *OrdersFilledDuringLatestBlock) XXX_Unmarshal(b []byte) error
type PendingOpenOrder ¶
type PendingOpenOrder struct { // The amount of base quantums that is remaining for this order. RemainingQuantums satypes.BaseQuantums // True if this is a buy order, false if it's a sell order. IsBuy bool // The price that this order would be matched at. Subticks Subticks // The ID of the CLOB this order would be placed on. ClobPairId ClobPairId }
PendingOpenOrder is a utility struct used for representing an order a subaccount will open. This is used for collateralization checks, to specifically verify that the number of quantums in this order can be opened for this subaccount. Only used for representing maker orders in add-to-orderbook collat check. TODO(CLOB-849) Remove this struct.
type PendingUpdates ¶
type PendingUpdates struct {
// contains filtered or unexported fields
}
pendingUpdates is a utility struct used for storing the working updates to all Subaccounts.
func NewPendingUpdates ¶
func NewPendingUpdates() *PendingUpdates
newPendingUpdates returns a new `pendingUpdates`.
func (*PendingUpdates) AddPerpetualFill ¶
func (p *PendingUpdates) AddPerpetualFill( subaccountId satypes.SubaccountId, perpetualId uint32, isBuy bool, feePpm int32, bigFillBaseQuantums *big.Int, bigFillQuoteQuantums *big.Int, )
AddPerpetualFill adds a new fill to the PendingUpdate object, by updating quoteBalanceDelta, perpetualUpdate and fees paid or received by a subaccount.
func (*PendingUpdates) ConvertToUpdates ¶
func (p *PendingUpdates) ConvertToUpdates() []satypes.Update
ConvertToUpdates converts a `pendingUpdates` struct to a slice of Subaccount Updates.
type PerpetualClobMetadata ¶
type PerpetualClobMetadata struct { // Id of the Perpetual the CLOB allows trading of. PerpetualId uint32 `protobuf:"varint,1,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` }
PerpetualClobMetadata contains metadata for a `ClobPair` representing a Perpetual product.
func (*PerpetualClobMetadata) Descriptor ¶
func (*PerpetualClobMetadata) Descriptor() ([]byte, []int)
func (*PerpetualClobMetadata) GetPerpetualId ¶
func (m *PerpetualClobMetadata) GetPerpetualId() uint32
func (*PerpetualClobMetadata) Marshal ¶
func (m *PerpetualClobMetadata) Marshal() (dAtA []byte, err error)
func (*PerpetualClobMetadata) MarshalTo ¶
func (m *PerpetualClobMetadata) MarshalTo(dAtA []byte) (int, error)
func (*PerpetualClobMetadata) MarshalToSizedBuffer ¶
func (m *PerpetualClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PerpetualClobMetadata) ProtoMessage ¶
func (*PerpetualClobMetadata) ProtoMessage()
func (*PerpetualClobMetadata) Reset ¶
func (m *PerpetualClobMetadata) Reset()
func (*PerpetualClobMetadata) Size ¶
func (m *PerpetualClobMetadata) Size() (n int)
func (*PerpetualClobMetadata) String ¶
func (m *PerpetualClobMetadata) String() string
func (*PerpetualClobMetadata) Unmarshal ¶
func (m *PerpetualClobMetadata) Unmarshal(dAtA []byte) error
func (*PerpetualClobMetadata) XXX_DiscardUnknown ¶
func (m *PerpetualClobMetadata) XXX_DiscardUnknown()
func (*PerpetualClobMetadata) XXX_Marshal ¶
func (m *PerpetualClobMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PerpetualClobMetadata) XXX_Merge ¶
func (m *PerpetualClobMetadata) XXX_Merge(src proto.Message)
func (*PerpetualClobMetadata) XXX_Size ¶
func (m *PerpetualClobMetadata) XXX_Size() int
func (*PerpetualClobMetadata) XXX_Unmarshal ¶
func (m *PerpetualClobMetadata) XXX_Unmarshal(b []byte) error
type PerpetualLiquidationInfo ¶
type PerpetualLiquidationInfo struct { // The id of the subaccount that got liquidated/deleveraged or was deleveraged // onto. SubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"` // The id of the perpetual involved. PerpetualId uint32 `protobuf:"varint,2,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` }
PerpetualLiquidationInfo holds information about a liquidation that occurred for a position held by a subaccount. Note this proto is defined to make it easier to hash the metadata of a liquidation, and is never written to state.
func (*PerpetualLiquidationInfo) Descriptor ¶
func (*PerpetualLiquidationInfo) Descriptor() ([]byte, []int)
func (*PerpetualLiquidationInfo) GetPerpetualId ¶
func (m *PerpetualLiquidationInfo) GetPerpetualId() uint32
func (*PerpetualLiquidationInfo) GetSubaccountId ¶
func (m *PerpetualLiquidationInfo) GetSubaccountId() types.SubaccountId
func (*PerpetualLiquidationInfo) Marshal ¶
func (m *PerpetualLiquidationInfo) Marshal() (dAtA []byte, err error)
func (*PerpetualLiquidationInfo) MarshalTo ¶
func (m *PerpetualLiquidationInfo) MarshalTo(dAtA []byte) (int, error)
func (*PerpetualLiquidationInfo) MarshalToSizedBuffer ¶
func (m *PerpetualLiquidationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PerpetualLiquidationInfo) ProtoMessage ¶
func (*PerpetualLiquidationInfo) ProtoMessage()
func (*PerpetualLiquidationInfo) Reset ¶
func (m *PerpetualLiquidationInfo) Reset()
func (*PerpetualLiquidationInfo) Size ¶
func (m *PerpetualLiquidationInfo) Size() (n int)
func (*PerpetualLiquidationInfo) String ¶
func (m *PerpetualLiquidationInfo) String() string
func (*PerpetualLiquidationInfo) Unmarshal ¶
func (m *PerpetualLiquidationInfo) Unmarshal(dAtA []byte) error
func (*PerpetualLiquidationInfo) XXX_DiscardUnknown ¶
func (m *PerpetualLiquidationInfo) XXX_DiscardUnknown()
func (*PerpetualLiquidationInfo) XXX_Marshal ¶
func (m *PerpetualLiquidationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PerpetualLiquidationInfo) XXX_Merge ¶
func (m *PerpetualLiquidationInfo) XXX_Merge(src proto.Message)
func (*PerpetualLiquidationInfo) XXX_Size ¶
func (m *PerpetualLiquidationInfo) XXX_Size() int
func (*PerpetualLiquidationInfo) XXX_Unmarshal ¶
func (m *PerpetualLiquidationInfo) XXX_Unmarshal(b []byte) error
type PerpetualsKeeper ¶
type PerpetualsKeeper interface { GetNetNotional( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigNetNotionalQuoteQuantums *big.Int, err error, ) GetNotionalInBaseQuantums( ctx sdk.Context, id uint32, bigQuoteQuantums *big.Int, ) ( bigBaseQuantums *big.Int, err error, ) GetNetCollateral( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigNetCollateralQuoteQuantums *big.Int, err error, ) GetMarginRequirements( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigInitialMarginQuoteQuantums *big.Int, bigMaintenanceMarginQuoteQuantums *big.Int, err error, ) GetPerpetual( ctx sdk.Context, id uint32, ) (val perpetualsmoduletypes.Perpetual, err error) GetAllPerpetuals(ctx sdk.Context) (list []perpetualsmoduletypes.Perpetual) GetAllLiquidityTiers(ctx sdk.Context) (list []perpetualsmoduletypes.LiquidityTier) IsIsolatedPerpetual(ctx sdk.Context, perpetualId uint32) (bool, error) GetPerpetualAndMarketPrice( ctx sdk.Context, perpetualId uint32, ) (perpetualsmoduletypes.Perpetual, pricestypes.MarketPrice, error) GetSettlementPpm( ctx sdk.Context, perpetualId uint32, quantums *big.Int, index *big.Int, ) ( bigNetSettlement *big.Int, newFundingIndex *big.Int, err error, ) MaybeProcessNewFundingTickEpoch(ctx sdk.Context) GetInsuranceFundModuleAddress(ctx sdk.Context, perpetualId uint32) (sdk.AccAddress, error) GetInsuranceFundName(ctx sdk.Context, perpetualId uint32) (string, error) }
type PotentiallyPrunableOrders ¶
type PotentiallyPrunableOrders struct { // A list of unique order_ids that may potentially be pruned from state at a // future block height. OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"` }
PotentiallyPrunableOrders represents a list of orders that may be prunable from state at a future block height.
func (*PotentiallyPrunableOrders) Descriptor ¶
func (*PotentiallyPrunableOrders) Descriptor() ([]byte, []int)
func (*PotentiallyPrunableOrders) GetOrderIds ¶
func (m *PotentiallyPrunableOrders) GetOrderIds() []OrderId
func (*PotentiallyPrunableOrders) Marshal ¶
func (m *PotentiallyPrunableOrders) Marshal() (dAtA []byte, err error)
func (*PotentiallyPrunableOrders) MarshalTo ¶
func (m *PotentiallyPrunableOrders) MarshalTo(dAtA []byte) (int, error)
func (*PotentiallyPrunableOrders) MarshalToSizedBuffer ¶
func (m *PotentiallyPrunableOrders) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PotentiallyPrunableOrders) ProtoMessage ¶
func (*PotentiallyPrunableOrders) ProtoMessage()
func (*PotentiallyPrunableOrders) Reset ¶
func (m *PotentiallyPrunableOrders) Reset()
func (*PotentiallyPrunableOrders) Size ¶
func (m *PotentiallyPrunableOrders) Size() (n int)
func (*PotentiallyPrunableOrders) String ¶
func (m *PotentiallyPrunableOrders) String() string
func (*PotentiallyPrunableOrders) Unmarshal ¶
func (m *PotentiallyPrunableOrders) Unmarshal(dAtA []byte) error
func (*PotentiallyPrunableOrders) XXX_DiscardUnknown ¶
func (m *PotentiallyPrunableOrders) XXX_DiscardUnknown()
func (*PotentiallyPrunableOrders) XXX_Marshal ¶
func (m *PotentiallyPrunableOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PotentiallyPrunableOrders) XXX_Merge ¶
func (m *PotentiallyPrunableOrders) XXX_Merge(src proto.Message)
func (*PotentiallyPrunableOrders) XXX_Size ¶
func (m *PotentiallyPrunableOrders) XXX_Size() int
func (*PotentiallyPrunableOrders) XXX_Unmarshal ¶
func (m *PotentiallyPrunableOrders) XXX_Unmarshal(b []byte) error
type PricesKeeper ¶
type PricesKeeper interface { GetMarketParam(ctx sdk.Context, id uint32) (param pricestypes.MarketParam, exists bool) GetAllMarketPrices(ctx sdk.Context) []pricestypes.MarketPrice GetMarketPrice(ctx sdk.Context, id uint32) (pricestypes.MarketPrice, error) }
type ProcessProposerMatchesEvents ¶
type ProcessProposerMatchesEvents struct { PlacedLongTermOrderIds []OrderId `protobuf:"bytes,1,rep,name=placed_long_term_order_ids,json=placedLongTermOrderIds,proto3" json:"placed_long_term_order_ids"` ExpiredStatefulOrderIds []OrderId `protobuf:"bytes,2,rep,name=expired_stateful_order_ids,json=expiredStatefulOrderIds,proto3" json:"expired_stateful_order_ids"` OrderIdsFilledInLastBlock []OrderId `` /* 134-byte string literal not displayed */ PlacedStatefulCancellationOrderIds []OrderId `` /* 159-byte string literal not displayed */ RemovedStatefulOrderIds []OrderId `protobuf:"bytes,5,rep,name=removed_stateful_order_ids,json=removedStatefulOrderIds,proto3" json:"removed_stateful_order_ids"` ConditionalOrderIdsTriggeredInLastBlock []OrderId `` /* 178-byte string literal not displayed */ PlacedConditionalOrderIds []OrderId `` /* 130-byte string literal not displayed */ BlockHeight uint32 `protobuf:"varint,8,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` }
ProcessProposerMatchesEvents is used for communicating which events occurred in the last block that require updating the state of the memclob in the Commit blocker. It contains information about the following state updates: - Long term order IDs that were placed in the last block. - Stateful order IDs that were expired in the last block. - Order IDs that were filled in the last block. - Stateful cancellations order IDs that were placed in the last block. - Stateful order IDs forcefully removed in the last block. - Conditional order IDs triggered in the last block. - Conditional order IDs placed, but not triggered in the last block. - The height of the block in which the events occurred.
func (*ProcessProposerMatchesEvents) Descriptor ¶
func (*ProcessProposerMatchesEvents) Descriptor() ([]byte, []int)
func (*ProcessProposerMatchesEvents) GetBlockHeight ¶
func (m *ProcessProposerMatchesEvents) GetBlockHeight() uint32
func (*ProcessProposerMatchesEvents) GetConditionalOrderIdsTriggeredInLastBlock ¶
func (m *ProcessProposerMatchesEvents) GetConditionalOrderIdsTriggeredInLastBlock() []OrderId
func (*ProcessProposerMatchesEvents) GetExpiredStatefulOrderIds ¶
func (m *ProcessProposerMatchesEvents) GetExpiredStatefulOrderIds() []OrderId
func (*ProcessProposerMatchesEvents) GetOrderIdsFilledInLastBlock ¶
func (m *ProcessProposerMatchesEvents) GetOrderIdsFilledInLastBlock() []OrderId
func (*ProcessProposerMatchesEvents) GetPlacedConditionalOrderIds ¶
func (m *ProcessProposerMatchesEvents) GetPlacedConditionalOrderIds() []OrderId
func (*ProcessProposerMatchesEvents) GetPlacedLongTermOrderIds ¶
func (m *ProcessProposerMatchesEvents) GetPlacedLongTermOrderIds() []OrderId
func (*ProcessProposerMatchesEvents) GetPlacedStatefulCancellationOrderIds ¶
func (m *ProcessProposerMatchesEvents) GetPlacedStatefulCancellationOrderIds() []OrderId
func (*ProcessProposerMatchesEvents) GetRemovedStatefulOrderIds ¶
func (m *ProcessProposerMatchesEvents) GetRemovedStatefulOrderIds() []OrderId
func (*ProcessProposerMatchesEvents) Marshal ¶
func (m *ProcessProposerMatchesEvents) Marshal() (dAtA []byte, err error)
func (*ProcessProposerMatchesEvents) MarshalTo ¶
func (m *ProcessProposerMatchesEvents) MarshalTo(dAtA []byte) (int, error)
func (*ProcessProposerMatchesEvents) MarshalToSizedBuffer ¶
func (m *ProcessProposerMatchesEvents) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProcessProposerMatchesEvents) ProtoMessage ¶
func (*ProcessProposerMatchesEvents) ProtoMessage()
func (*ProcessProposerMatchesEvents) Reset ¶
func (m *ProcessProposerMatchesEvents) Reset()
func (*ProcessProposerMatchesEvents) Size ¶
func (m *ProcessProposerMatchesEvents) Size() (n int)
func (*ProcessProposerMatchesEvents) String ¶
func (m *ProcessProposerMatchesEvents) String() string
func (*ProcessProposerMatchesEvents) Unmarshal ¶
func (m *ProcessProposerMatchesEvents) Unmarshal(dAtA []byte) error
func (*ProcessProposerMatchesEvents) ValidateProcessProposerMatchesEvents ¶
func (ppme *ProcessProposerMatchesEvents) ValidateProcessProposerMatchesEvents( ctx sdk.Context, ) error
ValidateProcessProposerMatchesEvents performs basic stateless validation on ProcessProposerMatchesEvents. It returns an error if:
- Block height does not equal current block height.
- Any of the fields have duplicate OrderIds. Note that this is currently invalid since stateful order replacements are not enabled.
func (*ProcessProposerMatchesEvents) XXX_DiscardUnknown ¶
func (m *ProcessProposerMatchesEvents) XXX_DiscardUnknown()
func (*ProcessProposerMatchesEvents) XXX_Marshal ¶
func (m *ProcessProposerMatchesEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProcessProposerMatchesEvents) XXX_Merge ¶
func (m *ProcessProposerMatchesEvents) XXX_Merge(src proto.Message)
func (*ProcessProposerMatchesEvents) XXX_Size ¶
func (m *ProcessProposerMatchesEvents) XXX_Size() int
func (*ProcessProposerMatchesEvents) XXX_Unmarshal ¶
func (m *ProcessProposerMatchesEvents) XXX_Unmarshal(b []byte) error
type QueryAllClobPairRequest ¶
type QueryAllClobPairRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryAllClobPairRequest is request type for the ClobPairAll method.
func (*QueryAllClobPairRequest) Descriptor ¶
func (*QueryAllClobPairRequest) Descriptor() ([]byte, []int)
func (*QueryAllClobPairRequest) GetPagination ¶
func (m *QueryAllClobPairRequest) GetPagination() *query.PageRequest
func (*QueryAllClobPairRequest) Marshal ¶
func (m *QueryAllClobPairRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllClobPairRequest) MarshalTo ¶
func (m *QueryAllClobPairRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllClobPairRequest) MarshalToSizedBuffer ¶
func (m *QueryAllClobPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllClobPairRequest) ProtoMessage ¶
func (*QueryAllClobPairRequest) ProtoMessage()
func (*QueryAllClobPairRequest) Reset ¶
func (m *QueryAllClobPairRequest) Reset()
func (*QueryAllClobPairRequest) Size ¶
func (m *QueryAllClobPairRequest) Size() (n int)
func (*QueryAllClobPairRequest) String ¶
func (m *QueryAllClobPairRequest) String() string
func (*QueryAllClobPairRequest) Unmarshal ¶
func (m *QueryAllClobPairRequest) Unmarshal(dAtA []byte) error
func (*QueryAllClobPairRequest) XXX_DiscardUnknown ¶
func (m *QueryAllClobPairRequest) XXX_DiscardUnknown()
func (*QueryAllClobPairRequest) XXX_Marshal ¶
func (m *QueryAllClobPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllClobPairRequest) XXX_Merge ¶
func (m *QueryAllClobPairRequest) XXX_Merge(src proto.Message)
func (*QueryAllClobPairRequest) XXX_Size ¶
func (m *QueryAllClobPairRequest) XXX_Size() int
func (*QueryAllClobPairRequest) XXX_Unmarshal ¶
func (m *QueryAllClobPairRequest) XXX_Unmarshal(b []byte) error
type QueryBlockRateLimitConfigurationRequest ¶
type QueryBlockRateLimitConfigurationRequest struct { }
QueryBlockRateLimitConfigurationRequest is a request message for BlockRateLimitConfiguration.
func (*QueryBlockRateLimitConfigurationRequest) Descriptor ¶
func (*QueryBlockRateLimitConfigurationRequest) Descriptor() ([]byte, []int)
func (*QueryBlockRateLimitConfigurationRequest) Marshal ¶
func (m *QueryBlockRateLimitConfigurationRequest) Marshal() (dAtA []byte, err error)
func (*QueryBlockRateLimitConfigurationRequest) MarshalTo ¶
func (m *QueryBlockRateLimitConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBlockRateLimitConfigurationRequest) MarshalToSizedBuffer ¶
func (m *QueryBlockRateLimitConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBlockRateLimitConfigurationRequest) ProtoMessage ¶
func (*QueryBlockRateLimitConfigurationRequest) ProtoMessage()
func (*QueryBlockRateLimitConfigurationRequest) Reset ¶
func (m *QueryBlockRateLimitConfigurationRequest) Reset()
func (*QueryBlockRateLimitConfigurationRequest) Size ¶
func (m *QueryBlockRateLimitConfigurationRequest) Size() (n int)
func (*QueryBlockRateLimitConfigurationRequest) String ¶
func (m *QueryBlockRateLimitConfigurationRequest) String() string
func (*QueryBlockRateLimitConfigurationRequest) Unmarshal ¶
func (m *QueryBlockRateLimitConfigurationRequest) Unmarshal(dAtA []byte) error
func (*QueryBlockRateLimitConfigurationRequest) XXX_DiscardUnknown ¶
func (m *QueryBlockRateLimitConfigurationRequest) XXX_DiscardUnknown()
func (*QueryBlockRateLimitConfigurationRequest) XXX_Marshal ¶
func (m *QueryBlockRateLimitConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBlockRateLimitConfigurationRequest) XXX_Merge ¶
func (m *QueryBlockRateLimitConfigurationRequest) XXX_Merge(src proto.Message)
func (*QueryBlockRateLimitConfigurationRequest) XXX_Size ¶
func (m *QueryBlockRateLimitConfigurationRequest) XXX_Size() int
func (*QueryBlockRateLimitConfigurationRequest) XXX_Unmarshal ¶
func (m *QueryBlockRateLimitConfigurationRequest) XXX_Unmarshal(b []byte) error
type QueryBlockRateLimitConfigurationResponse ¶
type QueryBlockRateLimitConfigurationResponse struct {
BlockRateLimitConfig BlockRateLimitConfiguration `protobuf:"bytes,1,opt,name=block_rate_limit_config,json=blockRateLimitConfig,proto3" json:"block_rate_limit_config"`
}
QueryBlockRateLimitConfigurationResponse is a response message that contains the BlockRateLimitConfiguration.
func (*QueryBlockRateLimitConfigurationResponse) Descriptor ¶
func (*QueryBlockRateLimitConfigurationResponse) Descriptor() ([]byte, []int)
func (*QueryBlockRateLimitConfigurationResponse) GetBlockRateLimitConfig ¶
func (m *QueryBlockRateLimitConfigurationResponse) GetBlockRateLimitConfig() BlockRateLimitConfiguration
func (*QueryBlockRateLimitConfigurationResponse) Marshal ¶
func (m *QueryBlockRateLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
func (*QueryBlockRateLimitConfigurationResponse) MarshalTo ¶
func (m *QueryBlockRateLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBlockRateLimitConfigurationResponse) MarshalToSizedBuffer ¶
func (m *QueryBlockRateLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBlockRateLimitConfigurationResponse) ProtoMessage ¶
func (*QueryBlockRateLimitConfigurationResponse) ProtoMessage()
func (*QueryBlockRateLimitConfigurationResponse) Reset ¶
func (m *QueryBlockRateLimitConfigurationResponse) Reset()
func (*QueryBlockRateLimitConfigurationResponse) Size ¶
func (m *QueryBlockRateLimitConfigurationResponse) Size() (n int)
func (*QueryBlockRateLimitConfigurationResponse) String ¶
func (m *QueryBlockRateLimitConfigurationResponse) String() string
func (*QueryBlockRateLimitConfigurationResponse) Unmarshal ¶
func (m *QueryBlockRateLimitConfigurationResponse) Unmarshal(dAtA []byte) error
func (*QueryBlockRateLimitConfigurationResponse) XXX_DiscardUnknown ¶
func (m *QueryBlockRateLimitConfigurationResponse) XXX_DiscardUnknown()
func (*QueryBlockRateLimitConfigurationResponse) XXX_Marshal ¶
func (m *QueryBlockRateLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBlockRateLimitConfigurationResponse) XXX_Merge ¶
func (m *QueryBlockRateLimitConfigurationResponse) XXX_Merge(src proto.Message)
func (*QueryBlockRateLimitConfigurationResponse) XXX_Size ¶
func (m *QueryBlockRateLimitConfigurationResponse) XXX_Size() int
func (*QueryBlockRateLimitConfigurationResponse) XXX_Unmarshal ¶
func (m *QueryBlockRateLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Queries a ClobPair by id. ClobPair(ctx context.Context, in *QueryGetClobPairRequest, opts ...grpc.CallOption) (*QueryClobPairResponse, error) // Queries a list of ClobPair items. ClobPairAll(ctx context.Context, in *QueryAllClobPairRequest, opts ...grpc.CallOption) (*QueryClobPairAllResponse, error) // Runs the MEV node <> node calculation with the provided parameters. MevNodeToNodeCalculation(ctx context.Context, in *MevNodeToNodeCalculationRequest, opts ...grpc.CallOption) (*MevNodeToNodeCalculationResponse, error) // Queries EquityTierLimitConfiguration. EquityTierLimitConfiguration(ctx context.Context, in *QueryEquityTierLimitConfigurationRequest, opts ...grpc.CallOption) (*QueryEquityTierLimitConfigurationResponse, error) // Queries BlockRateLimitConfiguration. BlockRateLimitConfiguration(ctx context.Context, in *QueryBlockRateLimitConfigurationRequest, opts ...grpc.CallOption) (*QueryBlockRateLimitConfigurationResponse, error) // Queries LiquidationsConfiguration. LiquidationsConfiguration(ctx context.Context, in *QueryLiquidationsConfigurationRequest, opts ...grpc.CallOption) (*QueryLiquidationsConfigurationResponse, error) // Streams orderbook updates. StreamOrderbookUpdates(ctx context.Context, in *StreamOrderbookUpdatesRequest, opts ...grpc.CallOption) (Query_StreamOrderbookUpdatesClient, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryClobPairAllResponse ¶
type QueryClobPairAllResponse struct { ClobPair []ClobPair `protobuf:"bytes,1,rep,name=clob_pair,json=clobPair,proto3" json:"clob_pair"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryClobPairAllResponse is response type for the ClobPairAll method.
func (*QueryClobPairAllResponse) Descriptor ¶
func (*QueryClobPairAllResponse) Descriptor() ([]byte, []int)
func (*QueryClobPairAllResponse) GetClobPair ¶
func (m *QueryClobPairAllResponse) GetClobPair() []ClobPair
func (*QueryClobPairAllResponse) GetPagination ¶
func (m *QueryClobPairAllResponse) GetPagination() *query.PageResponse
func (*QueryClobPairAllResponse) Marshal ¶
func (m *QueryClobPairAllResponse) Marshal() (dAtA []byte, err error)
func (*QueryClobPairAllResponse) MarshalTo ¶
func (m *QueryClobPairAllResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryClobPairAllResponse) MarshalToSizedBuffer ¶
func (m *QueryClobPairAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClobPairAllResponse) ProtoMessage ¶
func (*QueryClobPairAllResponse) ProtoMessage()
func (*QueryClobPairAllResponse) Reset ¶
func (m *QueryClobPairAllResponse) Reset()
func (*QueryClobPairAllResponse) Size ¶
func (m *QueryClobPairAllResponse) Size() (n int)
func (*QueryClobPairAllResponse) String ¶
func (m *QueryClobPairAllResponse) String() string
func (*QueryClobPairAllResponse) Unmarshal ¶
func (m *QueryClobPairAllResponse) Unmarshal(dAtA []byte) error
func (*QueryClobPairAllResponse) XXX_DiscardUnknown ¶
func (m *QueryClobPairAllResponse) XXX_DiscardUnknown()
func (*QueryClobPairAllResponse) XXX_Marshal ¶
func (m *QueryClobPairAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClobPairAllResponse) XXX_Merge ¶
func (m *QueryClobPairAllResponse) XXX_Merge(src proto.Message)
func (*QueryClobPairAllResponse) XXX_Size ¶
func (m *QueryClobPairAllResponse) XXX_Size() int
func (*QueryClobPairAllResponse) XXX_Unmarshal ¶
func (m *QueryClobPairAllResponse) XXX_Unmarshal(b []byte) error
type QueryClobPairResponse ¶
type QueryClobPairResponse struct {
ClobPair ClobPair `protobuf:"bytes,1,opt,name=clob_pair,json=clobPair,proto3" json:"clob_pair"`
}
QueryClobPairResponse is response type for the ClobPair method.
func (*QueryClobPairResponse) Descriptor ¶
func (*QueryClobPairResponse) Descriptor() ([]byte, []int)
func (*QueryClobPairResponse) GetClobPair ¶
func (m *QueryClobPairResponse) GetClobPair() ClobPair
func (*QueryClobPairResponse) Marshal ¶
func (m *QueryClobPairResponse) Marshal() (dAtA []byte, err error)
func (*QueryClobPairResponse) MarshalTo ¶
func (m *QueryClobPairResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryClobPairResponse) MarshalToSizedBuffer ¶
func (m *QueryClobPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClobPairResponse) ProtoMessage ¶
func (*QueryClobPairResponse) ProtoMessage()
func (*QueryClobPairResponse) Reset ¶
func (m *QueryClobPairResponse) Reset()
func (*QueryClobPairResponse) Size ¶
func (m *QueryClobPairResponse) Size() (n int)
func (*QueryClobPairResponse) String ¶
func (m *QueryClobPairResponse) String() string
func (*QueryClobPairResponse) Unmarshal ¶
func (m *QueryClobPairResponse) Unmarshal(dAtA []byte) error
func (*QueryClobPairResponse) XXX_DiscardUnknown ¶
func (m *QueryClobPairResponse) XXX_DiscardUnknown()
func (*QueryClobPairResponse) XXX_Marshal ¶
func (m *QueryClobPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClobPairResponse) XXX_Merge ¶
func (m *QueryClobPairResponse) XXX_Merge(src proto.Message)
func (*QueryClobPairResponse) XXX_Size ¶
func (m *QueryClobPairResponse) XXX_Size() int
func (*QueryClobPairResponse) XXX_Unmarshal ¶
func (m *QueryClobPairResponse) XXX_Unmarshal(b []byte) error
type QueryEquityTierLimitConfigurationRequest ¶
type QueryEquityTierLimitConfigurationRequest struct { }
QueryEquityTierLimitConfigurationRequest is a request message for EquityTierLimitConfiguration.
func (*QueryEquityTierLimitConfigurationRequest) Descriptor ¶
func (*QueryEquityTierLimitConfigurationRequest) Descriptor() ([]byte, []int)
func (*QueryEquityTierLimitConfigurationRequest) Marshal ¶
func (m *QueryEquityTierLimitConfigurationRequest) Marshal() (dAtA []byte, err error)
func (*QueryEquityTierLimitConfigurationRequest) MarshalTo ¶
func (m *QueryEquityTierLimitConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEquityTierLimitConfigurationRequest) MarshalToSizedBuffer ¶
func (m *QueryEquityTierLimitConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEquityTierLimitConfigurationRequest) ProtoMessage ¶
func (*QueryEquityTierLimitConfigurationRequest) ProtoMessage()
func (*QueryEquityTierLimitConfigurationRequest) Reset ¶
func (m *QueryEquityTierLimitConfigurationRequest) Reset()
func (*QueryEquityTierLimitConfigurationRequest) Size ¶
func (m *QueryEquityTierLimitConfigurationRequest) Size() (n int)
func (*QueryEquityTierLimitConfigurationRequest) String ¶
func (m *QueryEquityTierLimitConfigurationRequest) String() string
func (*QueryEquityTierLimitConfigurationRequest) Unmarshal ¶
func (m *QueryEquityTierLimitConfigurationRequest) Unmarshal(dAtA []byte) error
func (*QueryEquityTierLimitConfigurationRequest) XXX_DiscardUnknown ¶
func (m *QueryEquityTierLimitConfigurationRequest) XXX_DiscardUnknown()
func (*QueryEquityTierLimitConfigurationRequest) XXX_Marshal ¶
func (m *QueryEquityTierLimitConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEquityTierLimitConfigurationRequest) XXX_Merge ¶
func (m *QueryEquityTierLimitConfigurationRequest) XXX_Merge(src proto.Message)
func (*QueryEquityTierLimitConfigurationRequest) XXX_Size ¶
func (m *QueryEquityTierLimitConfigurationRequest) XXX_Size() int
func (*QueryEquityTierLimitConfigurationRequest) XXX_Unmarshal ¶
func (m *QueryEquityTierLimitConfigurationRequest) XXX_Unmarshal(b []byte) error
type QueryEquityTierLimitConfigurationResponse ¶
type QueryEquityTierLimitConfigurationResponse struct {
EquityTierLimitConfig EquityTierLimitConfiguration `protobuf:"bytes,1,opt,name=equity_tier_limit_config,json=equityTierLimitConfig,proto3" json:"equity_tier_limit_config"`
}
QueryEquityTierLimitConfigurationResponse is a response message that contains the EquityTierLimitConfiguration.
func (*QueryEquityTierLimitConfigurationResponse) Descriptor ¶
func (*QueryEquityTierLimitConfigurationResponse) Descriptor() ([]byte, []int)
func (*QueryEquityTierLimitConfigurationResponse) GetEquityTierLimitConfig ¶
func (m *QueryEquityTierLimitConfigurationResponse) GetEquityTierLimitConfig() EquityTierLimitConfiguration
func (*QueryEquityTierLimitConfigurationResponse) Marshal ¶
func (m *QueryEquityTierLimitConfigurationResponse) Marshal() (dAtA []byte, err error)
func (*QueryEquityTierLimitConfigurationResponse) MarshalTo ¶
func (m *QueryEquityTierLimitConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEquityTierLimitConfigurationResponse) MarshalToSizedBuffer ¶
func (m *QueryEquityTierLimitConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEquityTierLimitConfigurationResponse) ProtoMessage ¶
func (*QueryEquityTierLimitConfigurationResponse) ProtoMessage()
func (*QueryEquityTierLimitConfigurationResponse) Reset ¶
func (m *QueryEquityTierLimitConfigurationResponse) Reset()
func (*QueryEquityTierLimitConfigurationResponse) Size ¶
func (m *QueryEquityTierLimitConfigurationResponse) Size() (n int)
func (*QueryEquityTierLimitConfigurationResponse) String ¶
func (m *QueryEquityTierLimitConfigurationResponse) String() string
func (*QueryEquityTierLimitConfigurationResponse) Unmarshal ¶
func (m *QueryEquityTierLimitConfigurationResponse) Unmarshal(dAtA []byte) error
func (*QueryEquityTierLimitConfigurationResponse) XXX_DiscardUnknown ¶
func (m *QueryEquityTierLimitConfigurationResponse) XXX_DiscardUnknown()
func (*QueryEquityTierLimitConfigurationResponse) XXX_Marshal ¶
func (m *QueryEquityTierLimitConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEquityTierLimitConfigurationResponse) XXX_Merge ¶
func (m *QueryEquityTierLimitConfigurationResponse) XXX_Merge(src proto.Message)
func (*QueryEquityTierLimitConfigurationResponse) XXX_Size ¶
func (m *QueryEquityTierLimitConfigurationResponse) XXX_Size() int
func (*QueryEquityTierLimitConfigurationResponse) XXX_Unmarshal ¶
func (m *QueryEquityTierLimitConfigurationResponse) XXX_Unmarshal(b []byte) error
type QueryGetClobPairRequest ¶
type QueryGetClobPairRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
QueryGetClobPairRequest is request type for the ClobPair method.
func (*QueryGetClobPairRequest) Descriptor ¶
func (*QueryGetClobPairRequest) Descriptor() ([]byte, []int)
func (*QueryGetClobPairRequest) GetId ¶
func (m *QueryGetClobPairRequest) GetId() uint32
func (*QueryGetClobPairRequest) Marshal ¶
func (m *QueryGetClobPairRequest) Marshal() (dAtA []byte, err error)
func (*QueryGetClobPairRequest) MarshalTo ¶
func (m *QueryGetClobPairRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetClobPairRequest) MarshalToSizedBuffer ¶
func (m *QueryGetClobPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetClobPairRequest) ProtoMessage ¶
func (*QueryGetClobPairRequest) ProtoMessage()
func (*QueryGetClobPairRequest) Reset ¶
func (m *QueryGetClobPairRequest) Reset()
func (*QueryGetClobPairRequest) Size ¶
func (m *QueryGetClobPairRequest) Size() (n int)
func (*QueryGetClobPairRequest) String ¶
func (m *QueryGetClobPairRequest) String() string
func (*QueryGetClobPairRequest) Unmarshal ¶
func (m *QueryGetClobPairRequest) Unmarshal(dAtA []byte) error
func (*QueryGetClobPairRequest) XXX_DiscardUnknown ¶
func (m *QueryGetClobPairRequest) XXX_DiscardUnknown()
func (*QueryGetClobPairRequest) XXX_Marshal ¶
func (m *QueryGetClobPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetClobPairRequest) XXX_Merge ¶
func (m *QueryGetClobPairRequest) XXX_Merge(src proto.Message)
func (*QueryGetClobPairRequest) XXX_Size ¶
func (m *QueryGetClobPairRequest) XXX_Size() int
func (*QueryGetClobPairRequest) XXX_Unmarshal ¶
func (m *QueryGetClobPairRequest) XXX_Unmarshal(b []byte) error
type QueryLiquidationsConfigurationRequest ¶
type QueryLiquidationsConfigurationRequest struct { }
QueryLiquidationsConfigurationRequest is a request message for LiquidationsConfiguration.
func (*QueryLiquidationsConfigurationRequest) Descriptor ¶
func (*QueryLiquidationsConfigurationRequest) Descriptor() ([]byte, []int)
func (*QueryLiquidationsConfigurationRequest) Marshal ¶
func (m *QueryLiquidationsConfigurationRequest) Marshal() (dAtA []byte, err error)
func (*QueryLiquidationsConfigurationRequest) MarshalTo ¶
func (m *QueryLiquidationsConfigurationRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryLiquidationsConfigurationRequest) MarshalToSizedBuffer ¶
func (m *QueryLiquidationsConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryLiquidationsConfigurationRequest) ProtoMessage ¶
func (*QueryLiquidationsConfigurationRequest) ProtoMessage()
func (*QueryLiquidationsConfigurationRequest) Reset ¶
func (m *QueryLiquidationsConfigurationRequest) Reset()
func (*QueryLiquidationsConfigurationRequest) Size ¶
func (m *QueryLiquidationsConfigurationRequest) Size() (n int)
func (*QueryLiquidationsConfigurationRequest) String ¶
func (m *QueryLiquidationsConfigurationRequest) String() string
func (*QueryLiquidationsConfigurationRequest) Unmarshal ¶
func (m *QueryLiquidationsConfigurationRequest) Unmarshal(dAtA []byte) error
func (*QueryLiquidationsConfigurationRequest) XXX_DiscardUnknown ¶
func (m *QueryLiquidationsConfigurationRequest) XXX_DiscardUnknown()
func (*QueryLiquidationsConfigurationRequest) XXX_Marshal ¶
func (m *QueryLiquidationsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryLiquidationsConfigurationRequest) XXX_Merge ¶
func (m *QueryLiquidationsConfigurationRequest) XXX_Merge(src proto.Message)
func (*QueryLiquidationsConfigurationRequest) XXX_Size ¶
func (m *QueryLiquidationsConfigurationRequest) XXX_Size() int
func (*QueryLiquidationsConfigurationRequest) XXX_Unmarshal ¶
func (m *QueryLiquidationsConfigurationRequest) XXX_Unmarshal(b []byte) error
type QueryLiquidationsConfigurationResponse ¶
type QueryLiquidationsConfigurationResponse struct {
LiquidationsConfig LiquidationsConfig `protobuf:"bytes,1,opt,name=liquidations_config,json=liquidationsConfig,proto3" json:"liquidations_config"`
}
QueryLiquidationsConfigurationResponse is a response message that contains the LiquidationsConfiguration.
func (*QueryLiquidationsConfigurationResponse) Descriptor ¶
func (*QueryLiquidationsConfigurationResponse) Descriptor() ([]byte, []int)
func (*QueryLiquidationsConfigurationResponse) GetLiquidationsConfig ¶
func (m *QueryLiquidationsConfigurationResponse) GetLiquidationsConfig() LiquidationsConfig
func (*QueryLiquidationsConfigurationResponse) Marshal ¶
func (m *QueryLiquidationsConfigurationResponse) Marshal() (dAtA []byte, err error)
func (*QueryLiquidationsConfigurationResponse) MarshalTo ¶
func (m *QueryLiquidationsConfigurationResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryLiquidationsConfigurationResponse) MarshalToSizedBuffer ¶
func (m *QueryLiquidationsConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryLiquidationsConfigurationResponse) ProtoMessage ¶
func (*QueryLiquidationsConfigurationResponse) ProtoMessage()
func (*QueryLiquidationsConfigurationResponse) Reset ¶
func (m *QueryLiquidationsConfigurationResponse) Reset()
func (*QueryLiquidationsConfigurationResponse) Size ¶
func (m *QueryLiquidationsConfigurationResponse) Size() (n int)
func (*QueryLiquidationsConfigurationResponse) String ¶
func (m *QueryLiquidationsConfigurationResponse) String() string
func (*QueryLiquidationsConfigurationResponse) Unmarshal ¶
func (m *QueryLiquidationsConfigurationResponse) Unmarshal(dAtA []byte) error
func (*QueryLiquidationsConfigurationResponse) XXX_DiscardUnknown ¶
func (m *QueryLiquidationsConfigurationResponse) XXX_DiscardUnknown()
func (*QueryLiquidationsConfigurationResponse) XXX_Marshal ¶
func (m *QueryLiquidationsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryLiquidationsConfigurationResponse) XXX_Merge ¶
func (m *QueryLiquidationsConfigurationResponse) XXX_Merge(src proto.Message)
func (*QueryLiquidationsConfigurationResponse) XXX_Size ¶
func (m *QueryLiquidationsConfigurationResponse) XXX_Size() int
func (*QueryLiquidationsConfigurationResponse) XXX_Unmarshal ¶
func (m *QueryLiquidationsConfigurationResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Queries a ClobPair by id. ClobPair(context.Context, *QueryGetClobPairRequest) (*QueryClobPairResponse, error) // Queries a list of ClobPair items. ClobPairAll(context.Context, *QueryAllClobPairRequest) (*QueryClobPairAllResponse, error) // Runs the MEV node <> node calculation with the provided parameters. MevNodeToNodeCalculation(context.Context, *MevNodeToNodeCalculationRequest) (*MevNodeToNodeCalculationResponse, error) // Queries EquityTierLimitConfiguration. EquityTierLimitConfiguration(context.Context, *QueryEquityTierLimitConfigurationRequest) (*QueryEquityTierLimitConfigurationResponse, error) // Queries BlockRateLimitConfiguration. BlockRateLimitConfiguration(context.Context, *QueryBlockRateLimitConfigurationRequest) (*QueryBlockRateLimitConfigurationResponse, error) // Queries LiquidationsConfiguration. LiquidationsConfiguration(context.Context, *QueryLiquidationsConfigurationRequest) (*QueryLiquidationsConfigurationResponse, error) // Streams orderbook updates. StreamOrderbookUpdates(*StreamOrderbookUpdatesRequest, Query_StreamOrderbookUpdatesServer) error }
QueryServer is the server API for Query service.
type Query_StreamOrderbookUpdatesClient ¶
type Query_StreamOrderbookUpdatesClient interface { Recv() (*StreamOrderbookUpdatesResponse, error) grpc.ClientStream }
type Query_StreamOrderbookUpdatesServer ¶
type Query_StreamOrderbookUpdatesServer interface { Send(*StreamOrderbookUpdatesResponse) error grpc.ServerStream }
type SortedClobPairId ¶
type SortedClobPairId []ClobPairId
SortedClobPairId is type alias for `[]ClobPairId` which supports deterministic sorting of clob pair Ids. This list assumes that all clob pair ids are unique and will panic if any two order placements have the same block height and transaction index.
func (SortedClobPairId) Len ¶
func (s SortedClobPairId) Len() int
func (SortedClobPairId) Less ¶
func (s SortedClobPairId) Less(i, j int) bool
func (SortedClobPairId) Swap ¶
func (s SortedClobPairId) Swap(i, j int)
type SortedLongTermOrderPlacements ¶
type SortedLongTermOrderPlacements []LongTermOrderPlacement
SortedLongTermOrderPlacements is type alias for `[]LongTermOrderPlacement` which supports deterministic sorting. Long Term order placements are first ordered by block height, followed by transaction index. This list assumes that all order placements are unique and will panic if any two order placements have the same block height and transaction index.
func (SortedLongTermOrderPlacements) Len ¶
func (s SortedLongTermOrderPlacements) Len() int
func (SortedLongTermOrderPlacements) Less ¶
func (s SortedLongTermOrderPlacements) Less(i, j int) bool
func (SortedLongTermOrderPlacements) Swap ¶
func (s SortedLongTermOrderPlacements) Swap(i, j int)
type SortedOrderHashes ¶
type SortedOrderHashes []OrderHash
func (SortedOrderHashes) Len ¶
func (s SortedOrderHashes) Len() int
func (SortedOrderHashes) Less ¶
func (s SortedOrderHashes) Less(i, j int) bool
func (SortedOrderHashes) Swap ¶
func (s SortedOrderHashes) Swap(i, j int)
type SortedOrders ¶
type SortedOrders []OrderId
SortedOrders is type alias for `*OrderId` which supports deterministic sorting. Orders are first ordered by string comparison of their `Subaccount` owner, followed by integer comparison of their `Subaccount` number, followed by `ClientId` of the order, followed by `OrderFlags`, and finally by `ClobPairId` of the order. If two `*OrderIds` have equal Owners, Numbers, ClientIds, OrderFlags, and ClobPairId, they are assumed to be equal, and their sorted order is not deterministic.
func (SortedOrders) Len ¶
func (s SortedOrders) Len() int
func (SortedOrders) Less ¶
func (s SortedOrders) Less(i, j int) bool
func (SortedOrders) Swap ¶
func (s SortedOrders) Swap(i, j int)
type SortedStatefulOrderPlacement ¶
type SortedStatefulOrderPlacement []StatefulOrderPlacement
SortedStatefulOrderPlacement is type alias for `[]StatefulOrderPlacement` which supports deterministic sorting. Stateful orders must expose one TransactionOrdering to be sorted on. Ordering is first by block height, then transaction index. The following types are currently supported: - LongTermOrderPlacement - ConditionalOrderPlacement This list assumes that all order placements are unique and will panic if any two stateful order placements have the same TransactionOrdering.
func (SortedStatefulOrderPlacement) Len ¶
func (s SortedStatefulOrderPlacement) Len() int
func (SortedStatefulOrderPlacement) Less ¶
func (s SortedStatefulOrderPlacement) Less(i, j int) bool
func (SortedStatefulOrderPlacement) Swap ¶
func (s SortedStatefulOrderPlacement) Swap(i, j int)
type SpotClobMetadata ¶
type SpotClobMetadata struct { // Id of the base Asset in the trading pair. BaseAssetId uint32 `protobuf:"varint,1,opt,name=base_asset_id,json=baseAssetId,proto3" json:"base_asset_id,omitempty"` // Id of the quote Asset in the trading pair. QuoteAssetId uint32 `protobuf:"varint,2,opt,name=quote_asset_id,json=quoteAssetId,proto3" json:"quote_asset_id,omitempty"` }
PerpetualClobMetadata contains metadata for a `ClobPair` representing a Spot product.
func (*SpotClobMetadata) Descriptor ¶
func (*SpotClobMetadata) Descriptor() ([]byte, []int)
func (*SpotClobMetadata) GetBaseAssetId ¶
func (m *SpotClobMetadata) GetBaseAssetId() uint32
func (*SpotClobMetadata) GetQuoteAssetId ¶
func (m *SpotClobMetadata) GetQuoteAssetId() uint32
func (*SpotClobMetadata) Marshal ¶
func (m *SpotClobMetadata) Marshal() (dAtA []byte, err error)
func (*SpotClobMetadata) MarshalToSizedBuffer ¶
func (m *SpotClobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SpotClobMetadata) ProtoMessage ¶
func (*SpotClobMetadata) ProtoMessage()
func (*SpotClobMetadata) Reset ¶
func (m *SpotClobMetadata) Reset()
func (*SpotClobMetadata) Size ¶
func (m *SpotClobMetadata) Size() (n int)
func (*SpotClobMetadata) String ¶
func (m *SpotClobMetadata) String() string
func (*SpotClobMetadata) Unmarshal ¶
func (m *SpotClobMetadata) Unmarshal(dAtA []byte) error
func (*SpotClobMetadata) XXX_DiscardUnknown ¶
func (m *SpotClobMetadata) XXX_DiscardUnknown()
func (*SpotClobMetadata) XXX_Marshal ¶
func (m *SpotClobMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SpotClobMetadata) XXX_Merge ¶
func (m *SpotClobMetadata) XXX_Merge(src proto.Message)
func (*SpotClobMetadata) XXX_Size ¶
func (m *SpotClobMetadata) XXX_Size() int
func (*SpotClobMetadata) XXX_Unmarshal ¶
func (m *SpotClobMetadata) XXX_Unmarshal(b []byte) error
type StatefulOrderPlacement ¶
type StatefulOrderPlacement interface {
GetTransactionIndex() TransactionOrdering
}
StatefulOrderPlacement represents any type of order placement that is stored in state. An stateful order placement exposes a `TransactionOrdering` transaction index that is used when sorting the stateful order placements. Ordering is first by block height, then transaction index. The following types are currently supported: - LongTermOrderPlacement - ConditionalOrderPlacement
type StatefulOrderTimeSliceValue ¶
type StatefulOrderTimeSliceValue struct { // A unique list of order_ids that expire at this timestamp, sorted in // ascending order by block height and transaction index of each stateful // order. OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"` }
StatefulOrderTimeSliceValue represents the type of the value of the `StatefulOrdersTimeSlice` in state. The `StatefulOrdersTimeSlice` in state consists of key/value pairs where the keys are UTF-8-encoded `RFC3339NANO` timestamp strings with right-padded zeroes and no time zone info, and the values are of type `StatefulOrderTimeSliceValue`. This `StatefulOrderTimeSliceValue` in state is used for managing stateful order expiration. Stateful order expirations can be for either long term or conditional orders.
func (*StatefulOrderTimeSliceValue) Descriptor ¶
func (*StatefulOrderTimeSliceValue) Descriptor() ([]byte, []int)
func (*StatefulOrderTimeSliceValue) GetOrderIds ¶
func (m *StatefulOrderTimeSliceValue) GetOrderIds() []OrderId
func (*StatefulOrderTimeSliceValue) Marshal ¶
func (m *StatefulOrderTimeSliceValue) Marshal() (dAtA []byte, err error)
func (*StatefulOrderTimeSliceValue) MarshalTo ¶
func (m *StatefulOrderTimeSliceValue) MarshalTo(dAtA []byte) (int, error)
func (*StatefulOrderTimeSliceValue) MarshalToSizedBuffer ¶
func (m *StatefulOrderTimeSliceValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StatefulOrderTimeSliceValue) ProtoMessage ¶
func (*StatefulOrderTimeSliceValue) ProtoMessage()
func (*StatefulOrderTimeSliceValue) Reset ¶
func (m *StatefulOrderTimeSliceValue) Reset()
func (*StatefulOrderTimeSliceValue) Size ¶
func (m *StatefulOrderTimeSliceValue) Size() (n int)
func (*StatefulOrderTimeSliceValue) String ¶
func (m *StatefulOrderTimeSliceValue) String() string
func (*StatefulOrderTimeSliceValue) Unmarshal ¶
func (m *StatefulOrderTimeSliceValue) Unmarshal(dAtA []byte) error
func (*StatefulOrderTimeSliceValue) XXX_DiscardUnknown ¶
func (m *StatefulOrderTimeSliceValue) XXX_DiscardUnknown()
func (*StatefulOrderTimeSliceValue) XXX_Marshal ¶
func (m *StatefulOrderTimeSliceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatefulOrderTimeSliceValue) XXX_Merge ¶
func (m *StatefulOrderTimeSliceValue) XXX_Merge(src proto.Message)
func (*StatefulOrderTimeSliceValue) XXX_Size ¶
func (m *StatefulOrderTimeSliceValue) XXX_Size() int
func (*StatefulOrderTimeSliceValue) XXX_Unmarshal ¶
func (m *StatefulOrderTimeSliceValue) XXX_Unmarshal(b []byte) error
type StatsKeeper ¶
type StreamOrderbookUpdatesRequest ¶
type StreamOrderbookUpdatesRequest struct { // Clob pair ids to stream orderbook updates for. ClobPairId []uint32 `protobuf:"varint,1,rep,packed,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` }
StreamOrderbookUpdatesRequest is a request message for the StreamOrderbookUpdates method.
func (*StreamOrderbookUpdatesRequest) Descriptor ¶
func (*StreamOrderbookUpdatesRequest) Descriptor() ([]byte, []int)
func (*StreamOrderbookUpdatesRequest) GetClobPairId ¶
func (m *StreamOrderbookUpdatesRequest) GetClobPairId() []uint32
func (*StreamOrderbookUpdatesRequest) Marshal ¶
func (m *StreamOrderbookUpdatesRequest) Marshal() (dAtA []byte, err error)
func (*StreamOrderbookUpdatesRequest) MarshalTo ¶
func (m *StreamOrderbookUpdatesRequest) MarshalTo(dAtA []byte) (int, error)
func (*StreamOrderbookUpdatesRequest) MarshalToSizedBuffer ¶
func (m *StreamOrderbookUpdatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StreamOrderbookUpdatesRequest) ProtoMessage ¶
func (*StreamOrderbookUpdatesRequest) ProtoMessage()
func (*StreamOrderbookUpdatesRequest) Reset ¶
func (m *StreamOrderbookUpdatesRequest) Reset()
func (*StreamOrderbookUpdatesRequest) Size ¶
func (m *StreamOrderbookUpdatesRequest) Size() (n int)
func (*StreamOrderbookUpdatesRequest) String ¶
func (m *StreamOrderbookUpdatesRequest) String() string
func (*StreamOrderbookUpdatesRequest) Unmarshal ¶
func (m *StreamOrderbookUpdatesRequest) Unmarshal(dAtA []byte) error
func (*StreamOrderbookUpdatesRequest) XXX_DiscardUnknown ¶
func (m *StreamOrderbookUpdatesRequest) XXX_DiscardUnknown()
func (*StreamOrderbookUpdatesRequest) XXX_Marshal ¶
func (m *StreamOrderbookUpdatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamOrderbookUpdatesRequest) XXX_Merge ¶
func (m *StreamOrderbookUpdatesRequest) XXX_Merge(src proto.Message)
func (*StreamOrderbookUpdatesRequest) XXX_Size ¶
func (m *StreamOrderbookUpdatesRequest) XXX_Size() int
func (*StreamOrderbookUpdatesRequest) XXX_Unmarshal ¶
func (m *StreamOrderbookUpdatesRequest) XXX_Unmarshal(b []byte) error
type StreamOrderbookUpdatesResponse ¶
type StreamOrderbookUpdatesResponse struct { // Orderbook updates for the clob pair. Updates []types.OffChainUpdateV1 `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates"` // Snapshot indicates if the response is from a snapshot of the orderbook. // This is true for the initial response and false for all subsequent updates. // Note that if the snapshot is true, then all previous entries should be // discarded and the orderbook should be resynced. Snapshot bool `protobuf:"varint,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"` // ---Additional fields used to debug issues--- // Block height of the updates. BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Exec mode of the updates. ExecMode uint32 `protobuf:"varint,4,opt,name=exec_mode,json=execMode,proto3" json:"exec_mode,omitempty"` }
StreamOrderbookUpdatesResponse is a response message for the StreamOrderbookUpdates method.
func (*StreamOrderbookUpdatesResponse) Descriptor ¶
func (*StreamOrderbookUpdatesResponse) Descriptor() ([]byte, []int)
func (*StreamOrderbookUpdatesResponse) GetBlockHeight ¶
func (m *StreamOrderbookUpdatesResponse) GetBlockHeight() uint32
func (*StreamOrderbookUpdatesResponse) GetExecMode ¶
func (m *StreamOrderbookUpdatesResponse) GetExecMode() uint32
func (*StreamOrderbookUpdatesResponse) GetSnapshot ¶
func (m *StreamOrderbookUpdatesResponse) GetSnapshot() bool
func (*StreamOrderbookUpdatesResponse) GetUpdates ¶
func (m *StreamOrderbookUpdatesResponse) GetUpdates() []types.OffChainUpdateV1
func (*StreamOrderbookUpdatesResponse) Marshal ¶
func (m *StreamOrderbookUpdatesResponse) Marshal() (dAtA []byte, err error)
func (*StreamOrderbookUpdatesResponse) MarshalTo ¶
func (m *StreamOrderbookUpdatesResponse) MarshalTo(dAtA []byte) (int, error)
func (*StreamOrderbookUpdatesResponse) MarshalToSizedBuffer ¶
func (m *StreamOrderbookUpdatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StreamOrderbookUpdatesResponse) ProtoMessage ¶
func (*StreamOrderbookUpdatesResponse) ProtoMessage()
func (*StreamOrderbookUpdatesResponse) Reset ¶
func (m *StreamOrderbookUpdatesResponse) Reset()
func (*StreamOrderbookUpdatesResponse) Size ¶
func (m *StreamOrderbookUpdatesResponse) Size() (n int)
func (*StreamOrderbookUpdatesResponse) String ¶
func (m *StreamOrderbookUpdatesResponse) String() string
func (*StreamOrderbookUpdatesResponse) Unmarshal ¶
func (m *StreamOrderbookUpdatesResponse) Unmarshal(dAtA []byte) error
func (*StreamOrderbookUpdatesResponse) XXX_DiscardUnknown ¶
func (m *StreamOrderbookUpdatesResponse) XXX_DiscardUnknown()
func (*StreamOrderbookUpdatesResponse) XXX_Marshal ¶
func (m *StreamOrderbookUpdatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamOrderbookUpdatesResponse) XXX_Merge ¶
func (m *StreamOrderbookUpdatesResponse) XXX_Merge(src proto.Message)
func (*StreamOrderbookUpdatesResponse) XXX_Size ¶
func (m *StreamOrderbookUpdatesResponse) XXX_Size() int
func (*StreamOrderbookUpdatesResponse) XXX_Unmarshal ¶
func (m *StreamOrderbookUpdatesResponse) XXX_Unmarshal(b []byte) error
type SubaccountLiquidationInfo ¶
type SubaccountLiquidationInfo struct { // An unsorted list of unique perpetual IDs that the subaccount has previously // liquidated. PerpetualsLiquidated []uint32 `` /* 129-byte string literal not displayed */ }
SubaccountLiquidationInfo holds liquidation information per-subaccount in the current block.
func (*SubaccountLiquidationInfo) Descriptor ¶
func (*SubaccountLiquidationInfo) Descriptor() ([]byte, []int)
func (*SubaccountLiquidationInfo) GetPerpetualsLiquidated ¶
func (m *SubaccountLiquidationInfo) GetPerpetualsLiquidated() []uint32
func (*SubaccountLiquidationInfo) HasPerpetualBeenLiquidatedForSubaccount ¶
func (sli *SubaccountLiquidationInfo) HasPerpetualBeenLiquidatedForSubaccount( perpetualId uint32, ) bool
func (*SubaccountLiquidationInfo) Marshal ¶
func (m *SubaccountLiquidationInfo) Marshal() (dAtA []byte, err error)
func (*SubaccountLiquidationInfo) MarshalTo ¶
func (m *SubaccountLiquidationInfo) MarshalTo(dAtA []byte) (int, error)
func (*SubaccountLiquidationInfo) MarshalToSizedBuffer ¶
func (m *SubaccountLiquidationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SubaccountLiquidationInfo) ProtoMessage ¶
func (*SubaccountLiquidationInfo) ProtoMessage()
func (*SubaccountLiquidationInfo) Reset ¶
func (m *SubaccountLiquidationInfo) Reset()
func (*SubaccountLiquidationInfo) Size ¶
func (m *SubaccountLiquidationInfo) Size() (n int)
func (*SubaccountLiquidationInfo) String ¶
func (m *SubaccountLiquidationInfo) String() string
func (*SubaccountLiquidationInfo) Unmarshal ¶
func (m *SubaccountLiquidationInfo) Unmarshal(dAtA []byte) error
func (*SubaccountLiquidationInfo) XXX_DiscardUnknown ¶
func (m *SubaccountLiquidationInfo) XXX_DiscardUnknown()
func (*SubaccountLiquidationInfo) XXX_Marshal ¶
func (m *SubaccountLiquidationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubaccountLiquidationInfo) XXX_Merge ¶
func (m *SubaccountLiquidationInfo) XXX_Merge(src proto.Message)
func (*SubaccountLiquidationInfo) XXX_Size ¶
func (m *SubaccountLiquidationInfo) XXX_Size() int
func (*SubaccountLiquidationInfo) XXX_Unmarshal ¶
func (m *SubaccountLiquidationInfo) XXX_Unmarshal(b []byte) error
type SubaccountOpenPositionInfo ¶
type SubaccountOpenPositionInfo struct { // The id of the perpetual. PerpetualId uint32 `protobuf:"varint,1,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // The ids of the subaccounts with long positions. SubaccountsWithLongPosition []types.SubaccountId `` /* 136-byte string literal not displayed */ // The ids of the subaccounts with short positions. SubaccountsWithShortPosition []types.SubaccountId `` /* 139-byte string literal not displayed */ }
SubaccountOpenPositionInfo holds information about open positions for a perpetual.
func (*SubaccountOpenPositionInfo) Descriptor ¶
func (*SubaccountOpenPositionInfo) Descriptor() ([]byte, []int)
func (*SubaccountOpenPositionInfo) GetPerpetualId ¶
func (m *SubaccountOpenPositionInfo) GetPerpetualId() uint32
func (*SubaccountOpenPositionInfo) GetSubaccountsWithLongPosition ¶
func (m *SubaccountOpenPositionInfo) GetSubaccountsWithLongPosition() []types.SubaccountId
func (*SubaccountOpenPositionInfo) GetSubaccountsWithShortPosition ¶
func (m *SubaccountOpenPositionInfo) GetSubaccountsWithShortPosition() []types.SubaccountId
func (*SubaccountOpenPositionInfo) Marshal ¶
func (m *SubaccountOpenPositionInfo) Marshal() (dAtA []byte, err error)
func (*SubaccountOpenPositionInfo) MarshalTo ¶
func (m *SubaccountOpenPositionInfo) MarshalTo(dAtA []byte) (int, error)
func (*SubaccountOpenPositionInfo) MarshalToSizedBuffer ¶
func (m *SubaccountOpenPositionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SubaccountOpenPositionInfo) ProtoMessage ¶
func (*SubaccountOpenPositionInfo) ProtoMessage()
func (*SubaccountOpenPositionInfo) Reset ¶
func (m *SubaccountOpenPositionInfo) Reset()
func (*SubaccountOpenPositionInfo) Size ¶
func (m *SubaccountOpenPositionInfo) Size() (n int)
func (*SubaccountOpenPositionInfo) String ¶
func (m *SubaccountOpenPositionInfo) String() string
func (*SubaccountOpenPositionInfo) Unmarshal ¶
func (m *SubaccountOpenPositionInfo) Unmarshal(dAtA []byte) error
func (*SubaccountOpenPositionInfo) XXX_DiscardUnknown ¶
func (m *SubaccountOpenPositionInfo) XXX_DiscardUnknown()
func (*SubaccountOpenPositionInfo) XXX_Marshal ¶
func (m *SubaccountOpenPositionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubaccountOpenPositionInfo) XXX_Merge ¶
func (m *SubaccountOpenPositionInfo) XXX_Merge(src proto.Message)
func (*SubaccountOpenPositionInfo) XXX_Size ¶
func (m *SubaccountOpenPositionInfo) XXX_Size() int
func (*SubaccountOpenPositionInfo) XXX_Unmarshal ¶
func (m *SubaccountOpenPositionInfo) XXX_Unmarshal(b []byte) error
type SubaccountsKeeper ¶
type SubaccountsKeeper interface { CanUpdateSubaccounts( ctx sdk.Context, updates []satypes.Update, updateType satypes.UpdateType, ) ( success bool, successPerUpdate []satypes.UpdateResult, err error, ) GetNetCollateralAndMarginRequirements( ctx sdk.Context, update satypes.Update, ) ( bigNetCollateral *big.Int, bigInitialMargin *big.Int, bigMaintenanceMargin *big.Int, err error, ) GetSubaccount( ctx sdk.Context, id satypes.SubaccountId, ) ( val satypes.Subaccount, ) GetAllSubaccount( ctx sdk.Context, ) ( list []satypes.Subaccount, ) GetRandomSubaccount( ctx sdk.Context, rand *rand.Rand, ) ( satypes.Subaccount, error, ) UpdateSubaccounts( ctx sdk.Context, updates []satypes.Update, updateType satypes.UpdateType, ) ( success bool, successPerUpdate []satypes.UpdateResult, err error, ) SetNegativeTncSubaccountSeenAtBlock( ctx sdk.Context, perpetualId uint32, blockHeight uint32, ) error TransferFeesToFeeCollectorModule( ctx sdk.Context, assetId uint32, amount *big.Int, perpetualId uint32, ) error TransferInsuranceFundPayments( ctx sdk.Context, amount *big.Int, perpetualId uint32, ) error TransferLiquidityFee( ctx sdk.Context, liquidityFeeQuoteQuantums *big.Int, perpetualId uint32, ) error TransferValidatorFee( ctx sdk.Context, validatorFeeQuoteQuantums *big.Int, perpetualId uint32, ) error GetCollateralPoolFromPerpetualId( ctx sdk.Context, perpetualId uint32, ) (sdk.AccAddress, error) GetSettledSubaccount( ctx sdk.Context, subaccount satypes.Subaccount, ) ( settledSubaccount satypes.Subaccount, fundingPayments map[uint32]dtypes.SerializableInt, yieldForSubaccount *big.Int, err error, ) }
type Subticks ¶
type Subticks uint64
Subticks is used to represent the price level that an order will be placed on the orderbook.
type SubticksPerTick ¶
type SubticksPerTick uint32
SubticksPerTick is used to represent how many subticks are in one tick. That is, the subticks of any valid order must be a multiple of this value.
type TakerOrderStatus ¶
type TakerOrderStatus struct { // The state of the taker order after attempting to match it against the orderbook. OrderStatus OrderStatus // The amount of remaining (non-matched) base quantums of this taker order. RemainingQuantums satypes.BaseQuantums // The amount of base quantums that were optimistically filled (from this current matching cycle) of this taker // order. Note that if any quantums of this order were optimistically filled or filled in state before the current // matching cycle, this value will not include them. OrderOptimisticallyFilledQuantums satypes.BaseQuantums }
TakerOrderStatus is a utility struct used for representing the status, remaining size, and optimistically filled size of a taker order after attempting to match it on the orderbook.
type TransactionOrdering ¶
type TransactionOrdering struct { // Block height in which the transaction was placed. BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Within the block, the unique transaction index. TransactionIndex uint32 `protobuf:"varint,2,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` }
TransactionOrdering represents a unique location in the block where a transaction was placed. This proto includes both block height and the transaction index that the specific transaction was placed. This information is used for ordering by time priority when the chain is restarted.
func (*TransactionOrdering) Descriptor ¶
func (*TransactionOrdering) Descriptor() ([]byte, []int)
func (*TransactionOrdering) GetBlockHeight ¶
func (m *TransactionOrdering) GetBlockHeight() uint32
func (*TransactionOrdering) GetTransactionIndex ¶
func (m *TransactionOrdering) GetTransactionIndex() uint32
func (*TransactionOrdering) Marshal ¶
func (m *TransactionOrdering) Marshal() (dAtA []byte, err error)
func (*TransactionOrdering) MarshalTo ¶
func (m *TransactionOrdering) MarshalTo(dAtA []byte) (int, error)
func (*TransactionOrdering) MarshalToSizedBuffer ¶
func (m *TransactionOrdering) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TransactionOrdering) ProtoMessage ¶
func (*TransactionOrdering) ProtoMessage()
func (*TransactionOrdering) Reset ¶
func (m *TransactionOrdering) Reset()
func (*TransactionOrdering) Size ¶
func (m *TransactionOrdering) Size() (n int)
func (*TransactionOrdering) String ¶
func (m *TransactionOrdering) String() string
func (*TransactionOrdering) Unmarshal ¶
func (m *TransactionOrdering) Unmarshal(dAtA []byte) error
func (*TransactionOrdering) XXX_DiscardUnknown ¶
func (m *TransactionOrdering) XXX_DiscardUnknown()
func (*TransactionOrdering) XXX_Marshal ¶
func (m *TransactionOrdering) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionOrdering) XXX_Merge ¶
func (m *TransactionOrdering) XXX_Merge(src proto.Message)
func (*TransactionOrdering) XXX_Size ¶
func (m *TransactionOrdering) XXX_Size() int
func (*TransactionOrdering) XXX_Unmarshal ¶
func (m *TransactionOrdering) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) BatchCancel ¶
func (*UnimplementedMsgServer) BatchCancel(ctx context.Context, req *MsgBatchCancel) (*MsgBatchCancelResponse, error)
func (*UnimplementedMsgServer) CancelOrder ¶
func (*UnimplementedMsgServer) CancelOrder(ctx context.Context, req *MsgCancelOrder) (*MsgCancelOrderResponse, error)
func (*UnimplementedMsgServer) CreateClobPair ¶
func (*UnimplementedMsgServer) CreateClobPair(ctx context.Context, req *MsgCreateClobPair) (*MsgCreateClobPairResponse, error)
func (*UnimplementedMsgServer) PlaceOrder ¶
func (*UnimplementedMsgServer) PlaceOrder(ctx context.Context, req *MsgPlaceOrder) (*MsgPlaceOrderResponse, error)
func (*UnimplementedMsgServer) ProposedOperations ¶
func (*UnimplementedMsgServer) ProposedOperations(ctx context.Context, req *MsgProposedOperations) (*MsgProposedOperationsResponse, error)
func (*UnimplementedMsgServer) UpdateBlockRateLimitConfiguration ¶
func (*UnimplementedMsgServer) UpdateBlockRateLimitConfiguration(ctx context.Context, req *MsgUpdateBlockRateLimitConfiguration) (*MsgUpdateBlockRateLimitConfigurationResponse, error)
func (*UnimplementedMsgServer) UpdateClobPair ¶
func (*UnimplementedMsgServer) UpdateClobPair(ctx context.Context, req *MsgUpdateClobPair) (*MsgUpdateClobPairResponse, error)
func (*UnimplementedMsgServer) UpdateEquityTierLimitConfiguration ¶
func (*UnimplementedMsgServer) UpdateEquityTierLimitConfiguration(ctx context.Context, req *MsgUpdateEquityTierLimitConfiguration) (*MsgUpdateEquityTierLimitConfigurationResponse, error)
func (*UnimplementedMsgServer) UpdateLiquidationsConfig ¶
func (*UnimplementedMsgServer) UpdateLiquidationsConfig(ctx context.Context, req *MsgUpdateLiquidationsConfig) (*MsgUpdateLiquidationsConfigResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) BlockRateLimitConfiguration ¶
func (*UnimplementedQueryServer) BlockRateLimitConfiguration(ctx context.Context, req *QueryBlockRateLimitConfigurationRequest) (*QueryBlockRateLimitConfigurationResponse, error)
func (*UnimplementedQueryServer) ClobPair ¶
func (*UnimplementedQueryServer) ClobPair(ctx context.Context, req *QueryGetClobPairRequest) (*QueryClobPairResponse, error)
func (*UnimplementedQueryServer) ClobPairAll ¶
func (*UnimplementedQueryServer) ClobPairAll(ctx context.Context, req *QueryAllClobPairRequest) (*QueryClobPairAllResponse, error)
func (*UnimplementedQueryServer) EquityTierLimitConfiguration ¶
func (*UnimplementedQueryServer) EquityTierLimitConfiguration(ctx context.Context, req *QueryEquityTierLimitConfigurationRequest) (*QueryEquityTierLimitConfigurationResponse, error)
func (*UnimplementedQueryServer) LiquidationsConfiguration ¶
func (*UnimplementedQueryServer) LiquidationsConfiguration(ctx context.Context, req *QueryLiquidationsConfigurationRequest) (*QueryLiquidationsConfigurationResponse, error)
func (*UnimplementedQueryServer) MevNodeToNodeCalculation ¶
func (*UnimplementedQueryServer) MevNodeToNodeCalculation(ctx context.Context, req *MevNodeToNodeCalculationRequest) (*MevNodeToNodeCalculationResponse, error)
func (*UnimplementedQueryServer) StreamOrderbookUpdates ¶
func (*UnimplementedQueryServer) StreamOrderbookUpdates(req *StreamOrderbookUpdatesRequest, srv Query_StreamOrderbookUpdatesServer) error
type ValidatorMevMatches ¶
type ValidatorMevMatches struct { Matches []MEVMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches"` LiquidationMatches []MEVLiquidationMatch `protobuf:"bytes,2,rep,name=liquidation_matches,json=liquidationMatches,proto3" json:"liquidation_matches"` }
ValidatorMevMatches contains all matches from the validator's local operations queue.
func (*ValidatorMevMatches) Descriptor ¶
func (*ValidatorMevMatches) Descriptor() ([]byte, []int)
func (*ValidatorMevMatches) GetLiquidationMatches ¶
func (m *ValidatorMevMatches) GetLiquidationMatches() []MEVLiquidationMatch
func (*ValidatorMevMatches) GetMatches ¶
func (m *ValidatorMevMatches) GetMatches() []MEVMatch
func (*ValidatorMevMatches) Marshal ¶
func (m *ValidatorMevMatches) Marshal() (dAtA []byte, err error)
func (*ValidatorMevMatches) MarshalTo ¶
func (m *ValidatorMevMatches) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorMevMatches) MarshalToSizedBuffer ¶
func (m *ValidatorMevMatches) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorMevMatches) ProtoMessage ¶
func (*ValidatorMevMatches) ProtoMessage()
func (*ValidatorMevMatches) Reset ¶
func (m *ValidatorMevMatches) Reset()
func (*ValidatorMevMatches) Size ¶
func (m *ValidatorMevMatches) Size() (n int)
func (*ValidatorMevMatches) String ¶
func (m *ValidatorMevMatches) String() string
func (*ValidatorMevMatches) Unmarshal ¶
func (m *ValidatorMevMatches) Unmarshal(dAtA []byte) error
func (*ValidatorMevMatches) XXX_DiscardUnknown ¶
func (m *ValidatorMevMatches) XXX_DiscardUnknown()
func (*ValidatorMevMatches) XXX_Marshal ¶
func (m *ValidatorMevMatches) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorMevMatches) XXX_Merge ¶
func (m *ValidatorMevMatches) XXX_Merge(src proto.Message)
func (*ValidatorMevMatches) XXX_Size ¶
func (m *ValidatorMevMatches) XXX_Size() int
func (*ValidatorMevMatches) XXX_Unmarshal ¶
func (m *ValidatorMevMatches) XXX_Unmarshal(b []byte) error
Source Files ¶
- block_rate_limit_config.go
- block_rate_limit_config.pb.go
- clob_keeper.go
- clob_pair.go
- clob_pair.pb.go
- codec.go
- constants.go
- equity_tier_limit_config.go
- equity_tier_limit_config.pb.go
- errors.go
- events.go
- expected_keepers.go
- genesis.go
- genesis.pb.go
- internal_operation.go
- keys.go
- liquidation_order.go
- liquidations.pb.go
- liquidations_config.go
- liquidations_config.pb.go
- liquidations_config_keeper.go
- liquidations_keeper.go
- match_perpetual_deleveraging.go
- match_perpetual_liquidation.go
- match_with_orders.go
- matches.go
- matches.pb.go
- mem_clob_keeper.go
- memclob.go
- message_batch_cancel.go
- message_cancel_order.go
- message_clob_match.go
- message_create_clob_pair.go
- message_place_order.go
- message_proposed_operations.go
- message_update_block_rate_limit_config.go
- message_update_clob_pair.go
- message_update_equity_tier_limit_config.go
- message_update_liquidations_config.go
- mev.go
- mev.pb.go
- mev_telemetry.go
- offchain_updates.go
- operation.go
- operation.pb.go
- operations_to_propose.go
- order.go
- order.pb.go
- order_hash.go
- order_id.go
- order_removals.pb.go
- orderbook.go
- pending_updates.go
- price_to_subticks.go
- process_proposer_matches_events.go
- process_proposer_matches_events.pb.go
- quantums.go
- query.pb.go
- query.pb.gw.go
- sort_orders.go
- stat_internal_operations.go
- subaccount_liquidation_info.go
- tx.pb.go
- types.go