Documentation ¶
Index ¶
- Variables
- func RegisterMarketDataServiceServer(s grpc.ServiceRegistrar, srv MarketDataServiceServer)
- func RegisterTradingServiceServer(s grpc.ServiceRegistrar, srv TradingServiceServer)
- func RegisterUserDataServiceServer(s grpc.ServiceRegistrar, srv UserDataServiceServer)
- type Balance
- func (*Balance) Descriptor() ([]byte, []int)deprecated
- func (x *Balance) GetAvailable() string
- func (x *Balance) GetBorrowed() string
- func (x *Balance) GetCurrency() string
- func (x *Balance) GetExchange() string
- func (x *Balance) GetLocked() string
- func (x *Balance) GetSession() string
- func (*Balance) ProtoMessage()
- func (x *Balance) ProtoReflect() protoreflect.Message
- func (x *Balance) Reset()
- func (x *Balance) String() string
- type CancelOrderRequest
- func (*CancelOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelOrderRequest) GetClientOrderId() string
- func (x *CancelOrderRequest) GetOrderId() string
- func (x *CancelOrderRequest) GetSession() string
- func (*CancelOrderRequest) ProtoMessage()
- func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CancelOrderRequest) Reset()
- func (x *CancelOrderRequest) String() string
- type CancelOrderResponse
- func (*CancelOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CancelOrderResponse) GetError() *Error
- func (x *CancelOrderResponse) GetOrder() *Order
- func (*CancelOrderResponse) ProtoMessage()
- func (x *CancelOrderResponse) ProtoReflect() protoreflect.Message
- func (x *CancelOrderResponse) Reset()
- func (x *CancelOrderResponse) String() string
- type Channel
- type Depth
- func (*Depth) Descriptor() ([]byte, []int)deprecated
- func (x *Depth) GetAsks() []*PriceVolume
- func (x *Depth) GetBids() []*PriceVolume
- func (x *Depth) GetExchange() string
- func (x *Depth) GetSymbol() string
- func (*Depth) ProtoMessage()
- func (x *Depth) ProtoReflect() protoreflect.Message
- func (x *Depth) Reset()
- func (x *Depth) String() string
- type Empty
- type Error
- type Event
- type KLine
- func (*KLine) Descriptor() ([]byte, []int)deprecated
- func (x *KLine) GetClose() string
- func (x *KLine) GetClosed() bool
- func (x *KLine) GetEndTime() int64
- func (x *KLine) GetExchange() string
- func (x *KLine) GetHigh() string
- func (x *KLine) GetLow() string
- func (x *KLine) GetOpen() string
- func (x *KLine) GetQuoteVolume() string
- func (x *KLine) GetSession() string
- func (x *KLine) GetStartTime() int64
- func (x *KLine) GetSymbol() string
- func (x *KLine) GetVolume() string
- func (*KLine) ProtoMessage()
- func (x *KLine) ProtoReflect() protoreflect.Message
- func (x *KLine) Reset()
- func (x *KLine) String() string
- type MarketData
- func (*MarketData) Descriptor() ([]byte, []int)deprecated
- func (x *MarketData) GetChannel() Channel
- func (x *MarketData) GetDepth() *Depth
- func (x *MarketData) GetError() *Error
- func (x *MarketData) GetEvent() Event
- func (x *MarketData) GetExchange() string
- func (x *MarketData) GetKline() *KLine
- func (x *MarketData) GetSession() string
- func (x *MarketData) GetSubscribedAt() int64
- func (x *MarketData) GetSymbol() string
- func (x *MarketData) GetTicker() *Ticker
- func (x *MarketData) GetTrades() []*Trade
- func (*MarketData) ProtoMessage()
- func (x *MarketData) ProtoReflect() protoreflect.Message
- func (x *MarketData) Reset()
- func (x *MarketData) String() string
- type MarketDataServiceClient
- type MarketDataServiceServer
- type MarketDataService_SubscribeClient
- type MarketDataService_SubscribeServer
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetClientOrderId() string
- func (x *Order) GetCreatedAt() int64
- func (x *Order) GetExchange() string
- func (x *Order) GetExecutedQuantity() string
- func (x *Order) GetGroupId() int64
- func (x *Order) GetId() string
- func (x *Order) GetOrderType() OrderType
- func (x *Order) GetPrice() string
- func (x *Order) GetQuantity() string
- func (x *Order) GetSide() Side
- func (x *Order) GetStatus() string
- func (x *Order) GetStopPrice() string
- func (x *Order) GetSymbol() string
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderType
- type PriceVolume
- func (*PriceVolume) Descriptor() ([]byte, []int)deprecated
- func (x *PriceVolume) GetPrice() string
- func (x *PriceVolume) GetVolume() string
- func (*PriceVolume) ProtoMessage()
- func (x *PriceVolume) ProtoReflect() protoreflect.Message
- func (x *PriceVolume) Reset()
- func (x *PriceVolume) String() string
- type QueryKLinesRequest
- func (*QueryKLinesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryKLinesRequest) GetEndTime() int64
- func (x *QueryKLinesRequest) GetExchange() string
- func (x *QueryKLinesRequest) GetInterval() string
- func (x *QueryKLinesRequest) GetLimit() int64
- func (x *QueryKLinesRequest) GetStartTime() int64
- func (x *QueryKLinesRequest) GetSymbol() string
- func (*QueryKLinesRequest) ProtoMessage()
- func (x *QueryKLinesRequest) ProtoReflect() protoreflect.Message
- func (x *QueryKLinesRequest) Reset()
- func (x *QueryKLinesRequest) String() string
- type QueryKLinesResponse
- func (*QueryKLinesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryKLinesResponse) GetError() *Error
- func (x *QueryKLinesResponse) GetKlines() []*KLine
- func (*QueryKLinesResponse) ProtoMessage()
- func (x *QueryKLinesResponse) ProtoReflect() protoreflect.Message
- func (x *QueryKLinesResponse) Reset()
- func (x *QueryKLinesResponse) String() string
- type QueryOrderRequest
- func (*QueryOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOrderRequest) GetClientOrderId() string
- func (x *QueryOrderRequest) GetId() string
- func (x *QueryOrderRequest) GetSession() string
- func (*QueryOrderRequest) ProtoMessage()
- func (x *QueryOrderRequest) ProtoReflect() protoreflect.Message
- func (x *QueryOrderRequest) Reset()
- func (x *QueryOrderRequest) String() string
- type QueryOrderResponse
- func (*QueryOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOrderResponse) GetError() *Error
- func (x *QueryOrderResponse) GetOrder() *Order
- func (*QueryOrderResponse) ProtoMessage()
- func (x *QueryOrderResponse) ProtoReflect() protoreflect.Message
- func (x *QueryOrderResponse) Reset()
- func (x *QueryOrderResponse) String() string
- type QueryOrdersRequest
- func (*QueryOrdersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOrdersRequest) GetGroupId() int64
- func (x *QueryOrdersRequest) GetLimit() int64
- func (x *QueryOrdersRequest) GetOffset() int64
- func (x *QueryOrdersRequest) GetOrderBy() string
- func (x *QueryOrdersRequest) GetPage() int64
- func (x *QueryOrdersRequest) GetPagination() bool
- func (x *QueryOrdersRequest) GetSession() string
- func (x *QueryOrdersRequest) GetState() []string
- func (x *QueryOrdersRequest) GetSymbol() string
- func (*QueryOrdersRequest) ProtoMessage()
- func (x *QueryOrdersRequest) ProtoReflect() protoreflect.Message
- func (x *QueryOrdersRequest) Reset()
- func (x *QueryOrdersRequest) String() string
- type QueryOrdersResponse
- func (*QueryOrdersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOrdersResponse) GetError() *Error
- func (x *QueryOrdersResponse) GetOrders() []*Order
- func (*QueryOrdersResponse) ProtoMessage()
- func (x *QueryOrdersResponse) ProtoReflect() protoreflect.Message
- func (x *QueryOrdersResponse) Reset()
- func (x *QueryOrdersResponse) String() string
- type QueryTradesRequest
- func (*QueryTradesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryTradesRequest) GetExchange() string
- func (x *QueryTradesRequest) GetFrom() int64
- func (x *QueryTradesRequest) GetLimit() int64
- func (x *QueryTradesRequest) GetOffset() int64
- func (x *QueryTradesRequest) GetOrderBy() string
- func (x *QueryTradesRequest) GetPage() int64
- func (x *QueryTradesRequest) GetPagination() bool
- func (x *QueryTradesRequest) GetSymbol() string
- func (x *QueryTradesRequest) GetTimestamp() int64
- func (x *QueryTradesRequest) GetTo() int64
- func (*QueryTradesRequest) ProtoMessage()
- func (x *QueryTradesRequest) ProtoReflect() protoreflect.Message
- func (x *QueryTradesRequest) Reset()
- func (x *QueryTradesRequest) String() string
- type QueryTradesResponse
- func (*QueryTradesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryTradesResponse) GetError() *Error
- func (x *QueryTradesResponse) GetTrades() []*Trade
- func (*QueryTradesResponse) ProtoMessage()
- func (x *QueryTradesResponse) ProtoReflect() protoreflect.Message
- func (x *QueryTradesResponse) Reset()
- func (x *QueryTradesResponse) String() string
- type Side
- type SubmitOrder
- func (*SubmitOrder) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitOrder) GetClientOrderId() string
- func (x *SubmitOrder) GetExchange() string
- func (x *SubmitOrder) GetGroupId() int64
- func (x *SubmitOrder) GetOrderType() OrderType
- func (x *SubmitOrder) GetPrice() string
- func (x *SubmitOrder) GetQuantity() string
- func (x *SubmitOrder) GetSession() string
- func (x *SubmitOrder) GetSide() Side
- func (x *SubmitOrder) GetStopPrice() string
- func (x *SubmitOrder) GetSymbol() string
- func (*SubmitOrder) ProtoMessage()
- func (x *SubmitOrder) ProtoReflect() protoreflect.Message
- func (x *SubmitOrder) Reset()
- func (x *SubmitOrder) String() string
- type SubmitOrderRequest
- func (*SubmitOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitOrderRequest) GetSession() string
- func (x *SubmitOrderRequest) GetSubmitOrders() []*SubmitOrder
- func (*SubmitOrderRequest) ProtoMessage()
- func (x *SubmitOrderRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitOrderRequest) Reset()
- func (x *SubmitOrderRequest) String() string
- type SubmitOrderResponse
- func (*SubmitOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitOrderResponse) GetError() *Error
- func (x *SubmitOrderResponse) GetOrders() []*Order
- func (x *SubmitOrderResponse) GetSession() string
- func (*SubmitOrderResponse) ProtoMessage()
- func (x *SubmitOrderResponse) ProtoReflect() protoreflect.Message
- func (x *SubmitOrderResponse) Reset()
- func (x *SubmitOrderResponse) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetSubscriptions() []*Subscription
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetChannel() Channel
- func (x *Subscription) GetDepth() string
- func (x *Subscription) GetExchange() string
- func (x *Subscription) GetInterval() string
- func (x *Subscription) GetSymbol() string
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type Ticker
- func (*Ticker) Descriptor() ([]byte, []int)deprecated
- func (x *Ticker) GetClose() float64
- func (x *Ticker) GetExchange() string
- func (x *Ticker) GetHigh() float64
- func (x *Ticker) GetLow() float64
- func (x *Ticker) GetOpen() float64
- func (x *Ticker) GetSymbol() string
- func (x *Ticker) GetVolume() float64
- func (*Ticker) ProtoMessage()
- func (x *Ticker) ProtoReflect() protoreflect.Message
- func (x *Ticker) Reset()
- func (x *Ticker) String() string
- type Trade
- func (*Trade) Descriptor() ([]byte, []int)deprecated
- func (x *Trade) GetCreatedAt() int64
- func (x *Trade) GetExchange() string
- func (x *Trade) GetFee() string
- func (x *Trade) GetFeeCurrency() string
- func (x *Trade) GetId() string
- func (x *Trade) GetMaker() bool
- func (x *Trade) GetPrice() string
- func (x *Trade) GetQuantity() string
- func (x *Trade) GetSession() string
- func (x *Trade) GetSide() Side
- func (x *Trade) GetSymbol() string
- func (*Trade) ProtoMessage()
- func (x *Trade) ProtoReflect() protoreflect.Message
- func (x *Trade) Reset()
- func (x *Trade) String() string
- type TradingServiceClient
- type TradingServiceServer
- type UnimplementedMarketDataServiceServer
- type UnimplementedTradingServiceServer
- func (UnimplementedTradingServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error)
- func (UnimplementedTradingServiceServer) QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error)
- func (UnimplementedTradingServiceServer) QueryOrders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error)
- func (UnimplementedTradingServiceServer) QueryTrades(context.Context, *QueryTradesRequest) (*QueryTradesResponse, error)
- func (UnimplementedTradingServiceServer) SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderResponse, error)
- type UnimplementedUserDataServiceServer
- type UnsafeMarketDataServiceServer
- type UnsafeTradingServiceServer
- type UnsafeUserDataServiceServer
- type UserData
- func (*UserData) Descriptor() ([]byte, []int)deprecated
- func (x *UserData) GetBalances() []*Balance
- func (x *UserData) GetChannel() Channel
- func (x *UserData) GetEvent() Event
- func (x *UserData) GetExchange() string
- func (x *UserData) GetOrders() []*Order
- func (x *UserData) GetSession() string
- func (x *UserData) GetTrades() []*Trade
- func (*UserData) ProtoMessage()
- func (x *UserData) ProtoReflect() protoreflect.Message
- func (x *UserData) Reset()
- func (x *UserData) String() string
- type UserDataRequest
- type UserDataServiceClient
- type UserDataServiceServer
- type UserDataService_SubscribeClient
- type UserDataService_SubscribeServer
Constants ¶
This section is empty.
Variables ¶
var ( Event_name = map[int32]string{ 0: "UNKNOWN", 1: "SUBSCRIBED", 2: "UNSUBSCRIBED", 3: "SNAPSHOT", 4: "UPDATE", 5: "AUTHENTICATED", 99: "ERROR", } Event_value = map[string]int32{ "UNKNOWN": 0, "SUBSCRIBED": 1, "UNSUBSCRIBED": 2, "SNAPSHOT": 3, "UPDATE": 4, "AUTHENTICATED": 5, "ERROR": 99, } )
Enum value maps for Event.
var ( Channel_name = map[int32]string{ 0: "BOOK", 1: "TRADE", 2: "TICKER", 3: "KLINE", 4: "BALANCE", 5: "ORDER", } Channel_value = map[string]int32{ "BOOK": 0, "TRADE": 1, "TICKER": 2, "KLINE": 3, "BALANCE": 4, "ORDER": 5, } )
Enum value maps for Channel.
var ( Side_name = map[int32]string{ 0: "BUY", 1: "SELL", } Side_value = map[string]int32{ "BUY": 0, "SELL": 1, } )
Enum value maps for Side.
var ( OrderType_name = map[int32]string{ 0: "MARKET", 1: "LIMIT", 2: "STOP_MARKET", 3: "STOP_LIMIT", 4: "POST_ONLY", 5: "IOC_LIMIT", } OrderType_value = map[string]int32{ "MARKET": 0, "LIMIT": 1, "STOP_MARKET": 2, "STOP_LIMIT": 3, "POST_ONLY": 4, "IOC_LIMIT": 5, } )
Enum value maps for OrderType.
var File_pkg_pb_bbgo_proto protoreflect.FileDescriptor
var MarketDataService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bbgo.MarketDataService", HandlerType: (*MarketDataServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryKLines", Handler: _MarketDataService_QueryKLines_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _MarketDataService_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "pkg/pb/bbgo.proto", }
MarketDataService_ServiceDesc is the grpc.ServiceDesc for MarketDataService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TradingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bbgo.TradingService", HandlerType: (*TradingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SubmitOrder", Handler: _TradingService_SubmitOrder_Handler, }, { MethodName: "CancelOrder", Handler: _TradingService_CancelOrder_Handler, }, { MethodName: "QueryOrder", Handler: _TradingService_QueryOrder_Handler, }, { MethodName: "QueryOrders", Handler: _TradingService_QueryOrders_Handler, }, { MethodName: "QueryTrades", Handler: _TradingService_QueryTrades_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/pb/bbgo.proto", }
TradingService_ServiceDesc is the grpc.ServiceDesc for TradingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserDataService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bbgo.UserDataService", HandlerType: (*UserDataServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _UserDataService_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "pkg/pb/bbgo.proto", }
UserDataService_ServiceDesc is the grpc.ServiceDesc for UserDataService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMarketDataServiceServer ¶
func RegisterMarketDataServiceServer(s grpc.ServiceRegistrar, srv MarketDataServiceServer)
func RegisterTradingServiceServer ¶
func RegisterTradingServiceServer(s grpc.ServiceRegistrar, srv TradingServiceServer)
func RegisterUserDataServiceServer ¶
func RegisterUserDataServiceServer(s grpc.ServiceRegistrar, srv UserDataServiceServer)
Types ¶
type Balance ¶
type Balance struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` Available string `protobuf:"bytes,4,opt,name=available,proto3" json:"available,omitempty"` Locked string `protobuf:"bytes,5,opt,name=locked,proto3" json:"locked,omitempty"` Borrowed string `protobuf:"bytes,6,opt,name=borrowed,proto3" json:"borrowed,omitempty"` // contains filtered or unexported fields }
https://maicoin.github.io/max-websocket-docs/#/private_channels?id=account-response
func (*Balance) Descriptor
deprecated
func (*Balance) GetAvailable ¶
func (*Balance) GetBorrowed ¶
func (*Balance) GetCurrency ¶
func (*Balance) GetExchange ¶
func (*Balance) GetSession ¶
func (*Balance) ProtoMessage ¶
func (*Balance) ProtoMessage()
func (*Balance) ProtoReflect ¶
func (x *Balance) ProtoReflect() protoreflect.Message
type CancelOrderRequest ¶
type CancelOrderRequest struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` ClientOrderId string `protobuf:"bytes,3,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` // contains filtered or unexported fields }
func (*CancelOrderRequest) Descriptor
deprecated
func (*CancelOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelOrderRequest.ProtoReflect.Descriptor instead.
func (*CancelOrderRequest) GetClientOrderId ¶
func (x *CancelOrderRequest) GetClientOrderId() string
func (*CancelOrderRequest) GetOrderId ¶
func (x *CancelOrderRequest) GetOrderId() string
func (*CancelOrderRequest) GetSession ¶
func (x *CancelOrderRequest) GetSession() string
func (*CancelOrderRequest) ProtoMessage ¶
func (*CancelOrderRequest) ProtoMessage()
func (*CancelOrderRequest) ProtoReflect ¶
func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message
func (*CancelOrderRequest) Reset ¶
func (x *CancelOrderRequest) Reset()
func (*CancelOrderRequest) String ¶
func (x *CancelOrderRequest) String() string
type CancelOrderResponse ¶
type CancelOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*CancelOrderResponse) Descriptor
deprecated
func (*CancelOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CancelOrderResponse.ProtoReflect.Descriptor instead.
func (*CancelOrderResponse) GetError ¶
func (x *CancelOrderResponse) GetError() *Error
func (*CancelOrderResponse) GetOrder ¶
func (x *CancelOrderResponse) GetOrder() *Order
func (*CancelOrderResponse) ProtoMessage ¶
func (*CancelOrderResponse) ProtoMessage()
func (*CancelOrderResponse) ProtoReflect ¶
func (x *CancelOrderResponse) ProtoReflect() protoreflect.Message
func (*CancelOrderResponse) Reset ¶
func (x *CancelOrderResponse) Reset()
func (*CancelOrderResponse) String ¶
func (x *CancelOrderResponse) String() string
type Channel ¶
type Channel int32
func (Channel) Descriptor ¶
func (Channel) Descriptor() protoreflect.EnumDescriptor
func (Channel) EnumDescriptor
deprecated
func (Channel) Number ¶
func (x Channel) Number() protoreflect.EnumNumber
func (Channel) Type ¶
func (Channel) Type() protoreflect.EnumType
type Depth ¶
type Depth struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Asks []*PriceVolume `protobuf:"bytes,3,rep,name=asks,proto3" json:"asks,omitempty"` Bids []*PriceVolume `protobuf:"bytes,4,rep,name=bids,proto3" json:"bids,omitempty"` // contains filtered or unexported fields }
func (*Depth) Descriptor
deprecated
func (*Depth) GetAsks ¶
func (x *Depth) GetAsks() []*PriceVolume
func (*Depth) GetBids ¶
func (x *Depth) GetBids() []*PriceVolume
func (*Depth) GetExchange ¶
func (*Depth) ProtoMessage ¶
func (*Depth) ProtoMessage()
func (*Depth) ProtoReflect ¶
func (x *Depth) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct { ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetErrorCode ¶
func (*Error) GetErrorMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Event ¶
type Event int32
func (Event) Descriptor ¶
func (Event) Descriptor() protoreflect.EnumDescriptor
func (Event) EnumDescriptor
deprecated
func (Event) Number ¶
func (x Event) Number() protoreflect.EnumNumber
func (Event) Type ¶
func (Event) Type() protoreflect.EnumType
type KLine ¶
type KLine struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` Open string `protobuf:"bytes,4,opt,name=open,proto3" json:"open,omitempty"` High string `protobuf:"bytes,5,opt,name=high,proto3" json:"high,omitempty"` Low string `protobuf:"bytes,6,opt,name=low,proto3" json:"low,omitempty"` Close string `protobuf:"bytes,7,opt,name=close,proto3" json:"close,omitempty"` Volume string `protobuf:"bytes,8,opt,name=volume,proto3" json:"volume,omitempty"` QuoteVolume string `protobuf:"bytes,9,opt,name=quote_volume,json=quoteVolume,proto3" json:"quote_volume,omitempty"` StartTime int64 `protobuf:"varint,10,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime int64 `protobuf:"varint,11,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Closed bool `protobuf:"varint,12,opt,name=closed,proto3" json:"closed,omitempty"` // contains filtered or unexported fields }
func (*KLine) Descriptor
deprecated
func (*KLine) GetEndTime ¶
func (*KLine) GetExchange ¶
func (*KLine) GetQuoteVolume ¶
func (*KLine) GetSession ¶
func (*KLine) GetStartTime ¶
func (*KLine) ProtoMessage ¶
func (*KLine) ProtoMessage()
func (*KLine) ProtoReflect ¶
func (x *KLine) ProtoReflect() protoreflect.Message
type MarketData ¶
type MarketData struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` Channel Channel `protobuf:"varint,4,opt,name=channel,proto3,enum=bbgo.Channel" json:"channel,omitempty"` // book, trade, ticker, user Event Event `protobuf:"varint,5,opt,name=event,proto3,enum=bbgo.Event" json:"event,omitempty"` // snapshot or update Depth *Depth `protobuf:"bytes,6,opt,name=depth,proto3" json:"depth,omitempty"` // depth: used by book Kline *KLine `protobuf:"bytes,7,opt,name=kline,proto3" json:"kline,omitempty"` Ticker *Ticker `protobuf:"bytes,9,opt,name=ticker,proto3" json:"ticker,omitempty"` // market ticker Trades []*Trade `protobuf:"bytes,8,rep,name=trades,proto3" json:"trades,omitempty"` // market trades SubscribedAt int64 `protobuf:"varint,12,opt,name=subscribed_at,json=subscribedAt,proto3" json:"subscribed_at,omitempty"` Error *Error `protobuf:"bytes,13,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*MarketData) Descriptor
deprecated
func (*MarketData) Descriptor() ([]byte, []int)
Deprecated: Use MarketData.ProtoReflect.Descriptor instead.
func (*MarketData) GetChannel ¶
func (x *MarketData) GetChannel() Channel
func (*MarketData) GetDepth ¶
func (x *MarketData) GetDepth() *Depth
func (*MarketData) GetError ¶
func (x *MarketData) GetError() *Error
func (*MarketData) GetEvent ¶
func (x *MarketData) GetEvent() Event
func (*MarketData) GetExchange ¶
func (x *MarketData) GetExchange() string
func (*MarketData) GetKline ¶
func (x *MarketData) GetKline() *KLine
func (*MarketData) GetSession ¶
func (x *MarketData) GetSession() string
func (*MarketData) GetSubscribedAt ¶
func (x *MarketData) GetSubscribedAt() int64
func (*MarketData) GetSymbol ¶
func (x *MarketData) GetSymbol() string
func (*MarketData) GetTicker ¶
func (x *MarketData) GetTicker() *Ticker
func (*MarketData) GetTrades ¶
func (x *MarketData) GetTrades() []*Trade
func (*MarketData) ProtoMessage ¶
func (*MarketData) ProtoMessage()
func (*MarketData) ProtoReflect ¶
func (x *MarketData) ProtoReflect() protoreflect.Message
func (*MarketData) Reset ¶
func (x *MarketData) Reset()
func (*MarketData) String ¶
func (x *MarketData) String() string
type MarketDataServiceClient ¶
type MarketDataServiceClient interface { Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (MarketDataService_SubscribeClient, error) QueryKLines(ctx context.Context, in *QueryKLinesRequest, opts ...grpc.CallOption) (*QueryKLinesResponse, error) }
MarketDataServiceClient is the client API for MarketDataService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMarketDataServiceClient ¶
func NewMarketDataServiceClient(cc grpc.ClientConnInterface) MarketDataServiceClient
type MarketDataServiceServer ¶
type MarketDataServiceServer interface { Subscribe(*SubscribeRequest, MarketDataService_SubscribeServer) error QueryKLines(context.Context, *QueryKLinesRequest) (*QueryKLinesResponse, error) // contains filtered or unexported methods }
MarketDataServiceServer is the server API for MarketDataService service. All implementations must embed UnimplementedMarketDataServiceServer for forward compatibility
type MarketDataService_SubscribeClient ¶
type MarketDataService_SubscribeClient interface { Recv() (*MarketData, error) grpc.ClientStream }
type MarketDataService_SubscribeServer ¶
type MarketDataService_SubscribeServer interface { Send(*MarketData) error grpc.ServerStream }
type Order ¶
type Order struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` Side Side `protobuf:"varint,4,opt,name=side,proto3,enum=bbgo.Side" json:"side,omitempty"` OrderType OrderType `protobuf:"varint,5,opt,name=order_type,json=orderType,proto3,enum=bbgo.OrderType" json:"order_type,omitempty"` Price string `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"` StopPrice string `protobuf:"bytes,7,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"` Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` Quantity string `protobuf:"bytes,11,opt,name=quantity,proto3" json:"quantity,omitempty"` ExecutedQuantity string `protobuf:"bytes,12,opt,name=executed_quantity,json=executedQuantity,proto3" json:"executed_quantity,omitempty"` ClientOrderId string `protobuf:"bytes,14,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` GroupId int64 `protobuf:"varint,15,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
https://maicoin.github.io/max-websocket-docs/#/private_channels?id=snapshot
func (*Order) Descriptor
deprecated
func (*Order) GetClientOrderId ¶
func (*Order) GetCreatedAt ¶
func (*Order) GetExchange ¶
func (*Order) GetExecutedQuantity ¶
func (*Order) GetGroupId ¶
func (*Order) GetOrderType ¶
func (*Order) GetQuantity ¶
func (*Order) GetStopPrice ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderType ¶
type OrderType int32
func (OrderType) Descriptor ¶
func (OrderType) Descriptor() protoreflect.EnumDescriptor
func (OrderType) EnumDescriptor
deprecated
func (OrderType) Number ¶
func (x OrderType) Number() protoreflect.EnumNumber
func (OrderType) Type ¶
func (OrderType) Type() protoreflect.EnumType
type PriceVolume ¶
type PriceVolume struct { Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` Volume string `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume,omitempty"` // contains filtered or unexported fields }
func (*PriceVolume) Descriptor
deprecated
func (*PriceVolume) Descriptor() ([]byte, []int)
Deprecated: Use PriceVolume.ProtoReflect.Descriptor instead.
func (*PriceVolume) GetPrice ¶
func (x *PriceVolume) GetPrice() string
func (*PriceVolume) GetVolume ¶
func (x *PriceVolume) GetVolume() string
func (*PriceVolume) ProtoMessage ¶
func (*PriceVolume) ProtoMessage()
func (*PriceVolume) ProtoReflect ¶
func (x *PriceVolume) ProtoReflect() protoreflect.Message
func (*PriceVolume) Reset ¶
func (x *PriceVolume) Reset()
func (*PriceVolume) String ¶
func (x *PriceVolume) String() string
type QueryKLinesRequest ¶
type QueryKLinesRequest struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Interval string `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"` // time period of K line in minute StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime int64 `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Limit int64 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*QueryKLinesRequest) Descriptor
deprecated
func (*QueryKLinesRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryKLinesRequest.ProtoReflect.Descriptor instead.
func (*QueryKLinesRequest) GetEndTime ¶
func (x *QueryKLinesRequest) GetEndTime() int64
func (*QueryKLinesRequest) GetExchange ¶
func (x *QueryKLinesRequest) GetExchange() string
func (*QueryKLinesRequest) GetInterval ¶
func (x *QueryKLinesRequest) GetInterval() string
func (*QueryKLinesRequest) GetLimit ¶
func (x *QueryKLinesRequest) GetLimit() int64
func (*QueryKLinesRequest) GetStartTime ¶
func (x *QueryKLinesRequest) GetStartTime() int64
func (*QueryKLinesRequest) GetSymbol ¶
func (x *QueryKLinesRequest) GetSymbol() string
func (*QueryKLinesRequest) ProtoMessage ¶
func (*QueryKLinesRequest) ProtoMessage()
func (*QueryKLinesRequest) ProtoReflect ¶
func (x *QueryKLinesRequest) ProtoReflect() protoreflect.Message
func (*QueryKLinesRequest) Reset ¶
func (x *QueryKLinesRequest) Reset()
func (*QueryKLinesRequest) String ¶
func (x *QueryKLinesRequest) String() string
type QueryKLinesResponse ¶
type QueryKLinesResponse struct { Klines []*KLine `protobuf:"bytes,1,rep,name=klines,proto3" json:"klines,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*QueryKLinesResponse) Descriptor
deprecated
func (*QueryKLinesResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryKLinesResponse.ProtoReflect.Descriptor instead.
func (*QueryKLinesResponse) GetError ¶
func (x *QueryKLinesResponse) GetError() *Error
func (*QueryKLinesResponse) GetKlines ¶
func (x *QueryKLinesResponse) GetKlines() []*KLine
func (*QueryKLinesResponse) ProtoMessage ¶
func (*QueryKLinesResponse) ProtoMessage()
func (*QueryKLinesResponse) ProtoReflect ¶
func (x *QueryKLinesResponse) ProtoReflect() protoreflect.Message
func (*QueryKLinesResponse) Reset ¶
func (x *QueryKLinesResponse) Reset()
func (*QueryKLinesResponse) String ¶
func (x *QueryKLinesResponse) String() string
type QueryOrderRequest ¶
type QueryOrderRequest struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` ClientOrderId string `protobuf:"bytes,3,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` // contains filtered or unexported fields }
func (*QueryOrderRequest) Descriptor
deprecated
func (*QueryOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryOrderRequest.ProtoReflect.Descriptor instead.
func (*QueryOrderRequest) GetClientOrderId ¶
func (x *QueryOrderRequest) GetClientOrderId() string
func (*QueryOrderRequest) GetId ¶
func (x *QueryOrderRequest) GetId() string
func (*QueryOrderRequest) GetSession ¶
func (x *QueryOrderRequest) GetSession() string
func (*QueryOrderRequest) ProtoMessage ¶
func (*QueryOrderRequest) ProtoMessage()
func (*QueryOrderRequest) ProtoReflect ¶
func (x *QueryOrderRequest) ProtoReflect() protoreflect.Message
func (*QueryOrderRequest) Reset ¶
func (x *QueryOrderRequest) Reset()
func (*QueryOrderRequest) String ¶
func (x *QueryOrderRequest) String() string
type QueryOrderResponse ¶
type QueryOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*QueryOrderResponse) Descriptor
deprecated
func (*QueryOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryOrderResponse.ProtoReflect.Descriptor instead.
func (*QueryOrderResponse) GetError ¶
func (x *QueryOrderResponse) GetError() *Error
func (*QueryOrderResponse) GetOrder ¶
func (x *QueryOrderResponse) GetOrder() *Order
func (*QueryOrderResponse) ProtoMessage ¶
func (*QueryOrderResponse) ProtoMessage()
func (*QueryOrderResponse) ProtoReflect ¶
func (x *QueryOrderResponse) ProtoReflect() protoreflect.Message
func (*QueryOrderResponse) Reset ¶
func (x *QueryOrderResponse) Reset()
func (*QueryOrderResponse) String ¶
func (x *QueryOrderResponse) String() string
type QueryOrdersRequest ¶
type QueryOrdersRequest struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` State []string `protobuf:"bytes,3,rep,name=state,proto3" json:"state,omitempty"` OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` GroupId int64 `protobuf:"varint,5,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` Pagination bool `protobuf:"varint,6,opt,name=pagination,proto3" json:"pagination,omitempty"` Page int64 `protobuf:"varint,7,opt,name=page,proto3" json:"page,omitempty"` Limit int64 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,9,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*QueryOrdersRequest) Descriptor
deprecated
func (*QueryOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryOrdersRequest.ProtoReflect.Descriptor instead.
func (*QueryOrdersRequest) GetGroupId ¶
func (x *QueryOrdersRequest) GetGroupId() int64
func (*QueryOrdersRequest) GetLimit ¶
func (x *QueryOrdersRequest) GetLimit() int64
func (*QueryOrdersRequest) GetOffset ¶
func (x *QueryOrdersRequest) GetOffset() int64
func (*QueryOrdersRequest) GetOrderBy ¶
func (x *QueryOrdersRequest) GetOrderBy() string
func (*QueryOrdersRequest) GetPage ¶
func (x *QueryOrdersRequest) GetPage() int64
func (*QueryOrdersRequest) GetPagination ¶
func (x *QueryOrdersRequest) GetPagination() bool
func (*QueryOrdersRequest) GetSession ¶
func (x *QueryOrdersRequest) GetSession() string
func (*QueryOrdersRequest) GetState ¶
func (x *QueryOrdersRequest) GetState() []string
func (*QueryOrdersRequest) GetSymbol ¶
func (x *QueryOrdersRequest) GetSymbol() string
func (*QueryOrdersRequest) ProtoMessage ¶
func (*QueryOrdersRequest) ProtoMessage()
func (*QueryOrdersRequest) ProtoReflect ¶
func (x *QueryOrdersRequest) ProtoReflect() protoreflect.Message
func (*QueryOrdersRequest) Reset ¶
func (x *QueryOrdersRequest) Reset()
func (*QueryOrdersRequest) String ¶
func (x *QueryOrdersRequest) String() string
type QueryOrdersResponse ¶
type QueryOrdersResponse struct { Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*QueryOrdersResponse) Descriptor
deprecated
func (*QueryOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryOrdersResponse.ProtoReflect.Descriptor instead.
func (*QueryOrdersResponse) GetError ¶
func (x *QueryOrdersResponse) GetError() *Error
func (*QueryOrdersResponse) GetOrders ¶
func (x *QueryOrdersResponse) GetOrders() []*Order
func (*QueryOrdersResponse) ProtoMessage ¶
func (*QueryOrdersResponse) ProtoMessage()
func (*QueryOrdersResponse) ProtoReflect ¶
func (x *QueryOrdersResponse) ProtoReflect() protoreflect.Message
func (*QueryOrdersResponse) Reset ¶
func (x *QueryOrdersResponse) Reset()
func (*QueryOrdersResponse) String ¶
func (x *QueryOrdersResponse) String() string
type QueryTradesRequest ¶
type QueryTradesRequest struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` From int64 `protobuf:"varint,4,opt,name=from,proto3" json:"from,omitempty"` To int64 `protobuf:"varint,5,opt,name=to,proto3" json:"to,omitempty"` OrderBy string `protobuf:"bytes,6,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` Pagination bool `protobuf:"varint,7,opt,name=pagination,proto3" json:"pagination,omitempty"` Page int64 `protobuf:"varint,8,opt,name=page,proto3" json:"page,omitempty"` Limit int64 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,10,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*QueryTradesRequest) Descriptor
deprecated
func (*QueryTradesRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryTradesRequest.ProtoReflect.Descriptor instead.
func (*QueryTradesRequest) GetExchange ¶
func (x *QueryTradesRequest) GetExchange() string
func (*QueryTradesRequest) GetFrom ¶
func (x *QueryTradesRequest) GetFrom() int64
func (*QueryTradesRequest) GetLimit ¶
func (x *QueryTradesRequest) GetLimit() int64
func (*QueryTradesRequest) GetOffset ¶
func (x *QueryTradesRequest) GetOffset() int64
func (*QueryTradesRequest) GetOrderBy ¶
func (x *QueryTradesRequest) GetOrderBy() string
func (*QueryTradesRequest) GetPage ¶
func (x *QueryTradesRequest) GetPage() int64
func (*QueryTradesRequest) GetPagination ¶
func (x *QueryTradesRequest) GetPagination() bool
func (*QueryTradesRequest) GetSymbol ¶
func (x *QueryTradesRequest) GetSymbol() string
func (*QueryTradesRequest) GetTimestamp ¶
func (x *QueryTradesRequest) GetTimestamp() int64
func (*QueryTradesRequest) GetTo ¶
func (x *QueryTradesRequest) GetTo() int64
func (*QueryTradesRequest) ProtoMessage ¶
func (*QueryTradesRequest) ProtoMessage()
func (*QueryTradesRequest) ProtoReflect ¶
func (x *QueryTradesRequest) ProtoReflect() protoreflect.Message
func (*QueryTradesRequest) Reset ¶
func (x *QueryTradesRequest) Reset()
func (*QueryTradesRequest) String ¶
func (x *QueryTradesRequest) String() string
type QueryTradesResponse ¶
type QueryTradesResponse struct { Trades []*Trade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*QueryTradesResponse) Descriptor
deprecated
func (*QueryTradesResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryTradesResponse.ProtoReflect.Descriptor instead.
func (*QueryTradesResponse) GetError ¶
func (x *QueryTradesResponse) GetError() *Error
func (*QueryTradesResponse) GetTrades ¶
func (x *QueryTradesResponse) GetTrades() []*Trade
func (*QueryTradesResponse) ProtoMessage ¶
func (*QueryTradesResponse) ProtoMessage()
func (*QueryTradesResponse) ProtoReflect ¶
func (x *QueryTradesResponse) ProtoReflect() protoreflect.Message
func (*QueryTradesResponse) Reset ¶
func (x *QueryTradesResponse) Reset()
func (*QueryTradesResponse) String ¶
func (x *QueryTradesResponse) String() string
type Side ¶
type Side int32
func (Side) Descriptor ¶
func (Side) Descriptor() protoreflect.EnumDescriptor
func (Side) EnumDescriptor
deprecated
func (Side) Number ¶
func (x Side) Number() protoreflect.EnumNumber
func (Side) Type ¶
func (Side) Type() protoreflect.EnumType
type SubmitOrder ¶
type SubmitOrder struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` Side Side `protobuf:"varint,4,opt,name=side,proto3,enum=bbgo.Side" json:"side,omitempty"` Price string `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"` Quantity string `protobuf:"bytes,5,opt,name=quantity,proto3" json:"quantity,omitempty"` StopPrice string `protobuf:"bytes,7,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"` OrderType OrderType `protobuf:"varint,8,opt,name=order_type,json=orderType,proto3,enum=bbgo.OrderType" json:"order_type,omitempty"` ClientOrderId string `protobuf:"bytes,9,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` GroupId int64 `protobuf:"varint,10,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*SubmitOrder) Descriptor
deprecated
func (*SubmitOrder) Descriptor() ([]byte, []int)
Deprecated: Use SubmitOrder.ProtoReflect.Descriptor instead.
func (*SubmitOrder) GetClientOrderId ¶
func (x *SubmitOrder) GetClientOrderId() string
func (*SubmitOrder) GetExchange ¶
func (x *SubmitOrder) GetExchange() string
func (*SubmitOrder) GetGroupId ¶
func (x *SubmitOrder) GetGroupId() int64
func (*SubmitOrder) GetOrderType ¶
func (x *SubmitOrder) GetOrderType() OrderType
func (*SubmitOrder) GetPrice ¶
func (x *SubmitOrder) GetPrice() string
func (*SubmitOrder) GetQuantity ¶
func (x *SubmitOrder) GetQuantity() string
func (*SubmitOrder) GetSession ¶
func (x *SubmitOrder) GetSession() string
func (*SubmitOrder) GetSide ¶
func (x *SubmitOrder) GetSide() Side
func (*SubmitOrder) GetStopPrice ¶
func (x *SubmitOrder) GetStopPrice() string
func (*SubmitOrder) GetSymbol ¶
func (x *SubmitOrder) GetSymbol() string
func (*SubmitOrder) ProtoMessage ¶
func (*SubmitOrder) ProtoMessage()
func (*SubmitOrder) ProtoReflect ¶
func (x *SubmitOrder) ProtoReflect() protoreflect.Message
func (*SubmitOrder) Reset ¶
func (x *SubmitOrder) Reset()
func (*SubmitOrder) String ¶
func (x *SubmitOrder) String() string
type SubmitOrderRequest ¶
type SubmitOrderRequest struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` SubmitOrders []*SubmitOrder `protobuf:"bytes,2,rep,name=submit_orders,json=submitOrders,proto3" json:"submit_orders,omitempty"` // contains filtered or unexported fields }
func (*SubmitOrderRequest) Descriptor
deprecated
func (*SubmitOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitOrderRequest.ProtoReflect.Descriptor instead.
func (*SubmitOrderRequest) GetSession ¶
func (x *SubmitOrderRequest) GetSession() string
func (*SubmitOrderRequest) GetSubmitOrders ¶
func (x *SubmitOrderRequest) GetSubmitOrders() []*SubmitOrder
func (*SubmitOrderRequest) ProtoMessage ¶
func (*SubmitOrderRequest) ProtoMessage()
func (*SubmitOrderRequest) ProtoReflect ¶
func (x *SubmitOrderRequest) ProtoReflect() protoreflect.Message
func (*SubmitOrderRequest) Reset ¶
func (x *SubmitOrderRequest) Reset()
func (*SubmitOrderRequest) String ¶
func (x *SubmitOrderRequest) String() string
type SubmitOrderResponse ¶
type SubmitOrderResponse struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Orders []*Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*SubmitOrderResponse) Descriptor
deprecated
func (*SubmitOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitOrderResponse.ProtoReflect.Descriptor instead.
func (*SubmitOrderResponse) GetError ¶
func (x *SubmitOrderResponse) GetError() *Error
func (*SubmitOrderResponse) GetOrders ¶
func (x *SubmitOrderResponse) GetOrders() []*Order
func (*SubmitOrderResponse) GetSession ¶
func (x *SubmitOrderResponse) GetSession() string
func (*SubmitOrderResponse) ProtoMessage ¶
func (*SubmitOrderResponse) ProtoMessage()
func (*SubmitOrderResponse) ProtoReflect ¶
func (x *SubmitOrderResponse) ProtoReflect() protoreflect.Message
func (*SubmitOrderResponse) Reset ¶
func (x *SubmitOrderResponse) Reset()
func (*SubmitOrderResponse) String ¶
func (x *SubmitOrderResponse) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetSubscriptions ¶
func (x *SubscribeRequest) GetSubscriptions() []*Subscription
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type Subscription ¶
type Subscription struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Channel Channel `protobuf:"varint,2,opt,name=channel,proto3,enum=bbgo.Channel" json:"channel,omitempty"` // book, trade, ticker Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` Depth string `protobuf:"bytes,4,opt,name=depth,proto3" json:"depth,omitempty"` // depth is for book, valid values are full, medium, 1, 5 and 20 Interval string `protobuf:"bytes,5,opt,name=interval,proto3" json:"interval,omitempty"` // interval is for kline channel // contains filtered or unexported fields }
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetChannel ¶
func (x *Subscription) GetChannel() Channel
func (*Subscription) GetDepth ¶
func (x *Subscription) GetDepth() string
func (*Subscription) GetExchange ¶
func (x *Subscription) GetExchange() string
func (*Subscription) GetInterval ¶
func (x *Subscription) GetInterval() string
func (*Subscription) GetSymbol ¶
func (x *Subscription) GetSymbol() string
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type Ticker ¶
type Ticker struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Open float64 `protobuf:"fixed64,3,opt,name=open,proto3" json:"open,omitempty"` High float64 `protobuf:"fixed64,4,opt,name=high,proto3" json:"high,omitempty"` Low float64 `protobuf:"fixed64,5,opt,name=low,proto3" json:"low,omitempty"` Close float64 `protobuf:"fixed64,6,opt,name=close,proto3" json:"close,omitempty"` Volume float64 `protobuf:"fixed64,7,opt,name=volume,proto3" json:"volume,omitempty"` // contains filtered or unexported fields }
https://maicoin.github.io/max-websocket-docs/#/public_ticker?id=success-response
func (*Ticker) Descriptor
deprecated
func (*Ticker) GetExchange ¶
func (*Ticker) ProtoMessage ¶
func (*Ticker) ProtoMessage()
func (*Ticker) ProtoReflect ¶
func (x *Ticker) ProtoReflect() protoreflect.Message
type Trade ¶
type Trade struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` Quantity string `protobuf:"bytes,6,opt,name=quantity,proto3" json:"quantity,omitempty"` CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Side Side `protobuf:"varint,8,opt,name=side,proto3,enum=bbgo.Side" json:"side,omitempty"` FeeCurrency string `protobuf:"bytes,9,opt,name=fee_currency,json=feeCurrency,proto3" json:"fee_currency,omitempty"` Fee string `protobuf:"bytes,10,opt,name=fee,proto3" json:"fee,omitempty"` Maker bool `protobuf:"varint,11,opt,name=maker,proto3" json:"maker,omitempty"` // contains filtered or unexported fields }
https://maicoin.github.io/max-websocket-docs/#/private_channels?id=trade-response https://maicoin.github.io/max-websocket-docs/#/public_trade?id=success-response
func (*Trade) Descriptor
deprecated
func (*Trade) GetCreatedAt ¶
func (*Trade) GetExchange ¶
func (*Trade) GetFeeCurrency ¶
func (*Trade) GetQuantity ¶
func (*Trade) GetSession ¶
func (*Trade) ProtoMessage ¶
func (*Trade) ProtoMessage()
func (*Trade) ProtoReflect ¶
func (x *Trade) ProtoReflect() protoreflect.Message
type TradingServiceClient ¶
type TradingServiceClient interface { // request-response SubmitOrder(ctx context.Context, in *SubmitOrderRequest, opts ...grpc.CallOption) (*SubmitOrderResponse, error) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*CancelOrderResponse, error) QueryOrder(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) QueryOrders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) QueryTrades(ctx context.Context, in *QueryTradesRequest, opts ...grpc.CallOption) (*QueryTradesResponse, error) }
TradingServiceClient is the client API for TradingService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTradingServiceClient ¶
func NewTradingServiceClient(cc grpc.ClientConnInterface) TradingServiceClient
type TradingServiceServer ¶
type TradingServiceServer interface { // request-response SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderResponse, error) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error) QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error) QueryOrders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error) QueryTrades(context.Context, *QueryTradesRequest) (*QueryTradesResponse, error) // contains filtered or unexported methods }
TradingServiceServer is the server API for TradingService service. All implementations must embed UnimplementedTradingServiceServer for forward compatibility
type UnimplementedMarketDataServiceServer ¶
type UnimplementedMarketDataServiceServer struct { }
UnimplementedMarketDataServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMarketDataServiceServer) QueryKLines ¶
func (UnimplementedMarketDataServiceServer) QueryKLines(context.Context, *QueryKLinesRequest) (*QueryKLinesResponse, error)
func (UnimplementedMarketDataServiceServer) Subscribe ¶
func (UnimplementedMarketDataServiceServer) Subscribe(*SubscribeRequest, MarketDataService_SubscribeServer) error
type UnimplementedTradingServiceServer ¶
type UnimplementedTradingServiceServer struct { }
UnimplementedTradingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTradingServiceServer) CancelOrder ¶
func (UnimplementedTradingServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error)
func (UnimplementedTradingServiceServer) QueryOrder ¶
func (UnimplementedTradingServiceServer) QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error)
func (UnimplementedTradingServiceServer) QueryOrders ¶
func (UnimplementedTradingServiceServer) QueryOrders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error)
func (UnimplementedTradingServiceServer) QueryTrades ¶
func (UnimplementedTradingServiceServer) QueryTrades(context.Context, *QueryTradesRequest) (*QueryTradesResponse, error)
func (UnimplementedTradingServiceServer) SubmitOrder ¶
func (UnimplementedTradingServiceServer) SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderResponse, error)
type UnimplementedUserDataServiceServer ¶
type UnimplementedUserDataServiceServer struct { }
UnimplementedUserDataServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserDataServiceServer) Subscribe ¶
func (UnimplementedUserDataServiceServer) Subscribe(*UserDataRequest, UserDataService_SubscribeServer) error
type UnsafeMarketDataServiceServer ¶
type UnsafeMarketDataServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMarketDataServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MarketDataServiceServer will result in compilation errors.
type UnsafeTradingServiceServer ¶
type UnsafeTradingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTradingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TradingServiceServer will result in compilation errors.
type UnsafeUserDataServiceServer ¶
type UnsafeUserDataServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserDataServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserDataServiceServer will result in compilation errors.
type UserData ¶
type UserData struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` Channel Channel `protobuf:"varint,3,opt,name=channel,proto3,enum=bbgo.Channel" json:"channel,omitempty"` // trade, order, balance Event Event `protobuf:"varint,4,opt,name=event,proto3,enum=bbgo.Event" json:"event,omitempty"` // snapshot, update ... Balances []*Balance `protobuf:"bytes,5,rep,name=balances,proto3" json:"balances,omitempty"` Trades []*Trade `protobuf:"bytes,6,rep,name=trades,proto3" json:"trades,omitempty"` Orders []*Order `protobuf:"bytes,7,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*UserData) Descriptor
deprecated
func (*UserData) GetBalances ¶
func (*UserData) GetChannel ¶
func (*UserData) GetExchange ¶
func (*UserData) GetSession ¶
func (*UserData) ProtoMessage ¶
func (*UserData) ProtoMessage()
func (*UserData) ProtoReflect ¶
func (x *UserData) ProtoReflect() protoreflect.Message
type UserDataRequest ¶
type UserDataRequest struct { Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // contains filtered or unexported fields }
func (*UserDataRequest) Descriptor
deprecated
func (*UserDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserDataRequest.ProtoReflect.Descriptor instead.
func (*UserDataRequest) GetSession ¶
func (x *UserDataRequest) GetSession() string
func (*UserDataRequest) ProtoMessage ¶
func (*UserDataRequest) ProtoMessage()
func (*UserDataRequest) ProtoReflect ¶
func (x *UserDataRequest) ProtoReflect() protoreflect.Message
func (*UserDataRequest) Reset ¶
func (x *UserDataRequest) Reset()
func (*UserDataRequest) String ¶
func (x *UserDataRequest) String() string
type UserDataServiceClient ¶
type UserDataServiceClient interface {
Subscribe(ctx context.Context, in *UserDataRequest, opts ...grpc.CallOption) (UserDataService_SubscribeClient, error)
}
UserDataServiceClient is the client API for UserDataService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserDataServiceClient ¶
func NewUserDataServiceClient(cc grpc.ClientConnInterface) UserDataServiceClient
type UserDataServiceServer ¶
type UserDataServiceServer interface { Subscribe(*UserDataRequest, UserDataService_SubscribeServer) error // contains filtered or unexported methods }
UserDataServiceServer is the server API for UserDataService service. All implementations must embed UnimplementedUserDataServiceServer for forward compatibility
type UserDataService_SubscribeClient ¶
type UserDataService_SubscribeClient interface { Recv() (*UserData, error) grpc.ClientStream }
type UserDataService_SubscribeServer ¶
type UserDataService_SubscribeServer interface { Send(*UserData) error grpc.ServerStream }