Enum value maps for StreamMarketUpdateCommodity.
var (
StreamMarketUpdateCommodity_name = map[string{
0: "SMUC_UNKNOWN",
1: "SMUC_TRADE",
2: "SMUC_TOP_OF_BOOK",
3: "SMUC_FULL_ORDER_BOOK",
}
StreamMarketUpdateCommodity_value = map[int32{
"SMUC_UNKNOWN": 0,
"SMUC_TRADE": 1,
"SMUC_TOP_OF_BOOK": 2,
"SMUC_FULL_ORDER_BOOK": 3,
}
)
Enum value maps for StreamMarketUpdateRequestV1_OrderbookSnapshotType.
var (
StreamMarketUpdateRequestV1_OrderbookSnapshotType_name = map[string{
0: "UNKNOWN",
1: "TEN_PERCENT",
2: "FULL",
}
StreamMarketUpdateRequestV1_OrderbookSnapshotType_value = map[int32{
"UNKNOWN": 0,
"TEN_PERCENT": 1,
"FULL": 2,
}
)
Enum value maps for StreamMarketUpdateResponseV1_StreamMarketUpdateType.
var (
StreamMarketUpdateResponseV1_StreamMarketUpdateType_name = map[string{
0: "UNKNOWN",
1: "TRADE_BUY",
2: "TRADE_SELL",
9: "TRADE_UNKNOWN",
3: "BEST_ASK",
4: "BEST_BID",
5: "UPDATED_ASK",
6: "UPDATED_BID",
7: "SNAPSHOT",
8: "FORCE_SNAPSHOT",
}
StreamMarketUpdateResponseV1_StreamMarketUpdateType_value = map[int32{
"UNKNOWN": 0,
"TRADE_BUY": 1,
"TRADE_SELL": 2,
"TRADE_UNKNOWN": 9,
"BEST_ASK": 3,
"BEST_BID": 4,
"UPDATED_ASK": 5,
"UPDATED_BID": 6,
"SNAPSHOT": 7,
"FORCE_SNAPSHOT": 8,
}
)
var File_sdk_stream_market_update_v1_commodity_proto FileDescriptor
var File_sdk_stream_market_update_v1_request_proto FileDescriptor
var File_sdk_stream_market_update_v1_response_proto FileDescriptor
StreamMarketUpdateCommodity allows selecting kind of market update wanted.
type StreamMarketUpdateCommodity int32
const (
// Unknown commodity.
StreamMarketUpdateCommodity_SMUC_UNKNOWN StreamMarketUpdateCommodity = 0
// TRADE commodity.
StreamMarketUpdateCommodity_SMUC_TRADE StreamMarketUpdateCommodity = 1
// TOP_OF_BOOK commodity.
StreamMarketUpdateCommodity_SMUC_TOP_OF_BOOK StreamMarketUpdateCommodity = 2
// FULL_ORDER_BOOK commodity.
StreamMarketUpdateCommodity_SMUC_FULL_ORDER_BOOK StreamMarketUpdateCommodity = 3
)
func (StreamMarketUpdateCommodity) Descriptor() EnumDescriptor
func (x StreamMarketUpdateCommodity) Enum() *StreamMarketUpdateCommodity
func (StreamMarketUpdateCommodity) EnumDescriptor() ([]int)
Deprecated: Use StreamMarketUpdateCommodity.Descriptor instead.
func (x StreamMarketUpdateCommodity) Number() EnumNumber
func (x StreamMarketUpdateCommodity) String() string
func (StreamMarketUpdateCommodity) Type() EnumType
StreamMarketUpdateRequestV1
type StreamMarketUpdateRequestV1 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"`
// Enum indicating type of feed. If no commodity is specified, you get all commodities by default, otherwise you get only specified commodities.
Commodities []StreamMarketUpdateCommodity `protobuf:"varint,2,rep,packed,name=commodities,proto3,enum=kaikosdk.StreamMarketUpdateCommodity" json:"commodities,omitempty"`
// Data interval. For historical data only.
Interval *core.DataInterval `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"`
// SnapshotType is the type of snapshot if commodities contains orderbook.
// This field is deprecated and used anymore, only full snapshot are sent.
//
// Deprecated: Marked as deprecated in sdk/stream/market_update_v1/request.proto.
SnapshotType StreamMarketUpdateRequestV1_OrderbookSnapshotType `protobuf:"varint,4,opt,name=snapshot_type,json=snapshotType,proto3,enum=kaikosdk.StreamMarketUpdateRequestV1_OrderbookSnapshotType" json:"snapshot_type,omitempty"`
// contains filtered or unexported fields
}
func (*StreamMarketUpdateRequestV1) Descriptor() ([]int)
Deprecated: Use StreamMarketUpdateRequestV1.ProtoReflect.Descriptor instead.
func (x *StreamMarketUpdateRequestV1) GetCommodities() []StreamMarketUpdateCommodity
func (x *StreamMarketUpdateRequestV1) GetInstrumentCriteria() *core.InstrumentCriteria
func (x *StreamMarketUpdateRequestV1) GetInterval() *core.DataInterval
func (x *StreamMarketUpdateRequestV1) GetSnapshotType() StreamMarketUpdateRequestV1_OrderbookSnapshotType
Deprecated: Marked as deprecated in sdk/stream/market_update_v1/request.proto.
func (*StreamMarketUpdateRequestV1) ProtoMessage()
func (x *StreamMarketUpdateRequestV1) ProtoReflect() Message
func (x *StreamMarketUpdateRequestV1) Reset()
func (x *StreamMarketUpdateRequestV1) String() string
OrderbookSnapshotType
type StreamMarketUpdateRequestV1_OrderbookSnapshotType int32
const (
// UNKNOWN means no snapshot is sent.
StreamMarketUpdateRequestV1_UNKNOWN StreamMarketUpdateRequestV1_OrderbookSnapshotType = 0
// TEN_PERCENT is ob10%.
StreamMarketUpdateRequestV1_TEN_PERCENT StreamMarketUpdateRequestV1_OrderbookSnapshotType = 1
// FULL is full orderbook.
StreamMarketUpdateRequestV1_FULL StreamMarketUpdateRequestV1_OrderbookSnapshotType = 2
)
func (StreamMarketUpdateRequestV1_OrderbookSnapshotType) Descriptor() EnumDescriptor
func (x StreamMarketUpdateRequestV1_OrderbookSnapshotType) Enum() *StreamMarketUpdateRequestV1_OrderbookSnapshotType
func (StreamMarketUpdateRequestV1_OrderbookSnapshotType) EnumDescriptor() ([]int)
Deprecated: Use StreamMarketUpdateRequestV1_OrderbookSnapshotType.Descriptor instead.
func (x StreamMarketUpdateRequestV1_OrderbookSnapshotType) Number() EnumNumber
func (x StreamMarketUpdateRequestV1_OrderbookSnapshotType) String() string
func (StreamMarketUpdateRequestV1_OrderbookSnapshotType) Type() EnumType
StreamMarketUpdateResponseV1
type StreamMarketUpdateResponseV1 struct {
// Kind of commodity concerned by the market update.
Commodity StreamMarketUpdateCommodity `protobuf:"varint,1,opt,name=commodity,proto3,enum=kaikosdk.StreamMarketUpdateCommodity" json:"commodity,omitempty"`
// Amount / quantity of asset bought or sold, displayed in base currency.
Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
// Instrument class, internal Kaiko classification denoting whether an instrument is a spot, future, perpetual future, or option.
Class string `protobuf:"bytes,3,opt,name=class,proto3" json:"class,omitempty"`
// Instrument code (currency pair), for example btc-usd.
Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
// Instrument exchange code, for example "cbse" (Coinbase).
Exchange string `protobuf:"bytes,5,opt,name=exchange,proto3" json:"exchange,omitempty"`
// Sequence ID for event. Sortable in lexicographic order.
SequenceId string `protobuf:"bytes,6,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
// ID from exchange (trades only), empty string when not present.
Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"`
// Price for quote currency.
Price float64 `protobuf:"fixed64,8,opt,name=price,proto3" json:"price,omitempty"`
// Timestamp of the event as provided by the exchange.
TsExchange *core.TimestampValue `protobuf:"bytes,9,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,10,opt,name=ts_collection,json=tsCollection,proto3" json:"ts_collection,omitempty"`
// Event generation timestamp (event created by Kaiko), after normalization.
TsEvent *Timestamp `protobuf:"bytes,11,opt,name=ts_event,json=tsEvent,proto3" json:"ts_event,omitempty"`
// Event category for this update.
UpdateType StreamMarketUpdateResponseV1_StreamMarketUpdateType `protobuf:"varint,12,opt,name=update_type,json=updateType,proto3,enum=kaikosdk.StreamMarketUpdateResponseV1_StreamMarketUpdateType" json:"update_type,omitempty"`
// Snapshot for this update.
Snapshot *StreamMarketUpdateResponseV1_Snapshot `protobuf:"bytes,13,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
// Additionnal properties, specific to the exchange.
AdditionalProperties map[string `protobuf:"bytes,14,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 (*StreamMarketUpdateResponseV1) Descriptor() ([]int)
Deprecated: Use StreamMarketUpdateResponseV1.ProtoReflect.Descriptor instead.
func (x *StreamMarketUpdateResponseV1) GetAdditionalProperties() map[string
func (x *StreamMarketUpdateResponseV1) GetAmount() float64
func (x *StreamMarketUpdateResponseV1) GetClass() string
func (x *StreamMarketUpdateResponseV1) GetCode() string
func (x *StreamMarketUpdateResponseV1) GetCommodity() StreamMarketUpdateCommodity
func (x *StreamMarketUpdateResponseV1) GetExchange() string
func (x *StreamMarketUpdateResponseV1) GetId() string
func (x *StreamMarketUpdateResponseV1) GetPrice() float64
func (x *StreamMarketUpdateResponseV1) GetSequenceId() string
func (x *StreamMarketUpdateResponseV1) GetSnapshot() *StreamMarketUpdateResponseV1_Snapshot
func (x *StreamMarketUpdateResponseV1) GetTsCollection() *core.TimestampValue
func (x *StreamMarketUpdateResponseV1) GetTsEvent() *Timestamp
func (x *StreamMarketUpdateResponseV1) GetTsExchange() *core.TimestampValue
func (x *StreamMarketUpdateResponseV1) GetUpdateType() StreamMarketUpdateResponseV1_StreamMarketUpdateType
func (*StreamMarketUpdateResponseV1) ProtoMessage()
func (x *StreamMarketUpdateResponseV1) ProtoReflect() Message
func (x *StreamMarketUpdateResponseV1) Reset()
func (x *StreamMarketUpdateResponseV1) String() string
Snapshot is an orderbook snapshot.
type StreamMarketUpdateResponseV1_Snapshot struct {
// Asks is the list of asks of the orderbook.
Asks []*StreamMarketUpdateResponseV1_Snapshot_Order `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"`
// Bids is the list of bids of the orderbook.
Bids []*StreamMarketUpdateResponseV1_Snapshot_Order `protobuf:"bytes,2,rep,name=bids,proto3" json:"bids,omitempty"`
// contains filtered or unexported fields
}
func (*StreamMarketUpdateResponseV1_Snapshot) Descriptor() ([]int)
Deprecated: Use StreamMarketUpdateResponseV1_Snapshot.ProtoReflect.Descriptor instead.
func (x *StreamMarketUpdateResponseV1_Snapshot) GetAsks() []*StreamMarketUpdateResponseV1_Snapshot_Order
func (x *StreamMarketUpdateResponseV1_Snapshot) GetBids() []*StreamMarketUpdateResponseV1_Snapshot_Order
func (*StreamMarketUpdateResponseV1_Snapshot) ProtoMessage()
func (x *StreamMarketUpdateResponseV1_Snapshot) ProtoReflect() Message
func (x *StreamMarketUpdateResponseV1_Snapshot) Reset()
func (x *StreamMarketUpdateResponseV1_Snapshot) String() string
Order is a amount at a price level.
type StreamMarketUpdateResponseV1_Snapshot_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 (*StreamMarketUpdateResponseV1_Snapshot_Order) Descriptor() ([]int)
Deprecated: Use StreamMarketUpdateResponseV1_Snapshot_Order.ProtoReflect.Descriptor instead.
func (x *StreamMarketUpdateResponseV1_Snapshot_Order) GetAmount() float64
func (x *StreamMarketUpdateResponseV1_Snapshot_Order) GetPrice() float64
func (*StreamMarketUpdateResponseV1_Snapshot_Order) ProtoMessage()
func (x *StreamMarketUpdateResponseV1_Snapshot_Order) ProtoReflect() Message
func (x *StreamMarketUpdateResponseV1_Snapshot_Order) Reset()
func (x *StreamMarketUpdateResponseV1_Snapshot_Order) String() string
StreamMarketUpdateType is event category for a market update.
type StreamMarketUpdateResponseV1_StreamMarketUpdateType int32
const (
// Unknown type.
StreamMarketUpdateResponseV1_UNKNOWN StreamMarketUpdateResponseV1_StreamMarketUpdateType = 0
// TRADE_BUY type.
StreamMarketUpdateResponseV1_TRADE_BUY StreamMarketUpdateResponseV1_StreamMarketUpdateType = 1
// TRADE_SELL type.
StreamMarketUpdateResponseV1_TRADE_SELL StreamMarketUpdateResponseV1_StreamMarketUpdateType = 2
// TRADE_UNKNOWN type.
StreamMarketUpdateResponseV1_TRADE_UNKNOWN StreamMarketUpdateResponseV1_StreamMarketUpdateType = 9
// BEST_ASK type.
StreamMarketUpdateResponseV1_BEST_ASK StreamMarketUpdateResponseV1_StreamMarketUpdateType = 3
// BEST_BID type.
StreamMarketUpdateResponseV1_BEST_BID StreamMarketUpdateResponseV1_StreamMarketUpdateType = 4
// UPDATED_ASK type.
StreamMarketUpdateResponseV1_UPDATED_ASK StreamMarketUpdateResponseV1_StreamMarketUpdateType = 5
// UPDATED_BID type.
StreamMarketUpdateResponseV1_UPDATED_BID StreamMarketUpdateResponseV1_StreamMarketUpdateType = 6
// SNAPSHOT type.
StreamMarketUpdateResponseV1_SNAPSHOT StreamMarketUpdateResponseV1_StreamMarketUpdateType = 7
// FORCE_SNAPSHOT type. Internal use only.
StreamMarketUpdateResponseV1_FORCE_SNAPSHOT StreamMarketUpdateResponseV1_StreamMarketUpdateType = 8
)
func (StreamMarketUpdateResponseV1_StreamMarketUpdateType) Descriptor() EnumDescriptor
func (x StreamMarketUpdateResponseV1_StreamMarketUpdateType) Enum() *StreamMarketUpdateResponseV1_StreamMarketUpdateType
func (StreamMarketUpdateResponseV1_StreamMarketUpdateType) EnumDescriptor() ([]int)
Deprecated: Use StreamMarketUpdateResponseV1_StreamMarketUpdateType.Descriptor instead.
func (x StreamMarketUpdateResponseV1_StreamMarketUpdateType) Number() EnumNumber
func (x StreamMarketUpdateResponseV1_StreamMarketUpdateType) String() string
func (StreamMarketUpdateResponseV1_StreamMarketUpdateType) Type() EnumType