pb

package
v1.30.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 8 Imported by: 1

README

Protocol Buffers

Generate code

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
cd <bbgo>/pkg/protobuf
protoc -I=. --go_out=. bbgo.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
var (
	Side_name = map[int32]string{
		0: "BUY",
		1: "SELL",
	}
	Side_value = map[string]int32{
		"BUY":  0,
		"SELL": 1,
	}
)

Enum value maps for Side.

View Source
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.

View Source
var File_pkg_pb_bbgo_proto protoreflect.FileDescriptor
View Source
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)

View Source
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)

View Source
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 added in v1.30.0

func RegisterMarketDataServiceServer(s grpc.ServiceRegistrar, srv MarketDataServiceServer)

func RegisterTradingServiceServer added in v1.30.0

func RegisterTradingServiceServer(s grpc.ServiceRegistrar, srv TradingServiceServer)

func RegisterUserDataServiceServer added in v1.30.0

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) Descriptor() ([]byte, []int)

Deprecated: Use Balance.ProtoReflect.Descriptor instead.

func (*Balance) GetAvailable

func (x *Balance) GetAvailable() string

func (*Balance) GetBorrowed added in v1.30.2

func (x *Balance) GetBorrowed() string

func (*Balance) GetCurrency

func (x *Balance) GetCurrency() string

func (*Balance) GetExchange

func (x *Balance) GetExchange() string

func (*Balance) GetLocked

func (x *Balance) GetLocked() string

func (*Balance) GetSession added in v1.30.3

func (x *Balance) GetSession() string

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) ProtoReflect

func (x *Balance) ProtoReflect() protoreflect.Message

func (*Balance) Reset

func (x *Balance) Reset()

func (*Balance) String

func (x *Balance) String() string

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 added in v1.30.3

func (x *CancelOrderRequest) GetOrderId() string

func (*CancelOrderRequest) GetSession added in v1.30.3

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 added in v1.30.0

type Channel int32
const (
	Channel_BOOK    Channel = 0
	Channel_TRADE   Channel = 1
	Channel_TICKER  Channel = 2
	Channel_KLINE   Channel = 3
	Channel_BALANCE Channel = 4
	Channel_ORDER   Channel = 5
)

func (Channel) Descriptor added in v1.30.0

func (Channel) Descriptor() protoreflect.EnumDescriptor

func (Channel) Enum added in v1.30.0

func (x Channel) Enum() *Channel

func (Channel) EnumDescriptor deprecated added in v1.30.0

func (Channel) EnumDescriptor() ([]byte, []int)

Deprecated: Use Channel.Descriptor instead.

func (Channel) Number added in v1.30.0

func (x Channel) Number() protoreflect.EnumNumber

func (Channel) String added in v1.30.0

func (x Channel) String() string

func (Channel) Type added in v1.30.0

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) Descriptor() ([]byte, []int)

Deprecated: Use Depth.ProtoReflect.Descriptor instead.

func (*Depth) GetAsks

func (x *Depth) GetAsks() []*PriceVolume

func (*Depth) GetBids

func (x *Depth) GetBids() []*PriceVolume

func (*Depth) GetExchange

func (x *Depth) GetExchange() string

func (*Depth) GetSymbol

func (x *Depth) GetSymbol() string

func (*Depth) ProtoMessage

func (*Depth) ProtoMessage()

func (*Depth) ProtoReflect

func (x *Depth) ProtoReflect() protoreflect.Message

func (*Depth) Reset

func (x *Depth) Reset()

func (*Depth) String

func (x *Depth) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetErrorCode

func (x *Error) GetErrorCode() int64

func (*Error) GetErrorMessage

func (x *Error) GetErrorMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Event added in v1.30.0

type Event int32
const (
	Event_UNKNOWN       Event = 0
	Event_SUBSCRIBED    Event = 1
	Event_UNSUBSCRIBED  Event = 2
	Event_SNAPSHOT      Event = 3
	Event_UPDATE        Event = 4
	Event_AUTHENTICATED Event = 5
	Event_ERROR         Event = 99
)

func (Event) Descriptor added in v1.30.0

func (Event) Descriptor() protoreflect.EnumDescriptor

func (Event) Enum added in v1.30.0

func (x Event) Enum() *Event

func (Event) EnumDescriptor deprecated added in v1.30.0

func (Event) EnumDescriptor() ([]byte, []int)

