Enum value maps for StreamOrderBookL2UpdateType.
var (
StreamOrderBookL2UpdateType_name = map[string{
0: "UNKNOWN",
1: "SNAPSHOT",
2: "UPDATE",
}
StreamOrderBookL2UpdateType_value = map[int32{
"UNKNOWN": 0,
"SNAPSHOT": 1,
"UPDATE": 2,
}
)
var File_sdk_stream_orderbookl2_v1_order_proto FileDescriptor
var File_sdk_stream_orderbookl2_v1_request_proto FileDescriptor
var File_sdk_stream_orderbookl2_v1_response_proto FileDescriptor
Order is an individual order in the order book.
type Order struct {
// Amount / quantity of asset bought or sold, displayed in base currency.
Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
// Price for quote currency.
Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"`
// contains filtered or unexported fields
}
func (*Order) Descriptor() ([]int)
Deprecated: Use Order.ProtoReflect.Descriptor instead.
func (x *Order) GetAmount() float64
func (x *Order) GetPrice() float64
func (*Order) ProtoMessage()
func (x *Order) ProtoReflect() Message
func (x *Order) Reset()
func (x *Order) String() string
StreamOrderBookL2ReplayRequestV1 is the request message for the orderbook L2 stream.
type StreamOrderBookL2ReplayRequestV1 struct {
// InstrumentCriteria is instrument exchange, class and code, wildcard (*) can be used.
InstrumentCriteria *core.InstrumentCriteria `protobuf:"bytes,1,opt,name=instrument_criteria,json=instrumentCriteria,proto3" json:"instrument_criteria,omitempty"`
// Data interval for replay data.
Interval *core.DataInterval `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"`
// contains filtered or unexported fields
}
func (*StreamOrderBookL2ReplayRequestV1) Descriptor() ([]int)
Deprecated: Use StreamOrderBookL2ReplayRequestV1.ProtoReflect.Descriptor instead.
func (x *StreamOrderBookL2ReplayRequestV1) GetInstrumentCriteria() *core.InstrumentCriteria
func (x *StreamOrderBookL2ReplayRequestV1) GetInterval() *core.DataInterval
func (*StreamOrderBookL2ReplayRequestV1) ProtoMessage()
func (x *StreamOrderBookL2ReplayRequestV1) ProtoReflect() Message
func (x *StreamOrderBookL2ReplayRequestV1) Reset()
func (x *StreamOrderBookL2ReplayRequestV1) String() string
StreamOrderBookL2RequestV1 is the request message for the orderbook L2 stream.
type StreamOrderBookL2RequestV1 struct {
// InstrumentCriteria is instrument exchange, class and code, wildcard (*) can be used.
InstrumentCriteria *core.InstrumentCriteria `protobuf:"bytes,1,opt,name=instrument_criteria,json=instrumentCriteria,proto3" json:"instrument_criteria,omitempty"`
// contains filtered or unexported fields
}
func (*StreamOrderBookL2RequestV1) Descriptor() ([]int)
Deprecated: Use StreamOrderBookL2RequestV1.ProtoReflect.Descriptor instead.
func (x *StreamOrderBookL2RequestV1) GetInstrumentCriteria() *core.InstrumentCriteria
func (*StreamOrderBookL2RequestV1) ProtoMessage()
func (x *StreamOrderBookL2RequestV1) ProtoReflect() Message
func (x *StreamOrderBookL2RequestV1) Reset()
func (x *StreamOrderBookL2RequestV1) String() string
StreamOrderBookL2ResponseV1 is the response of a Level 2 order book event.
type StreamOrderBookL2ResponseV1 struct {
// Instrument class, for example "spot".
Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"`
// Instrument code (currency pair), for example btc-usd.
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// Instrument exchange code, for example "cbse" (Coinbase).
Exchange string `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"`
// Sequence ID for event. Sortable in lexicographic order.
SequenceId string `protobuf:"bytes,4,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
// Event type.
UpdateType StreamOrderBookL2UpdateType `protobuf:"varint,5,opt,name=update_type,json=updateType,proto3,enum=kaikosdk.StreamOrderBookL2UpdateType" json:"update_type,omitempty"`
// Asks is the list of asks of the orderbook.
Asks []*Order `protobuf:"bytes,6,rep,name=asks,proto3" json:"asks,omitempty"`
// Bids is the list of bids of the orderbook.
Bids []*Order `protobuf:"bytes,7,rep,name=bids,proto3" json:"bids,omitempty"`
// Timestamp of the event as provided by the exchange.
TsExchange *core.TimestampValue `protobuf:"bytes,8,opt,name=ts_exchange,json=tsExchange,proto3" json:"ts_exchange,omitempty"`
// Timestamp of collection (event entered Kaiko's infrastructure), before nomalization.
TsCollection *core.TimestampValue `protobuf:"bytes,9,opt,name=ts_collection,json=tsCollection,proto3" json:"ts_collection,omitempty"`
// Event generation timestamp (event created by Kaiko), after normalization.
TsEvent *Timestamp `protobuf:"bytes,10,opt,name=ts_event,json=tsEvent,proto3" json:"ts_event,omitempty"`
// Additionnal properties, specific to the exchange.
AdditionalProperties map[string `protobuf:"bytes,11,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}
func (*StreamOrderBookL2ResponseV1) Descriptor() ([]int)
Deprecated: Use StreamOrderBookL2ResponseV1.ProtoReflect.Descriptor instead.
func (x *StreamOrderBookL2ResponseV1) GetAdditionalProperties() map[string
func (x *StreamOrderBookL2ResponseV1) GetAsks() []*Order
func (x *StreamOrderBookL2ResponseV1) GetBids() []*Order
func (x *StreamOrderBookL2ResponseV1) GetClass() string
func (x *StreamOrderBookL2ResponseV1) GetCode() string
func (x *StreamOrderBookL2ResponseV1) GetExchange() string
func (x *StreamOrderBookL2ResponseV1) GetSequenceId() string
func (x *StreamOrderBookL2ResponseV1) GetTsCollection() *core.TimestampValue
func (x *StreamOrderBookL2ResponseV1) GetTsEvent() *Timestamp
func (x *StreamOrderBookL2ResponseV1) GetTsExchange() *core.TimestampValue
func (x *StreamOrderBookL2ResponseV1) GetUpdateType() StreamOrderBookL2UpdateType
func (*StreamOrderBookL2ResponseV1) ProtoMessage()
func (x *StreamOrderBookL2ResponseV1) ProtoReflect() Message
func (x *StreamOrderBookL2ResponseV1) Reset()
func (x *StreamOrderBookL2ResponseV1) String() string
StreamOrderBookL2UpdateType is the type of an order book event.
type StreamOrderBookL2UpdateType int32
const (
// Unknown type.
StreamOrderBookL2UpdateType_UNKNOWN StreamOrderBookL2UpdateType = 0
// Order book snapshot.
StreamOrderBookL2UpdateType_SNAPSHOT StreamOrderBookL2UpdateType = 1
// Order book update.
StreamOrderBookL2UpdateType_UPDATE StreamOrderBookL2UpdateType = 2
)
func (StreamOrderBookL2UpdateType) Descriptor() EnumDescriptor
func (x StreamOrderBookL2UpdateType) Enum() *StreamOrderBookL2UpdateType
func (StreamOrderBookL2UpdateType) EnumDescriptor() ([]int)
Deprecated: Use StreamOrderBookL2UpdateType.Descriptor instead.
func (x StreamOrderBookL2UpdateType) Number() EnumNumber
func (x StreamOrderBookL2UpdateType) String() string
func (StreamOrderBookL2UpdateType) Type() EnumType