Documentation ¶
Index ¶
- func GenerateClobPair(optionalModifications ...ClobModifierOption) *clobtypes.ClobPair
- func MustPerpetualId(clobPair clobtypes.ClobPair) uint32
- func NewDeleveragingMatchOperation(liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, ...) types.Operation
- func NewMatchOperation(takerMatchableOrder types.MatchableOrder, makerFills []types.MakerFill) types.Operation
- func NewMatchOperationFromPerpetualDeleveragingLiquidation(perpDeleveraging types.MatchPerpetualDeleveraging) types.Operation
- func NewMatchOperationFromPerpetualLiquidation(perpLiquidation types.MatchPerpetualLiquidation) types.Operation
- func NewMatchOperationRaw(takerMatchableOrder types.MatchableOrder, makerFills []types.MakerFill) types.OperationRaw
- func NewMatchOperationRawFromPerpetualDeleveragingLiquidation(perpDeleveraging types.MatchPerpetualDeleveraging) types.OperationRaw
- func NewMatchOperationRawFromPerpetualLiquidation(perpLiquidation types.MatchPerpetualLiquidation) types.OperationRaw
- func NewOrderCancellationOperation(msgCancelOrder *types.MsgCancelOrder) types.Operation
- func NewOrderPlacementOperation(order types.Order) types.Operation
- func NewOrderRemovalOperationRaw(orderId types.OrderId, reason types.OrderRemoval_RemovalReason) types.OperationRaw
- func NewPreexistingStatefulOrderPlacementOperation(order types.Order) types.Operation
- func NewShortTermOrderPlacementOperationRaw(order types.Order) types.OperationRaw
- type ClobModifierOption
- func WithId(id uint32) ClobModifierOption
- func WithPerpetualId(perpetualId uint32) ClobModifierOption
- func WithPerpetualMetadata(metadata *clobtypes.ClobPair_PerpetualClobMetadata) ClobModifierOption
- func WithQuantumConversionExponent(exponent int32) ClobModifierOption
- func WithSpotMetadata(metadata *clobtypes.ClobPair_SpotClobMetadata) ClobModifierOption
- func WithStatus(status clobtypes.ClobPair_Status) ClobModifierOption
- func WithStepBaseQuantums(bq satypes.BaseQuantums) ClobModifierOption
- func WithSubticksPerTick(subticks uint32) ClobModifierOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateClobPair ¶
func GenerateClobPair(optionalModifications ...ClobModifierOption) *clobtypes.ClobPair
GenerateClobPair returns a `ClobPair` object set to default values. Passing in `ClobModifierOption` methods alters the value of the `ClobPair` returned. It will start with the default, valid `ClobPair` value defined within the method and make the requested modifications before returning the object.
Example usage: `GenerateClobPair(WithQuantumConversionExponent(25))` This will start with the default `ClobPair` object defined within the method and return the newly-created object after overriding the values of `QuantumConversionExponent` to 25.
func MustPerpetualId ¶
MustPerpetualId is a wrapper around ClobPair.GetPerpetualId() which panics if an error is returned.
func NewDeleveragingMatchOperation ¶
func NewDeleveragingMatchOperation( liquidatedSubaccountId satypes.SubaccountId, perpetualId uint32, fills []types.MatchPerpetualDeleveraging_Fill, ) types.Operation
NewDeleveragingMatchOperation returns a new match operation for deleveraging against a undercollateralized subaccount that has failed liquidation.
func NewMatchOperation ¶
func NewMatchOperation( takerMatchableOrder types.MatchableOrder, makerFills []types.MakerFill, ) types.Operation
NewMatchOperation returns a new operation for matching maker orders against a matchable order.
func NewMatchOperationFromPerpetualDeleveragingLiquidation ¶
func NewMatchOperationFromPerpetualDeleveragingLiquidation( perpDeleveraging types.MatchPerpetualDeleveraging, ) types.Operation
NewMatchOperationFromPerpetualDeleveragingLiquidation returns a new match operation wrapping the `perpDeleveraging` object.
func NewMatchOperationFromPerpetualLiquidation ¶
func NewMatchOperationFromPerpetualLiquidation(perpLiquidation types.MatchPerpetualLiquidation) types.Operation
NewMatchOperationFromPerpetualLiquidation returns a new match operation wrapping the `perpLiquidation` object.
func NewMatchOperationRaw ¶
func NewMatchOperationRaw( takerMatchableOrder types.MatchableOrder, makerFills []types.MakerFill, ) types.OperationRaw
NewMatchOperationRaw returns a new raw operation for matching maker orders against a matchable order.
func NewMatchOperationRawFromPerpetualDeleveragingLiquidation ¶
func NewMatchOperationRawFromPerpetualDeleveragingLiquidation( perpDeleveraging types.MatchPerpetualDeleveraging, ) types.OperationRaw
NewMatchOperationRawFromPerpetualDeleveragingLiquidation returns a new raw match operation wrapping the `perpDeleveraging` object.
func NewMatchOperationRawFromPerpetualLiquidation ¶
func NewMatchOperationRawFromPerpetualLiquidation( perpLiquidation types.MatchPerpetualLiquidation, ) types.OperationRaw
NewMatchOperationRawFromPerpetualLiquidation returns a new raw match operation wrapping the `perpLiquidation` object.
func NewOrderCancellationOperation ¶
func NewOrderCancellationOperation(msgCancelOrder *types.MsgCancelOrder) types.Operation
NewOrderCancellationOperation returns a new operation for canceling an order.
func NewOrderPlacementOperation ¶
NewOrderPlacementOperation returns a new operation for placing an order.
func NewOrderRemovalOperationRaw ¶
func NewOrderRemovalOperationRaw( orderId types.OrderId, reason types.OrderRemoval_RemovalReason, ) types.OperationRaw
NewOrderRemovalOperationRaw returns a new raw order removal operation.
func NewPreexistingStatefulOrderPlacementOperation ¶
NewPreexistingStatefulOrderPlacementOperation returns a new operation for placing a pre-existing stateful order. Note this function panics if called with a non-stateful order.
func NewShortTermOrderPlacementOperationRaw ¶
func NewShortTermOrderPlacementOperationRaw(order types.Order) types.OperationRaw
NewShortTermOrderPlacementOperationRaw returns a new raw operation for placing an order.
Types ¶
type ClobModifierOption ¶
func WithId ¶
func WithId(id uint32) ClobModifierOption
func WithPerpetualId ¶
func WithPerpetualId(perpetualId uint32) ClobModifierOption
func WithPerpetualMetadata ¶
func WithPerpetualMetadata(metadata *clobtypes.ClobPair_PerpetualClobMetadata) ClobModifierOption
func WithQuantumConversionExponent ¶
func WithQuantumConversionExponent(exponent int32) ClobModifierOption
func WithSpotMetadata ¶
func WithSpotMetadata(metadata *clobtypes.ClobPair_SpotClobMetadata) ClobModifierOption
func WithStatus ¶
func WithStatus(status clobtypes.ClobPair_Status) ClobModifierOption
func WithStepBaseQuantums ¶
func WithStepBaseQuantums(bq satypes.BaseQuantums) ClobModifierOption
func WithSubticksPerTick ¶
func WithSubticksPerTick(subticks uint32) ClobModifierOption