package
7.0.1+incompatible
Repository: https://github.com/dydxprotocol/v4-chain.git
Documentation: pkg.go.dev

# Functions

DefaultGenesis returns the default Capability genesis state.
FillAmountToQuoteQuantums converts a fill amount denoted in base quantums, to a price denoted in quote quantums given an order's subticks.
GetAveragePriceSubticks computes the average price (in subticks) of filled amount in `quoteQuantums` and `baseQuantums`.
GetOperationsQueueString returns a string representation of the provided operations.
IsSupportedClobPairStatus returns true if the provided ClobPair_Status is in the list of currently supported ClobPair_Status types.
IsSupportedClobPairStatusTransition returns true if it is considered valid to transition from the first provided ClobPair_Status to the second provided ClobPair_Status.
MakerFillsWithOrderToMakerFills converts a slice of `MakerFillWithOrder` to a slice of `MakerFill`.
MustSortAndHaveNoDuplicates is a wrapper around SortedOrders, which is for deterministic sorting.
NewClobMatchFromMatchOrders creates a `ClobMatch` from the provided `MatchOrders`.
NewClobMatchFromMatchPerpetualLiquidation creates a `ClobMatch` from the provided `MatchPerpetualLiquidation`.
NewCreateMatchEvent constructs a new match sdk.Event.
NewLiquidationOrder creates and returns a new liquidation order.
NewMatchOrdersInternalOperation returns a new operation for matching maker orders against a taker order.
NewMatchPerpetualDeleveragingInternalOperation returns a new operation for deleveraging liquidated subaccount's position against one or more offsetting subaccounts.
NewMatchPerpetualLiquidationInternalOperation returns a new operation for matching maker orders against a perpetual liquidation order.
NewMsgBatchCancel constructs a MsgBatchCancel.
NewMsgCancelOrderShortTerm constructs a MsgCancelOrder from an `OrderId` and a `GoodTilBlock`.
NewMsgCancelOrderStateful constructs a MsgCancelOrder from an `OrderId` and a `GoodTillBlockTime`.
No description provided by the author
No description provided by the author
NewOffchainupdates creates a new OffchainUpdates struct and returns a pointer to it.
NewOperationsToPropose returns a new instance of `OperationsToPropose`.
NewOrderRemovalInternalOperation returns a new operation for removing an order.
NewPreexistingStatefulOrderPlacementInternalOperation returns a new internal operation for placing a stateful order.
No description provided by the author
NewShortTermOrderPlacementInternalOperation returns a new internal operation for placing a Short-Term order.
PriceToSubticks converts price value from Prices module into subticks.
No description provided by the author
No description provided by the author
No description provided by the author
RegisterQueryHandler registers the http handlers for service Query to "mux".
RegisterQueryHandlerClient registers the http handlers for service Query to "mux".
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
No description provided by the author
StatMsgProposedOperations generates statistics from a list of internal operations and returns them in an `OperationsStats` struct.
SubticksToPrice converts subticks into price value from Prices module.
ValidateAndTransformRawOperations performs stateless validation on the proposed operation queue and transforms the input []OperationRaw into []InternalOperation.

# Constants

CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
CLOB module event types.
BlockRateLimitConfigKey is the key to retrieve the block rate limit configuration.
STATUS_ACTIVE represents an active clob pair.
STATUS_CANCEL_ONLY behavior is unfinalized.
STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated and trading has ceased.
STATUS_INITIALIZING represents a newly-added clob pair.
STATUS_PAUSED behavior is unfinalized.
ClobPair_STATUS_POST_ONLY
STATUS_POST_ONLY behavior is unfinalized.
Default value.
ClobPairKeyPrefix is the prefix to retrieve all ClobPair.
ConditionalOrderTriggerMultiplier represents the multiplier used to calculate the upper and lower bounds of the trigger price for a conditional order.
DeliveredCancelKeyPrefix is used to store placed orders for memclob placement in PrepareCheckState.
EquityTierLimitConfigKey is the key to retrieve the equity tier limit configuration.
CLOB module event types.
ImmediateOrCancelWouldRestOnBook indicates this is an IOC order that would have been placed on the orderbook as resting liquidity, and was therefore canceled.
InternalError indicates the order caused an internal error during collateralization checks while matching or when placed on the orderbook, and was therefore canceled.
Deprecated: LegacyBlockHeightToPotentiallyPrunableOrdersPrefix is the prefix to retrieve a list of potentially prunable short term orders by block height.
Deprecated: LegacyStatefulOrdersTimeSlicePrefix is the key to retrieve a unique list of the stateful orders that expire at a given timestamp, sorted by order ID.
LiquidationExceededSubaccountMaxInsuranceLost indicates that the liquidation order could not be matched because it exceeded the maximum funds lost for the insurance fund in this block.
LiquidationExceededSubaccountMaxNotionalLiquidated indicates that the liquidation order could not be matched because it exceeded the max notional liquidated in this block.
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.
LiquidationsConfigKey is the key to retrieve the liquidations config.
LongTermOrderPlacementKeyPrefix is the key to retrieve a long term order and information about when it was placed.
MaxMsgBatchCancelBatchSize represents the maximum number of cancels that a MsgBatchCancel can have in one Msg.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxTradePricePrefix is the key prefix to retrieve the max trade price for a perpetual.
MemStoreKey defines the in-memory store key.
MinTradePricePrefix is the key prefix to retrieve the min trade price for a perpetual.
ModuleName defines the module name.
NextClobPairIDKey is the key to retrieve the next ClobPair ID to be used.
NextStatefulOrderBlockTransactionIndexKey is the transient store key that stores the next transaction index to use for the next newly-placed stateful order.
CONDITION_TYPE_STOP_LOSS represents a stop order.
CONDITION_TYPE_TAKE_PROFIT represents a take profit order.
CONDITION_TYPE_UNSPECIFIED represents the default behavior where an order will be placed immediately on the orderbook.
SIDE_BUY is used to represent a BUY order.
SIDE_SELL is used to represent a SELL order.
Default value.
Deprecated: Do not use.
TIME_IN_FORCE_IOC enforces that an order only be matched with maker orders on the book.
Order_TIME_IN_FORCE_POST_ONLY
TIME_IN_FORCE_POST_ONLY enforces that an order only be placed on the book as a maker order.
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.
OrderAmountFilledKeyPrefix is the prefix to retrieve the fill amount for an order.
OrderedDeliveredConditionalOrdexIndexKey stores the next index to be used for OrderedDeliveredConditionalOrderKeyPrefix.
OrderedDeliveredConditionalOrderKeyPrefix is used to store placed orders for memclob placement in PrepareCheckState.
OrderedDeliveredLongTermOrderIndexKey stores the next index to be used for OrderedDeliveredLongTermOrderKeyPrefix.
OrderedDeliveredLongTermOrderKeyPrefix is used to store placed orders for memclob placement in PrepareCheckState.
No description provided by the author
No description provided by the author
No description provided by the author
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.
REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK represents a removal of a conditional IOC order.
REMOVAL_REASON_FULLY_FILLED represents a removal of an order that was fully filled and should therefore be removed from state.
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.
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_POST_ONLY_WOULD_CROSS_MAKER_ORDER
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.
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.
REMOVAL_REASON_UNSPECIFIED represents an unspecified removal reason.
REMOVAL_REASON_FULLY_FILLED represents a removal of an order that would lead to the subaccount violating isolated subaccount constraints.
No description provided by the author
No description provided by the author
PlacedStatefulOrderKeyPrefix is the prefix key for placed long term orders and triggered conditional orders.
Enum used to track the types of messages, should correspond to the types of messages defined in https://github.com/dydxprotocol/v4-proto/blob/main/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto.
PostOnlyWouldCrossMakerOrder indicates that matching the post only taker order would cross the orderbook, and was therefore canceled.
ProcessProposerMatchesEventsKey is the key to retrieve information about how to update memclob state based on the latest block.
PrunableOrdersKeyPrefix is the prefix key for orders prunable at a certain height.
ReduceOnlyResized indicates the reduce-only order was resized since it would have changed the user's position side.
Enum used to track the types of messages, should correspond to the types of messages defined in https://github.com/dydxprotocol/v4-proto/blob/main/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto.
Enum used to track the types of messages, should correspond to the types of messages defined in https://github.com/dydxprotocol/v4-proto/blob/main/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto.
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.
FinalizeBlock event staging.
FinalizeBlock event staging.
StatefulOrderCountPrefix is the key to retrieve the stateful order count.
StatefulOrderKeyPrefix is the prefix key for all long term orders and all conditional orders, both triggered and untriggered.
StatefulOrdersTimeSliceKeyPrefix is used to store orders that expire at a certain time.
95 days.
StoreKey defines the primary module store key.
SubaccountLiquidationInfoKeyPrefix is the prefix to retrieve the liquidation information for a subaccount within the last block.
Success indicates the order was successfully matched and / or added to the orderbook.
No description provided by the author
TransientStoreKey defines the primary module transient store key.
TriggeredConditionalOrderKeyPrefix is the key to retrieve an triggered conditional order and information about when it was triggered.
No description provided by the author
No description provided by the author
No description provided by the author
UncommittedStatefulOrderCancellationKeyPrefix is the key to retrieve an uncommitted stateful order cancellation.
UncommittedStatefulOrderCountPrefix is the key to retrieve an uncommitted stateful order count.
UncommittedStatefulOrderPlacementKeyPrefix is the key to retrieve an uncommitted stateful order and information about when it was placed.
Undercollateralized indicates the order failed collateralization checks while matching or when placed on the orderbook, and was therefore canceled.
UntriggeredConditionalOrderKeyPrefix is the key to retrieve an untriggered conditional order and information about when it was placed.
Enum used to track the types of messages, should correspond to the types of messages defined in https://github.com/dydxprotocol/v4-proto/blob/main/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto.
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.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
Errors for unimplemented and disabled functionality.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
TODO: Should the error code be skipped or re-assigned?.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Advanced order type errors.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Block rate limit errors.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Conditional order errors.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Equity tier limit errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Liquidations errors.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
Operations Queue validation errors.
Stateful order errors.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
x/clob module sentinel errors TODO(CLOB-553) Clean up sentinel errors not in use.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
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.