Deprecated: Use Event.Descriptor instead.

func (Event) Number added in v1.30.0

func (x Event) Number() protoreflect.EnumNumber

func (Event) String added in v1.30.0

func (x Event) String() string

func (Event) Type added in v1.30.0

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) Descriptor() ([]byte, []int)

Deprecated: Use KLine.ProtoReflect.Descriptor instead.

func (*KLine) GetClose

func (x *KLine) GetClose() string

func (*KLine) GetClosed added in v1.30.2

func (x *KLine) GetClosed() bool

func (*KLine) GetEndTime added in v1.30.1

func (x *KLine) GetEndTime() int64

func (*KLine) GetExchange

func (x *KLine) GetExchange() string

func (*KLine) GetHigh

func (x *KLine) GetHigh() string

func (*KLine) GetLow

func (x *KLine) GetLow() string

func (*KLine) GetOpen

func (x *KLine) GetOpen() string

func (*KLine) GetQuoteVolume

func (x *KLine) GetQuoteVolume() string

func (*KLine) GetSession added in v1.30.1

func (x *KLine) GetSession() string

func (*KLine) GetStartTime added in v1.30.1

func (x *KLine) GetStartTime() int64

func (*KLine) GetSymbol

func (x *KLine) GetSymbol() string

func (*KLine) GetVolume

func (x *KLine) GetVolume() string

func (*KLine) ProtoMessage

func (*KLine) ProtoMessage()

func (*KLine) ProtoReflect

func (x *KLine) ProtoReflect() protoreflect.Message

func (*KLine) Reset

func (x *KLine) Reset()

func (*KLine) String

func (x *KLine) String() string

type MarketData added in v1.30.2

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 added in v1.30.2

func (*MarketData) Descriptor() ([]byte, []int)

Deprecated: Use MarketData.ProtoReflect.Descriptor instead.

func (*MarketData) GetChannel added in v1.30.2

func (x *MarketData) GetChannel() Channel

func (*MarketData) GetDepth added in v1.30.2

func (x *MarketData) GetDepth() *Depth

func (*MarketData) GetError added in v1.30.2

func (x *MarketData) GetError() *Error

func (*MarketData) GetEvent added in v1.30.2

func (x *MarketData) GetEvent() Event

func (*MarketData) GetExchange added in v1.30.2

func (x *MarketData) GetExchange() string

func (*MarketData) GetKline added in v1.30.2

func (x *MarketData) GetKline() *KLine

func (*MarketData) GetSession added in v1.30.2

func (x *MarketData) GetSession() string

func (*MarketData) GetSubscribedAt added in v1.30.2

func (x *MarketData) GetSubscribedAt() int64

func (*MarketData) GetSymbol added in v1.30.2

func (x *MarketData) GetSymbol() string

func (*MarketData) GetTicker added in v1.30.2

func (x *MarketData) GetTicker() *Ticker

func (*MarketData) GetTrades added in v1.30.2

func (x *MarketData) GetTrades() []*Trade

func (*MarketData) ProtoMessage added in v1.30.2

func (*MarketData) ProtoMessage()

func (*MarketData) ProtoReflect added in v1.30.2

func (x *MarketData) ProtoReflect() protoreflect.Message

func (*MarketData) Reset added in v1.30.2

func (x *MarketData) Reset()

func (*MarketData) String added in v1.30.2

func (x *MarketData) String() string

type MarketDataServiceClient added in v1.30.0

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 added in v1.30.0

func NewMarketDataServiceClient(cc grpc.ClientConnInterface) MarketDataServiceClient

type MarketDataServiceServer added in v1.30.0

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 added in v1.30.0

type MarketDataService_SubscribeClient interface {
	Recv() (*MarketData, error)
	grpc.ClientStream
}

type MarketDataService_SubscribeServer added in v1.30.0

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) Descriptor() ([]byte, []int)

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetClientOrderId

func (x *Order) GetClientOrderId() string

func (*Order) GetCreatedAt

func (x *Order) GetCreatedAt() int64

func (*Order) GetExchange

func (x *Order) GetExchange() string

func (*Order) GetExecutedQuantity added in v1.30.2

func (x *Order) GetExecutedQuantity() string

func (*Order) GetGroupId

func (x *Order) GetGroupId() int64

func (*Order) GetId

func (x *Order) GetId() string

func (*Order) GetOrderType

