Documentation
¶
Index ¶
- Variables
- type ClobPairStatus
- type IndexerAssetPosition
- func (*IndexerAssetPosition) Descriptor() ([]byte, []int)
- func (m *IndexerAssetPosition) GetAssetId() uint32
- func (m *IndexerAssetPosition) GetIndex() uint64
- func (m *IndexerAssetPosition) Marshal() (dAtA []byte, err error)
- func (m *IndexerAssetPosition) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexerAssetPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexerAssetPosition) ProtoMessage()
- func (m *IndexerAssetPosition) Reset()
- func (m *IndexerAssetPosition) Size() (n int)
- func (m *IndexerAssetPosition) String() string
- func (m *IndexerAssetPosition) Unmarshal(dAtA []byte) error
- func (m *IndexerAssetPosition) XXX_DiscardUnknown()
- func (m *IndexerAssetPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexerAssetPosition) XXX_Merge(src proto.Message)
- func (m *IndexerAssetPosition) XXX_Size() int
- func (m *IndexerAssetPosition) XXX_Unmarshal(b []byte) error
- type IndexerOrder
- func (*IndexerOrder) Descriptor() ([]byte, []int)
- func (m *IndexerOrder) GetClientMetadata() uint32
- func (m *IndexerOrder) GetConditionType() IndexerOrder_ConditionType
- func (m *IndexerOrder) GetConditionalOrderTriggerSubticks() uint64
- func (m *IndexerOrder) GetGoodTilBlock() uint32
- func (m *IndexerOrder) GetGoodTilBlockTime() uint32
- func (m *IndexerOrder) GetGoodTilOneof() isIndexerOrder_GoodTilOneof
- func (m *IndexerOrder) GetOrderId() IndexerOrderId
- func (m *IndexerOrder) GetQuantums() uint64
- func (m *IndexerOrder) GetReduceOnly() bool
- func (m *IndexerOrder) GetRouterFeeOwner() string
- func (m *IndexerOrder) GetRouterFeePpm() int32
- func (m *IndexerOrder) GetSide() IndexerOrder_Side
- func (m *IndexerOrder) GetSubticks() uint64
- func (m *IndexerOrder) GetTimeInForce() IndexerOrder_TimeInForce
- func (m *IndexerOrder) Marshal() (dAtA []byte, err error)
- func (m *IndexerOrder) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexerOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexerOrder) ProtoMessage()
- func (m *IndexerOrder) Reset()
- func (m *IndexerOrder) Size() (n int)
- func (m *IndexerOrder) String() string
- func (m *IndexerOrder) Unmarshal(dAtA []byte) error
- func (m *IndexerOrder) XXX_DiscardUnknown()
- func (m *IndexerOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexerOrder) XXX_Merge(src proto.Message)
- func (*IndexerOrder) XXX_OneofWrappers() []interface{}
- func (m *IndexerOrder) XXX_Size() int
- func (m *IndexerOrder) XXX_Unmarshal(b []byte) error
- type IndexerOrderId
- func (*IndexerOrderId) Descriptor() ([]byte, []int)
- func (m *IndexerOrderId) GetClientId() uint32
- func (m *IndexerOrderId) GetClobPairId() uint32
- func (m *IndexerOrderId) GetOrderFlags() uint32
- func (m *IndexerOrderId) GetSubaccountId() IndexerSubaccountId
- func (m *IndexerOrderId) Marshal() (dAtA []byte, err error)
- func (m *IndexerOrderId) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexerOrderId) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexerOrderId) ProtoMessage()
- func (m *IndexerOrderId) Reset()
- func (m *IndexerOrderId) Size() (n int)
- func (m *IndexerOrderId) String() string
- func (m *IndexerOrderId) Unmarshal(dAtA []byte) error
- func (m *IndexerOrderId) XXX_DiscardUnknown()
- func (m *IndexerOrderId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexerOrderId) XXX_Merge(src proto.Message)
- func (m *IndexerOrderId) XXX_Size() int
- func (m *IndexerOrderId) XXX_Unmarshal(b []byte) error
- type IndexerOrder_ConditionType
- type IndexerOrder_GoodTilBlock
- type IndexerOrder_GoodTilBlockTime
- type IndexerOrder_Side
- type IndexerOrder_TimeInForce
- type IndexerPerpetualPosition
- func (*IndexerPerpetualPosition) Descriptor() ([]byte, []int)
- func (m *IndexerPerpetualPosition) GetPerpYieldsIndex() string
- func (m *IndexerPerpetualPosition) GetPerpetualId() uint32
- func (m *IndexerPerpetualPosition) Marshal() (dAtA []byte, err error)
- func (m *IndexerPerpetualPosition) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexerPerpetualPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexerPerpetualPosition) ProtoMessage()
- func (m *IndexerPerpetualPosition) Reset()
- func (m *IndexerPerpetualPosition) Size() (n int)
- func (m *IndexerPerpetualPosition) String() string
- func (m *IndexerPerpetualPosition) Unmarshal(dAtA []byte) error
- func (m *IndexerPerpetualPosition) XXX_DiscardUnknown()
- func (m *IndexerPerpetualPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexerPerpetualPosition) XXX_Merge(src proto.Message)
- func (m *IndexerPerpetualPosition) XXX_Size() int
- func (m *IndexerPerpetualPosition) XXX_Unmarshal(b []byte) error
- type IndexerSubaccountId
- func (*IndexerSubaccountId) Descriptor() ([]byte, []int)
- func (m *IndexerSubaccountId) GetNumber() uint32
- func (m *IndexerSubaccountId) GetOwner() string
- func (m *IndexerSubaccountId) Marshal() (dAtA []byte, err error)
- func (m *IndexerSubaccountId) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexerSubaccountId) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexerSubaccountId) ProtoMessage()
- func (m *IndexerSubaccountId) Reset()
- func (m *IndexerSubaccountId) Size() (n int)
- func (m *IndexerSubaccountId) String() string
- func (m *IndexerSubaccountId) Unmarshal(dAtA []byte) error
- func (m *IndexerSubaccountId) XXX_DiscardUnknown()
- func (m *IndexerSubaccountId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexerSubaccountId) XXX_Merge(src proto.Message)
- func (m *IndexerSubaccountId) XXX_Size() int
- func (m *IndexerSubaccountId) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthClob = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowClob = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupClob = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSubaccount = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSubaccount = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSubaccount = fmt.Errorf("proto: unexpected end of group") )
var ClobPairStatus_name = map[int32]string{
0: "CLOB_PAIR_STATUS_UNSPECIFIED",
1: "CLOB_PAIR_STATUS_ACTIVE",
2: "CLOB_PAIR_STATUS_PAUSED",
3: "CLOB_PAIR_STATUS_CANCEL_ONLY",
4: "CLOB_PAIR_STATUS_POST_ONLY",
5: "CLOB_PAIR_STATUS_INITIALIZING",
6: "CLOB_PAIR_STATUS_FINAL_SETTLEMENT",
}
var ClobPairStatus_value = map[string]int32{
"CLOB_PAIR_STATUS_UNSPECIFIED": 0,
"CLOB_PAIR_STATUS_ACTIVE": 1,
"CLOB_PAIR_STATUS_PAUSED": 2,
"CLOB_PAIR_STATUS_CANCEL_ONLY": 3,
"CLOB_PAIR_STATUS_POST_ONLY": 4,
"CLOB_PAIR_STATUS_INITIALIZING": 5,
"CLOB_PAIR_STATUS_FINAL_SETTLEMENT": 6,
}
var IndexerOrder_ConditionType_name = map[int32]string{
0: "CONDITION_TYPE_UNSPECIFIED",
1: "CONDITION_TYPE_STOP_LOSS",
2: "CONDITION_TYPE_TAKE_PROFIT",
}
var IndexerOrder_ConditionType_value = map[string]int32{
"CONDITION_TYPE_UNSPECIFIED": 0,
"CONDITION_TYPE_STOP_LOSS": 1,
"CONDITION_TYPE_TAKE_PROFIT": 2,
}
var IndexerOrder_Side_name = map[int32]string{
0: "SIDE_UNSPECIFIED",
1: "SIDE_BUY",
2: "SIDE_SELL",
}
var IndexerOrder_Side_value = map[string]int32{
"SIDE_UNSPECIFIED": 0,
"SIDE_BUY": 1,
"SIDE_SELL": 2,
}
var IndexerOrder_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 IndexerOrder_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,
}
Functions ¶
This section is empty.
Types ¶
type ClobPairStatus ¶
type ClobPairStatus int32
Status of the CLOB. Defined in clob.clob_pair
const ( // Default value. This value is invalid and unused. ClobPairStatus_CLOB_PAIR_STATUS_UNSPECIFIED ClobPairStatus = 0 // CLOB_PAIR_STATUS_ACTIVE behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPairStatus_CLOB_PAIR_STATUS_ACTIVE ClobPairStatus = 1 // CLOB_PAIR_STATUS_PAUSED behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPairStatus_CLOB_PAIR_STATUS_PAUSED ClobPairStatus = 2 // CLOB_PAIR_STATUS_CANCEL_ONLY behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPairStatus_CLOB_PAIR_STATUS_CANCEL_ONLY ClobPairStatus = 3 // CLOB_PAIR_STATUS_POST_ONLY behavior is unfinalized. // TODO(DEC-600): update this documentation. ClobPairStatus_CLOB_PAIR_STATUS_POST_ONLY ClobPairStatus = 4 // CLOB_PAIR_STATUS_INITIALIZING represents a newly-added clob pair. // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPairStatus_CLOB_PAIR_STATUS_INITIALIZING ClobPairStatus = 5 // CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been // deactivated. Clob pairs in this state do not accept new orders and trading // is blocked. All open positions are closed and open stateful orders canceled // by the protocol when the clob pair transitions to this status. All // short-term orders are left to expire. ClobPairStatus_CLOB_PAIR_STATUS_FINAL_SETTLEMENT ClobPairStatus = 6 )
func (ClobPairStatus) EnumDescriptor ¶
func (ClobPairStatus) EnumDescriptor() ([]byte, []int)
func (ClobPairStatus) String ¶
func (x ClobPairStatus) String() string
type IndexerAssetPosition ¶
type IndexerAssetPosition struct {
// The `Id` of the `Asset`.
AssetId uint32 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
// The absolute size of the position in base quantums.
Quantums github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 149-byte string literal not displayed */
// The `Index` (either `LongIndex` or `ShortIndex`) of the `Asset` the last
// time this position was settled
// TODO(DEC-582): pending margin trading being added.
Index uint64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
}
IndexerAssetPosition define an account’s positions of an `Asset`. Therefore they hold any information needed to trade on Spot and Margin.
func (*IndexerAssetPosition) Descriptor ¶
func (*IndexerAssetPosition) Descriptor() ([]byte, []int)
func (*IndexerAssetPosition) GetAssetId ¶
func (m *IndexerAssetPosition) GetAssetId() uint32
func (*IndexerAssetPosition) GetIndex ¶
func (m *IndexerAssetPosition) GetIndex() uint64
func (*IndexerAssetPosition) Marshal ¶
func (m *IndexerAssetPosition) Marshal() (dAtA []byte, err error)
func (*IndexerAssetPosition) MarshalTo ¶
func (m *IndexerAssetPosition) MarshalTo(dAtA []byte) (int, error)
func (*IndexerAssetPosition) MarshalToSizedBuffer ¶
func (m *IndexerAssetPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerAssetPosition) ProtoMessage ¶
func (*IndexerAssetPosition) ProtoMessage()
func (*IndexerAssetPosition) Reset ¶
func (m *IndexerAssetPosition) Reset()
func (*IndexerAssetPosition) Size ¶
func (m *IndexerAssetPosition) Size() (n int)
func (*IndexerAssetPosition) String ¶
func (m *IndexerAssetPosition) String() string
func (*IndexerAssetPosition) Unmarshal ¶
func (m *IndexerAssetPosition) Unmarshal(dAtA []byte) error
func (*IndexerAssetPosition) XXX_DiscardUnknown ¶
func (m *IndexerAssetPosition) XXX_DiscardUnknown()
func (*IndexerAssetPosition) XXX_Marshal ¶
func (m *IndexerAssetPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexerAssetPosition) XXX_Merge ¶
func (m *IndexerAssetPosition) XXX_Merge(src proto.Message)
func (*IndexerAssetPosition) XXX_Size ¶
func (m *IndexerAssetPosition) XXX_Size() int
func (*IndexerAssetPosition) XXX_Unmarshal ¶
func (m *IndexerAssetPosition) XXX_Unmarshal(b []byte) error
type IndexerOrder ¶
type IndexerOrder struct {
// The unique ID of this order. Meant to be unique across all orders.
OrderId IndexerOrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"`
Side IndexerOrder_Side `protobuf:"varint,2,opt,name=side,proto3,enum=klyraprotocol.indexer.protocol.v1.IndexerOrder_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:
// *IndexerOrder_GoodTilBlock
// *IndexerOrder_GoodTilBlockTime
GoodTilOneof isIndexerOrder_GoodTilOneof `protobuf_oneof:"good_til_oneof"`
// The time in force of this order.
TimeInForce IndexerOrder_TimeInForce `` /* 161-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 IndexerOrder_ConditionType `` /* 168-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"`
// Router fee owner.
RouterFeeOwner string `protobuf:"bytes,13,opt,name=router_fee_owner,json=routerFeeOwner,proto3" json:"router_fee_owner,omitempty"`
}
IndexerOrderV1 represents a single order belonging to a `Subaccount` for a particular `ClobPair`.
func (*IndexerOrder) Descriptor ¶
func (*IndexerOrder) Descriptor() ([]byte, []int)
func (*IndexerOrder) GetClientMetadata ¶
func (m *IndexerOrder) GetClientMetadata() uint32
func (*IndexerOrder) GetConditionType ¶
func (m *IndexerOrder) GetConditionType() IndexerOrder_ConditionType
func (*IndexerOrder) GetConditionalOrderTriggerSubticks ¶
func (m *IndexerOrder) GetConditionalOrderTriggerSubticks() uint64
func (*IndexerOrder) GetGoodTilBlock ¶
func (m *IndexerOrder) GetGoodTilBlock() uint32
func (*IndexerOrder) GetGoodTilBlockTime ¶
func (m *IndexerOrder) GetGoodTilBlockTime() uint32
func (*IndexerOrder) GetGoodTilOneof ¶
func (m *IndexerOrder) GetGoodTilOneof() isIndexerOrder_GoodTilOneof
func (*IndexerOrder) GetOrderId ¶
func (m *IndexerOrder) GetOrderId() IndexerOrderId
func (*IndexerOrder) GetQuantums ¶
func (m *IndexerOrder) GetQuantums() uint64
func (*IndexerOrder) GetReduceOnly ¶
func (m *IndexerOrder) GetReduceOnly() bool
func (*IndexerOrder) GetRouterFeeOwner ¶
func (m *IndexerOrder) GetRouterFeeOwner() string
func (*IndexerOrder) GetRouterFeePpm ¶
func (m *IndexerOrder) GetRouterFeePpm() int32
func (*IndexerOrder) GetSide ¶
func (m *IndexerOrder) GetSide() IndexerOrder_Side
func (*IndexerOrder) GetSubticks ¶
func (m *IndexerOrder) GetSubticks() uint64
func (*IndexerOrder) GetTimeInForce ¶
func (m *IndexerOrder) GetTimeInForce() IndexerOrder_TimeInForce
func (*IndexerOrder) Marshal ¶
func (m *IndexerOrder) Marshal() (dAtA []byte, err error)
func (*IndexerOrder) MarshalToSizedBuffer ¶
func (m *IndexerOrder) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerOrder) ProtoMessage ¶
func (*IndexerOrder) ProtoMessage()
func (*IndexerOrder) Reset ¶
func (m *IndexerOrder) Reset()
func (*IndexerOrder) Size ¶
func (m *IndexerOrder) Size() (n int)
func (*IndexerOrder) String ¶
func (m *IndexerOrder) String() string
func (*IndexerOrder) Unmarshal ¶
func (m *IndexerOrder) Unmarshal(dAtA []byte) error
func (*IndexerOrder) XXX_DiscardUnknown ¶
func (m *IndexerOrder) XXX_DiscardUnknown()
func (*IndexerOrder) XXX_Marshal ¶
func (m *IndexerOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexerOrder) XXX_Merge ¶
func (m *IndexerOrder) XXX_Merge(src proto.Message)
func (*IndexerOrder) XXX_OneofWrappers ¶
func (*IndexerOrder) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*IndexerOrder) XXX_Size ¶
func (m *IndexerOrder) XXX_Size() int
func (*IndexerOrder) XXX_Unmarshal ¶
func (m *IndexerOrder) XXX_Unmarshal(b []byte) error
type IndexerOrderId ¶
type IndexerOrderId 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 IndexerSubaccountId `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"`
}
IndexerOrderId refers to a single order belonging to a Subaccount.
func (*IndexerOrderId) Descriptor ¶
func (*IndexerOrderId) Descriptor() ([]byte, []int)
func (*IndexerOrderId) GetClientId ¶
func (m *IndexerOrderId) GetClientId() uint32
func (*IndexerOrderId) GetClobPairId ¶
func (m *IndexerOrderId) GetClobPairId() uint32
func (*IndexerOrderId) GetOrderFlags ¶
func (m *IndexerOrderId) GetOrderFlags() uint32
func (*IndexerOrderId) GetSubaccountId ¶
func (m *IndexerOrderId) GetSubaccountId() IndexerSubaccountId
func (*IndexerOrderId) Marshal ¶
func (m *IndexerOrderId) Marshal() (dAtA []byte, err error)
func (*IndexerOrderId) MarshalToSizedBuffer ¶
func (m *IndexerOrderId) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerOrderId) ProtoMessage ¶
func (*IndexerOrderId) ProtoMessage()
func (*IndexerOrderId) Reset ¶
func (m *IndexerOrderId) Reset()
func (*IndexerOrderId) Size ¶
func (m *IndexerOrderId) Size() (n int)
func (*IndexerOrderId) String ¶
func (m *IndexerOrderId) String() string
func (*IndexerOrderId) Unmarshal ¶
func (m *IndexerOrderId) Unmarshal(dAtA []byte) error
func (*IndexerOrderId) XXX_DiscardUnknown ¶
func (m *IndexerOrderId) XXX_DiscardUnknown()
func (*IndexerOrderId) XXX_Marshal ¶
func (m *IndexerOrderId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexerOrderId) XXX_Merge ¶
func (m *IndexerOrderId) XXX_Merge(src proto.Message)
func (*IndexerOrderId) XXX_Size ¶
func (m *IndexerOrderId) XXX_Size() int
func (*IndexerOrderId) XXX_Unmarshal ¶
func (m *IndexerOrderId) XXX_Unmarshal(b []byte) error
type IndexerOrder_ConditionType ¶
type IndexerOrder_ConditionType int32
const ( // CONDITION_TYPE_UNSPECIFIED represents the default behavior where an // order will be placed immediately on the orderbook. IndexerOrder_CONDITION_TYPE_UNSPECIFIED IndexerOrder_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. IndexerOrder_CONDITION_TYPE_STOP_LOSS IndexerOrder_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. IndexerOrder_CONDITION_TYPE_TAKE_PROFIT IndexerOrder_ConditionType = 2 )
func (IndexerOrder_ConditionType) EnumDescriptor ¶
func (IndexerOrder_ConditionType) EnumDescriptor() ([]byte, []int)
func (IndexerOrder_ConditionType) String ¶
func (x IndexerOrder_ConditionType) String() string
type IndexerOrder_GoodTilBlock ¶
type IndexerOrder_GoodTilBlock struct {
GoodTilBlock uint32 `protobuf:"varint,5,opt,name=good_til_block,json=goodTilBlock,proto3,oneof" json:"good_til_block,omitempty"`
}
func (*IndexerOrder_GoodTilBlock) MarshalTo ¶
func (m *IndexerOrder_GoodTilBlock) MarshalTo(dAtA []byte) (int, error)
func (*IndexerOrder_GoodTilBlock) MarshalToSizedBuffer ¶
func (m *IndexerOrder_GoodTilBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerOrder_GoodTilBlock) Size ¶
func (m *IndexerOrder_GoodTilBlock) Size() (n int)
type IndexerOrder_GoodTilBlockTime ¶
type IndexerOrder_GoodTilBlockTime struct {
GoodTilBlockTime uint32 `protobuf:"fixed32,6,opt,name=good_til_block_time,json=goodTilBlockTime,proto3,oneof" json:"good_til_block_time,omitempty"`
}
func (*IndexerOrder_GoodTilBlockTime) MarshalTo ¶
func (m *IndexerOrder_GoodTilBlockTime) MarshalTo(dAtA []byte) (int, error)
func (*IndexerOrder_GoodTilBlockTime) MarshalToSizedBuffer ¶
func (m *IndexerOrder_GoodTilBlockTime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerOrder_GoodTilBlockTime) Size ¶
func (m *IndexerOrder_GoodTilBlockTime) Size() (n int)
type IndexerOrder_Side ¶
type IndexerOrder_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. IndexerOrder_SIDE_UNSPECIFIED IndexerOrder_Side = 0 // SIDE_BUY is used to represent a BUY order. IndexerOrder_SIDE_BUY IndexerOrder_Side = 1 // SIDE_SELL is used to represent a SELL order. IndexerOrder_SIDE_SELL IndexerOrder_Side = 2 )
func (IndexerOrder_Side) EnumDescriptor ¶
func (IndexerOrder_Side) EnumDescriptor() ([]byte, []int)
func (IndexerOrder_Side) String ¶
func (x IndexerOrder_Side) String() string
type IndexerOrder_TimeInForce ¶
type IndexerOrder_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. IndexerOrder_TIME_IN_FORCE_UNSPECIFIED IndexerOrder_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. IndexerOrder_TIME_IN_FORCE_IOC IndexerOrder_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. IndexerOrder_TIME_IN_FORCE_POST_ONLY IndexerOrder_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. IndexerOrder_TIME_IN_FORCE_FILL_OR_KILL IndexerOrder_TimeInForce = 3 )
func (IndexerOrder_TimeInForce) EnumDescriptor ¶
func (IndexerOrder_TimeInForce) EnumDescriptor() ([]byte, []int)
func (IndexerOrder_TimeInForce) String ¶
func (x IndexerOrder_TimeInForce) String() string
type IndexerPerpetualPosition ¶
type IndexerPerpetualPosition struct {
// The `Id` of the `Perpetual`.
PerpetualId uint32 `protobuf:"varint,1,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"`
// The size of the position in base quantums.
Quantums github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 149-byte string literal not displayed */
// The funding_index of the `Perpetual` the last time this position was
// settled.
FundingIndex github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 177-byte string literal not displayed */
// Amount of funding payment (in quote quantums).
// Note: 1. this field is not cumulative.
// 2. a positive value means funding payment was paid out and
// a negative value means funding payment was received.
FundingPayment github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 183-byte string literal not displayed */
// The current yields index last time this position was settled.
// Should be converted from string to big.Rat.
PerpYieldsIndex string `protobuf:"bytes,5,opt,name=perp_yields_index,json=perpYieldsIndex,proto3" json:"perp_yields_index,omitempty"`
}
IndexerPerpetualPosition are an account’s positions of a `Perpetual`. Therefore they hold any information needed to trade perpetuals.
func (*IndexerPerpetualPosition) Descriptor ¶
func (*IndexerPerpetualPosition) Descriptor() ([]byte, []int)
func (*IndexerPerpetualPosition) GetPerpYieldsIndex ¶
func (m *IndexerPerpetualPosition) GetPerpYieldsIndex() string
func (*IndexerPerpetualPosition) GetPerpetualId ¶
func (m *IndexerPerpetualPosition) GetPerpetualId() uint32
func (*IndexerPerpetualPosition) Marshal ¶
func (m *IndexerPerpetualPosition) Marshal() (dAtA []byte, err error)
func (*IndexerPerpetualPosition) MarshalTo ¶
func (m *IndexerPerpetualPosition) MarshalTo(dAtA []byte) (int, error)
func (*IndexerPerpetualPosition) MarshalToSizedBuffer ¶
func (m *IndexerPerpetualPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerPerpetualPosition) ProtoMessage ¶
func (*IndexerPerpetualPosition) ProtoMessage()
func (*IndexerPerpetualPosition) Reset ¶
func (m *IndexerPerpetualPosition) Reset()
func (*IndexerPerpetualPosition) Size ¶
func (m *IndexerPerpetualPosition) Size() (n int)
func (*IndexerPerpetualPosition) String ¶
func (m *IndexerPerpetualPosition) String() string
func (*IndexerPerpetualPosition) Unmarshal ¶
func (m *IndexerPerpetualPosition) Unmarshal(dAtA []byte) error
func (*IndexerPerpetualPosition) XXX_DiscardUnknown ¶
func (m *IndexerPerpetualPosition) XXX_DiscardUnknown()
func (*IndexerPerpetualPosition) XXX_Marshal ¶
func (m *IndexerPerpetualPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexerPerpetualPosition) XXX_Merge ¶
func (m *IndexerPerpetualPosition) XXX_Merge(src proto.Message)
func (*IndexerPerpetualPosition) XXX_Size ¶
func (m *IndexerPerpetualPosition) XXX_Size() int
func (*IndexerPerpetualPosition) XXX_Unmarshal ¶
func (m *IndexerPerpetualPosition) XXX_Unmarshal(b []byte) error
type IndexerSubaccountId ¶
type IndexerSubaccountId struct {
// The address of the wallet that owns this subaccount.
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
// < 128 Since 128 should be enough to start and it fits within
// 1 Byte (1 Bit needed to indicate that the first byte is the last).
Number uint32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
}
IndexerSubaccountId defines a unique identifier for a Subaccount.
func (*IndexerSubaccountId) Descriptor ¶
func (*IndexerSubaccountId) Descriptor() ([]byte, []int)
func (*IndexerSubaccountId) GetNumber ¶
func (m *IndexerSubaccountId) GetNumber() uint32
func (*IndexerSubaccountId) GetOwner ¶
func (m *IndexerSubaccountId) GetOwner() string
func (*IndexerSubaccountId) Marshal ¶
func (m *IndexerSubaccountId) Marshal() (dAtA []byte, err error)
func (*IndexerSubaccountId) MarshalTo ¶
func (m *IndexerSubaccountId) MarshalTo(dAtA []byte) (int, error)
func (*IndexerSubaccountId) MarshalToSizedBuffer ¶
func (m *IndexerSubaccountId) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexerSubaccountId) ProtoMessage ¶
func (*IndexerSubaccountId) ProtoMessage()
func (*IndexerSubaccountId) Reset ¶
func (m *IndexerSubaccountId) Reset()
func (*IndexerSubaccountId) Size ¶
func (m *IndexerSubaccountId) Size() (n int)
func (*IndexerSubaccountId) String ¶
func (m *IndexerSubaccountId) String() string
func (*IndexerSubaccountId) Unmarshal ¶
func (m *IndexerSubaccountId) Unmarshal(dAtA []byte) error
func (*IndexerSubaccountId) XXX_DiscardUnknown ¶
func (m *IndexerSubaccountId) XXX_DiscardUnknown()
func (*IndexerSubaccountId) XXX_Marshal ¶
func (m *IndexerSubaccountId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexerSubaccountId) XXX_Merge ¶
func (m *IndexerSubaccountId) XXX_Merge(src proto.Message)
func (*IndexerSubaccountId) XXX_Size ¶
func (m *IndexerSubaccountId) XXX_Size() int
func (*IndexerSubaccountId) XXX_Unmarshal ¶
func (m *IndexerSubaccountId) XXX_Unmarshal(b []byte) error