# Structs

Defines the block rate limits for CLOB specific operations.
ClobMatch represents an operations queue entry around all different types of matches, specifically regular matches, liquidation matches, and deleveraging matches.
No description provided by the author
No description provided by the author
No description provided by the author
ClobMidPrice contains the mid price of a CLOB pair, represented by it's ID.
ClobOrder represents an order that is resting on the CLOB.
ClobPair represents a single CLOB pair for a given product in state.
No description provided by the author
No description provided by the author
ClobStagedFinalizeBlockEvent defines a CLOB event staged during FinalizeBlock.
No description provided by the author
ConditionalOrderPlacement represents the placement of a conditional order in state.
Defines an equity tier limit.
Defines the set of equity tiers to limit how many open orders a subaccount is allowed to have.
FillablePriceConfig stores all configurable fields related to calculating the fillable price for liquidating a position.
No description provided by the author
GenesisState defines the clob module's genesis state.
InternalOperation represents an internal operation in the operations to propose.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Level represents a price level on the CLOB.
LiquidationOrder is used to represent an IOC liquidation order.
LiquidationsConfig stores all configurable fields related to liquidations.
LongTermOrderPlacement represents the placement of a stateful order in state.
MakerFill represents the filled amount of a matched maker order.
MakerFillWithOrder represents the filled amount of a matched maker order, along with the `Order` representing the matched maker order.
MatchOrders is an injected message used for matching orders.
MatchPerpetualDeleveraging is an injected message used for deleveraging a subaccount.
Fill represents a fill between the liquidated and offsetting subaccount.
MatchPerpetualLiquidation is an injected message used for liquidating a subaccount.
MatchWithOrders represents a match which occurred between two orders and the amount that was matched.
Defines a rate limit over a specific number of blocks.
MEVDatapoint contains the Volume (ValidatorVolumeQuoteQuantums) and MEV per market to be sent to the MEV telemetry service.
MEVLiquidationMatch represents all necessary data to calculate MEV for a liquidation.
MEVMatch represents all necessary data to calculate MEV for a regular match.
MevMetrics represents all MEV metrics to send to the MEV telemetry service.
MevNodeToNodeCalculationRequest is a request message used to run the MEV node <> node calculation.
MevNodeToNodeCalculationResponse is a response message that contains the MEV node <> node calculation result.
MevAndVolumePerClob contains information about the MEV and volume per CLOB.
MevNodeToNodeMetrics is a data structure for encapsulating all MEV node <> node metrics.
MsgBatchCancel is a request type used for batch canceling orders.
MsgBatchCancelResponse is a response type used for batch canceling orders.
MsgCancelOrder is a request type used for canceling orders.
No description provided by the author
No description provided by the author
MsgCancelOrderResponse is a response type used for canceling orders.
MsgCreateClobPair is a message used by x/gov for creating a new clob pair.
MsgCreateClobPairResponse defines the CreateClobPair response type.
MsgPlaceOrder is a request type used for placing orders.
MsgPlaceOrderResponse is a response type used for placing orders.
MsgProposedOperations is a message injected by block proposers to specify the operations that occurred in a block.
MsgProposedOperationsResponse is the response type of the message injected by block proposers to specify the operations that occurred in a block.
MsgUpdateBlockRateLimitConfiguration is the Msg/BlockRateLimitConfiguration request type.
MsgUpdateBlockRateLimitConfiguration is a response type for updating the liquidations config.
MsgUpdateClobPair is a request type used for updating a ClobPair in state.
MsgUpdateClobPairResponse is a response type used for setting a ClobPair's status.
MsgUpdateEquityTierLimitConfiguration is the Msg/EquityTierLimitConfiguration request type.
MsgUpdateEquityTierLimitConfiguration is the Msg/EquityTierLimitConfiguration response type.
MsgUpdateLiquidationsConfig is a request type for updating the liquidations config.
MsgUpdateLiquidationsConfig is the Msg/LiquidationsConfig response type.
Represents a single message added to the OffchainUpdates.
Handles the collection of messages meant for Indexer's off-chain update ingestion.
Operation represents an operation in the proposed operations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OperationRaw represents an operation in the proposed operations.
No description provided by the author
No description provided by the author
No description provided by the author
OperationsStats is a struct that holds stats about a list of operations that were proposed in a block.
OperationsToPropose is a struct encapsulating data required for determining the operations to propose in a block.
Order represents a single order belonging to a `Subaccount` for a particular `ClobPair`.
No description provided by the author
No description provided by the author
OrderBatch represents a batch of orders all belonging to a single clob pair id.
OrderFillState represents the fill amount of an order according to on-chain state.
OrderId refers to a single order belonging to a Subaccount.
OrderRemoval is a request type used for forced removal of stateful orders.
OrdersFilledDuringLatestBlock represents a list of `OrderIds` that were filled by any non-zero amount in the latest block.
PendingOpenOrder is a utility struct used for representing an order a subaccount will open.
PerpetualClobMetadata contains metadata for a `ClobPair` representing a Perpetual product.
PerpetualLiquidationInfo holds information about a liquidation that occurred for a position held by a subaccount.
PositionBlockLimits stores all configurable fields related to limits around how much of a single position can be liquidated within a single block.
PotentiallyPrunableOrders represents a list of orders that may be prunable from state at a future block height.
ProcessProposerMatchesEvents is used for communicating which events occurred in the last block that require updating the state of the memclob in the Commit blocker.
QueryAllClobPairRequest is request type for the ClobPairAll method.
QueryBlockRateLimitConfigurationRequest is a request message for BlockRateLimitConfiguration.
QueryBlockRateLimitConfigurationResponse is a response message that contains the BlockRateLimitConfiguration.
QueryClobPairAllResponse is response type for the ClobPairAll method.
QueryClobPairResponse is response type for the ClobPair method.
QueryEquityTierLimitConfigurationRequest is a request message for EquityTierLimitConfiguration.
QueryEquityTierLimitConfigurationResponse is a response message that contains the EquityTierLimitConfiguration.
QueryGetClobPairRequest is request type for the ClobPair method.
QueryLiquidationsConfigurationRequest is a request message for LiquidationsConfiguration.
QueryLiquidationsConfigurationResponse is a response message that contains the LiquidationsConfiguration.
QueryStatefulOrderRequest is a request message for StatefulOrder.
QueryStatefulOrderResponse is a response message that contains the stateful order.
PerpetualClobMetadata contains metadata for a `ClobPair` representing a Spot product.
StagedFinalizeBlockEvent is an event staged during `FinalizeBlock`.
No description provided by the author
No description provided by the author
No description provided by the author
StatefulOrderTimeSliceValue represents the type of the value of the `StatefulOrdersTimeSlice` in state.
StreamLiquidationOrder represents an protocol-generated IOC liquidation order.
StreamOrderbookFill provides information on an orderbook fill.
StreamOrderbookUpdate provides information on an orderbook update.
StreamOrderbookUpdatesRequest is a request message for the StreamOrderbookUpdates method.
StreamOrderbookUpdatesResponse is a response message for the StreamOrderbookUpdates method.
StreamTakerOrder provides information on a taker order that was attempted to be matched on the orderbook.
No description provided by the author
No description provided by the author
StreamTakerOrderStatus is a representation of a taker order after it is attempted to be matched on the orderbook.
StreamUpdate is an update that will be pushed through the GRPC stream.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SubaccountBlockLimits stores all configurable fields related to limits around how many quote quantums from a single subaccount can be liquidated within a single block.
SubaccountLiquidationInfo holds liquidation information per-subaccount in the current block.
SubaccountOpenPositionInfo holds information about open positions for a perpetual.
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.
TransactionOrdering represents a unique location in the block where a transaction was placed.
UnimplementedMsgServer can be embedded to have forward compatible implementations.
UnimplementedQueryServer can be embedded to have forward compatible implementations.
ValidatorMevMatches contains all matches from the validator's local operations queue.

# Interfaces

AccountKeeper defines the expected account keeper used for simulations.
No description provided by the author
No description provided by the author
BankKeeper defines the expected bank keeper used for simulations.
No description provided by the author
No description provided by the author
No description provided by the author
LiquidationsConfigKeeper is an interface that encapsulates all reads and writes to the liquidation configuration values written to state.
LiquidationsKeeper is an interface that encapsulates all reads and writes to the in-memory data structures that store liquidation information.
MatchableOrder is an interface that a matchable order must conform to.
MemClob is an interface that encapsulates all reads and writes to the CLOB's in-memory data structures.
No description provided by the author
MsgClient is the client API for Msg service.
MsgServer is the server API for Msg service.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
QueryClient is the client API for Query service.
QueryServer is the server API for Query service.
No description provided by the author
No description provided by the author
StatefulOrderPlacement represents any type of order placement that is stored in state.
No description provided by the author
No description provided by the author

# Type aliases

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.
Status of the CLOB.
No description provided by the author
FillType represents the type of the fill.
GetStatePositionFn defines a function interface that can be used for getting the position size of an order in state.
No description provided by the author
No description provided by the author
Represents the side of the orderbook the order will be placed on.
TimeInForce indicates how long an order will remain active before it is executed or expires.
OrderHash is used to represent the SHA256 hash of an order.
No description provided by the author
OrderStatus represents the status of an order after attempting to place it on the orderbook.
SortedClobPairId is type alias for `[]ClobPairId` which supports deterministic sorting of clob pair Ids.
SortedLongTermOrderPlacements is type alias for `[]LongTermOrderPlacement` which supports deterministic sorting.
No description provided by the author
SortedOrders is type alias for `*OrderId` which supports deterministic sorting.
SortedStatefulOrderPlacement is type alias for `[]StatefulOrderPlacement` which supports deterministic sorting.
Subticks is used to represent the price level that an order will be placed on the orderbook.
SubticksPerTick is used to represent how many subticks are in one tick.