func (x *Order) GetOrderType() OrderType

func (*Order) GetPrice

func (x *Order) GetPrice() string

func (*Order) GetQuantity

func (x *Order) GetQuantity() string

func (*Order) GetSide

func (x *Order) GetSide() Side

func (*Order) GetStatus

func (x *Order) GetStatus() string

func (*Order) GetStopPrice

func (x *Order) GetStopPrice() string

func (*Order) GetSymbol

func (x *Order) GetSymbol() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect

func (x *Order) ProtoReflect() protoreflect.Message

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

type OrderType added in v1.30.0

type OrderType int32
const (
	OrderType_MARKET      OrderType = 0
	OrderType_LIMIT       OrderType = 1
	OrderType_STOP_MARKET OrderType = 2
	OrderType_STOP_LIMIT  OrderType = 3
	OrderType_POST_ONLY   OrderType = 4
	OrderType_IOC_LIMIT   OrderType = 5
)

func (OrderType) Descriptor added in v1.30.0

func (OrderType) Descriptor() protoreflect.EnumDescriptor

func (OrderType) Enum added in v1.30.0

func (x OrderType) Enum() *OrderType

func (OrderType) EnumDescriptor deprecated added in v1.30.0

func (OrderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use OrderType.Descriptor instead.

func (OrderType) Number added in v1.30.0

func (x OrderType) Number() protoreflect.EnumNumber

func (OrderType) String added in v1.30.0

func (x OrderType) String() string

func (OrderType) Type added in v1.30.0

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 added in v1.30.1

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 added in v1.30.1

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 added in v1.30.3

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 added in v1.30.3

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 added in v1.30.0

type Side int32
const (
	Side_BUY  Side = 0
	Side_SELL Side = 1
)

func (Side) Descriptor added in v1.30.0

func (Side) Descriptor() protoreflect.EnumDescriptor

func (Side) Enum added in v1.30.0

func (x Side) Enum() *Side

func (Side) EnumDescriptor deprecated added in v1.30.0

func (Side) EnumDescriptor() ([]byte, []int)

Deprecated: Use Side.Descriptor instead.

func (Side) Number added in v1.30.0

func (x Side) Number() protoreflect.EnumNumber

func (Side) String added in v1.30.0

func (x Side) String() string

func (Side) Type added in v1.30.0

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 added in v1.30.3

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 added in v1.30.3

func (x *SubmitOrderRequest) GetSession() string

func (*SubmitOrderRequest) GetSubmitOrders added in v1.30.3

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 added in v1.30.3

func (x *SubmitOrderResponse) GetOrders() []*Order

func (*SubmitOrderResponse) GetSession added in v1.30.3

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 added in v1.30.1

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) Descriptor() ([]byte, []int)

Deprecated: Use Ticker.ProtoReflect.Descriptor instead.

func (*Ticker) GetClose

func (x *Ticker) GetClose() float64

func (*Ticker) GetExchange

func (x *Ticker) GetExchange() string

func (*Ticker) GetHigh

func (x *Ticker) GetHigh() float64

func (*Ticker) GetLow

func (x *Ticker) GetLow() float64

func (*Ticker) GetOpen

func (x *Ticker) GetOpen() float64

func (*Ticker) GetSymbol

func (x *Ticker) GetSymbol() string

func (*Ticker) GetVolume

func (x *Ticker) GetVolume() float64

func (*Ticker) ProtoMessage

func (*Ticker) ProtoMessage()

func (*Ticker) ProtoReflect

func (x *Ticker) ProtoReflect() protoreflect.Message

func (*Ticker) Reset

func (x *Ticker) Reset()

func (*Ticker) String

func (x *Ticker) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Trade.ProtoReflect.Descriptor instead.

func (*Trade) GetCreatedAt

func (x *Trade) GetCreatedAt() int64

func (*Trade) GetExchange

func (x *Trade) GetExchange() string

func (*Trade) GetFee

func (x *Trade) GetFee() string

func (*Trade) GetFeeCurrency

func (x *Trade) GetFeeCurrency() string

func (*Trade) GetId

func (x *Trade) GetId() string

func (*Trade) GetMaker

func (x *Trade) GetMaker() bool

func (*Trade) GetPrice

func (x *Trade) GetPrice() string

func (*Trade) GetQuantity added in v1.30.2

func (x *Trade) GetQuantity() string

func (*Trade) GetSession added in v1.30.2

func (x *Trade) GetSession() string

func (*Trade) GetSide

func (x *Trade) GetSide() Side

func (*Trade) GetSymbol

func (x *Trade) GetSymbol() string

func (*Trade) ProtoMessage

func (*Trade) ProtoMessage()

func (*Trade) ProtoReflect

func (x *Trade) ProtoReflect() protoreflect.Message

func (*Trade) Reset

func (x *Trade) Reset()

func (*Trade) String

func (x *Trade) String() string

type TradingServiceClient added in v1.30.0

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 added in v1.30.0

func NewTradingServiceClient(cc grpc.ClientConnInterface) TradingServiceClient

type TradingServiceServer added in v1.30.0

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 added in v1.30.0

type UnimplementedMarketDataServiceServer struct {
}

UnimplementedMarketDataServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMarketDataServiceServer) QueryKLines added in v1.30.0

func (UnimplementedMarketDataServiceServer) Subscribe added in v1.30.0

type UnimplementedTradingServiceServer added in v1.30.0

type UnimplementedTradingServiceServer struct {
}

UnimplementedTradingServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTradingServiceServer) CancelOrder added in v1.30.0

func (UnimplementedTradingServiceServer) QueryOrder added in v1.30.0

func (UnimplementedTradingServiceServer) QueryOrders added in v1.30.0

func (UnimplementedTradingServiceServer) QueryTrades added in v1.30.0

func (UnimplementedTradingServiceServer) SubmitOrder added in v1.30.0

type UnimplementedUserDataServiceServer added in v1.30.0

type UnimplementedUserDataServiceServer struct {
}

UnimplementedUserDataServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserDataServiceServer) Subscribe added in v1.30.2

type UnsafeMarketDataServiceServer added in v1.30.0

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 added in v1.30.0

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 added in v1.30.0

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 added in v1.30.2

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 added in v1.30.2

func (*UserData) Descriptor() ([]byte, []int)

Deprecated: Use UserData.ProtoReflect.Descriptor instead.

func (*UserData) GetBalances added in v1.30.2

func (x *UserData) GetBalances() []*Balance

func (*UserData) GetChannel added in v1.30.2

func (x *UserData) GetChannel() Channel

func (*UserData) GetEvent added in v1.30.2

func (x *UserData) GetEvent() Event

func (*UserData) GetExchange added in v1.30.2

func (x *UserData) GetExchange() string

func (*UserData) GetOrders added in v1.30.2

func (x *UserData) GetOrders() []*Order

func (*UserData) GetSession added in v1.30.2

func (x *UserData) GetSession() string

func (*UserData) GetTrades added in v1.30.2

func (x *UserData) GetTrades() []*Trade

func (*UserData) ProtoMessage added in v1.30.2

func (*UserData) ProtoMessage()

func (*UserData) ProtoReflect added in v1.30.2

func (x *UserData) ProtoReflect() protoreflect.Message

func (*UserData) Reset added in v1.30.2

func (x *UserData) Reset()

func (*UserData) String added in v1.30.2

func (x *UserData) String() string

type UserDataRequest added in v1.30.2

type UserDataRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDataRequest) Descriptor deprecated added in v1.30.2

func (*UserDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserDataRequest.ProtoReflect.Descriptor instead.

func (*UserDataRequest) GetSession added in v1.30.2

func (x *UserDataRequest) GetSession() string

func (*UserDataRequest) ProtoMessage added in v1.30.2

func (*UserDataRequest) ProtoMessage()

func (*UserDataRequest) ProtoReflect added in v1.30.2

func (x *UserDataRequest) ProtoReflect() protoreflect.Message

func (*UserDataRequest) Reset added in v1.30.2

func (x *UserDataRequest) Reset()

func (*UserDataRequest) String added in v1.30.2

func (x *UserDataRequest) String() string

type UserDataServiceClient added in v1.30.0

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 added in v1.30.0

func NewUserDataServiceClient(cc grpc.ClientConnInterface) UserDataServiceClient

type UserDataServiceServer added in v1.30.0

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 added in v1.30.2

type UserDataService_SubscribeClient interface {
	Recv() (*UserData, error)
	grpc.ClientStream
}

type UserDataService_SubscribeServer added in v1.30.2

type UserDataService_SubscribeServer interface {
	Send(*UserData) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL