pb

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 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",
		6:  "ORDER_SNAPSHOT",
		7:  "ORDER_UPDATE",
		8:  "TRADE_SNAPSHOT",
		9:  "TRADE_UPDATE",
		10: "ACCOUNT_SNAPSHOT",
		11: "ACCOUNT_UPDATE",
		99: "ERROR",
	}
	Event_value = map[string]int32{
		"UNKNOWN":          0,
		"SUBSCRIBED":       1,
		"UNSUBSCRIBED":     2,
		"SNAPSHOT":         3,
		"UPDATE":           4,
		"AUTHENTICATED":    5,
		"ORDER_SNAPSHOT":   6,
		"ORDER_UPDATE":     7,
		"TRADE_SNAPSHOT":   8,
		"TRADE_UPDATE":     9,
		"ACCOUNT_SNAPSHOT": 10,
		"ACCOUNT_UPDATE":   11,
		"ERROR":            99,
	}
)

Enum value maps for Event.

View Source
var (
	Channel_name = map[int32]string{
		0: "BOOK",
		1: "TRADE",
		2: "TICKER",
		3: "USER",
	}
	Channel_value = map[string]int32{
		"BOOK":   0,
		"TRADE":  1,
		"TICKER": 2,
		"USER":   3,
	}
)

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:    "SubscribeUserData",
			Handler:       _UserDataService_SubscribeUserData_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 {
	Exchange  string  `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"`
	Currency  string  `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`
	Available float64 `protobuf:"fixed64,3,opt,name=available,proto3" json:"available,omitempty"`
	Locked    float64 `protobuf:"fixed64,4,opt,name=locked,proto3" json:"locked,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() float64

func (*Balance) GetCurrency

func (x *Balance) GetCurrency() string

func (*Balance) GetExchange

func (x *Balance) GetExchange() string

func (*Balance) GetLocked

func (x *Balance) GetLocked() float64

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 {
	Exchange      string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,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 (*CancelOrderRequest) Descriptor deprecated

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

Deprecated: Use CancelOrderRequest.ProtoReflect.Descriptor instead.

func (*CancelOrderRequest) GetClientOrderId

func (x *CancelOrderRequest) GetClientOrderId() string

func (*CancelOrderRequest) GetExchange

func (x *CancelOrderRequest) GetExchange() string

func (*CancelOrderRequest) GetId

func (x *CancelOrderRequest) GetId() 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_USER   Channel = 3
)

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_ORDER_SNAPSHOT   Event = 6
	Event_ORDER_UPDATE     Event = 7
	Event_TRADE_SNAPSHOT   Event = 8
	Event_TRADE_UPDATE     Event = 9
	Event_ACCOUNT_SNAPSHOT Event = 10
	Event_ACCOUNT_UPDATE   Event = 11
	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 {
	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"`
	Open        float64 `protobuf:"fixed64,4,opt,name=open,proto3" json:"open,omitempty"`
	High        float64 `protobuf:"fixed64,5,opt,name=high,proto3" json:"high,omitempty"`
	Low         float64 `protobuf:"fixed64,6,opt,name=low,proto3" json:"low,omitempty"`
	Close       float64 `protobuf:"fixed64,7,opt,name=close,proto3" json:"close,omitempty"`
	Volume      float64 `protobuf:"fixed64,8,opt,name=volume,proto3" json:"volume,omitempty"`
	QuoteVolume float64 `protobuf:"fixed64,9,opt,name=quote_volume,json=quoteVolume,proto3" json:"quote_volume,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() float64

func (*KLine) GetExchange

func (x *KLine) GetExchange() string

func (*KLine) GetHigh

func (x *KLine) GetHigh() float64

func (*KLine) GetLow

func (x *KLine) GetLow() float64

func (*KLine) GetOpen

func (x *KLine) GetOpen() float64

func (*KLine) GetQuoteVolume

func (x *KLine) GetQuoteVolume() float64

func (*KLine) GetSymbol

func (x *KLine) GetSymbol() string

func (*KLine) GetTimestamp

func (x *KLine) GetTimestamp() int64

func (*KLine) GetVolume

func (x *KLine) GetVolume() float64

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 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() (*SubscribeResponse, error)
	grpc.ClientStream
}

type MarketDataService_SubscribeServer added in v1.30.0

type MarketDataService_SubscribeServer interface {
	Send(*SubscribeResponse) 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          float64   `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"`
	StopPrice      float64   `protobuf:"fixed64,7,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"`
	AvgPrice       float64   `protobuf:"fixed64,8,opt,name=avg_price,json=avgPrice,proto3" json:"avg_price,omitempty"`
	Status         string    `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
	CreatedAt      int64     `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Quantity       float64   `protobuf:"fixed64,11,opt,name=quantity,proto3" json:"quantity,omitempty"`
	ExecutedVolume float64   `protobuf:"fixed64,12,opt,name=executed_volume,json=executedVolume,proto3" json:"executed_volume,omitempty"`
	TradesCount    int64     `protobuf:"varint,13,opt,name=trades_count,json=tradesCount,proto3" json:"trades_count,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"`
	// 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) GetAvgPrice

func (x *Order) GetAvgPrice() float64

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) GetExecutedVolume

func (x *Order) GetExecutedVolume() float64

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() float64

func (*Order) GetQuantity

func (x *Order) GetQuantity() float64

func (*Order) GetSide

func (x *Order) GetSide() Side

func (*Order) GetStatus

func (x *Order) GetStatus() string

func (*Order) GetStopPrice

func (x *Order) GetStopPrice() float64

func (*Order) GetSymbol

func (x *Order) GetSymbol() string

func (*Order) GetTradesCount

func (x *Order) GetTradesCount() int64

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  int64 `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"`
	Volume int64 `protobuf:"varint,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() int64

func (*PriceVolume) GetVolume

func (x *PriceVolume) GetVolume() int64

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
	Timestamp int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Limit     int64  `protobuf:"varint,5,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) GetExchange

func (x *QueryKLinesRequest) GetExchange() string

func (*QueryKLinesRequest) GetInterval

func (x *QueryKLinesRequest) GetInterval() string

func (*QueryKLinesRequest) GetLimit

func (x *QueryKLinesRequest) GetLimit() int64

func (*QueryKLinesRequest) GetSymbol

func (x *QueryKLinesRequest) GetSymbol() string

func (*QueryKLinesRequest) GetTimestamp

func (x *QueryKLinesRequest) GetTimestamp() int64

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 {
	Exchange      string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,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) GetExchange

func (x *QueryOrderRequest) GetExchange() string

func (*QueryOrderRequest) GetId

func (x *QueryOrderRequest) GetId() 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 {
	Exchange   string   `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,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) GetExchange

func (x *QueryOrdersRequest) GetExchange() string

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) 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 {
	Exchange      string    `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"`
	Symbol        string    `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Side          Side      `protobuf:"varint,3,opt,name=side,proto3,enum=bbgo.Side" json:"side,omitempty"`
	Quantity      float64   `protobuf:"fixed64,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Price         float64   `protobuf:"fixed64,5,opt,name=price,proto3" json:"price,omitempty"`
	StopPrice     float64   `protobuf:"fixed64,6,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"`
	OrderType     OrderType `protobuf:"varint,7,opt,name=order_type,json=orderType,proto3,enum=bbgo.OrderType" json:"order_type,omitempty"`
	ClientOrderId string    `protobuf:"bytes,8,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"`
	GroupId       int64     `protobuf:"varint,9,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() float64

func (*SubmitOrder) GetQuantity

func (x *SubmitOrder) GetQuantity() float64

func (*SubmitOrder) GetSide

func (x *SubmitOrder) GetSide() Side

func (*SubmitOrder) GetStopPrice

func (x *SubmitOrder) GetStopPrice() float64

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 {
	SubmitOrder *SubmitOrder `protobuf:"bytes,1,opt,name=submit_order,json=submitOrder,proto3" json:"submit_order,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitOrderRequest) Descriptor deprecated

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

Deprecated: Use SubmitOrderRequest.ProtoReflect.Descriptor instead.

func (*SubmitOrderRequest) GetSubmitOrder

func (x *SubmitOrderRequest) GetSubmitOrder() *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 {
	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 (*SubmitOrderResponse) Descriptor deprecated

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

Deprecated: Use SubmitOrderResponse.ProtoReflect.Descriptor instead.

func (*SubmitOrderResponse) GetError

func (x *SubmitOrderResponse) GetError() *Error

func (*SubmitOrderResponse) GetOrder

func (x *SubmitOrderResponse) GetOrder() *Order

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 SubscribeResponse

type SubscribeResponse 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"`
	Channel      Channel    `protobuf:"varint,3,opt,name=channel,proto3,enum=bbgo.Channel" json:"channel,omitempty"` // book, trade, ticker, user
	Event        Event      `protobuf:"varint,4,opt,name=event,proto3,enum=bbgo.Event" json:"event,omitempty"`       // snapshot, update, order_snapshot, ...
	Depth        *Depth     `protobuf:"bytes,5,opt,name=depth,proto3" json:"depth,omitempty"`
	Trades       []*Trade   `protobuf:"bytes,6,rep,name=trades,proto3" json:"trades,omitempty"`
	Ticker       *Ticker    `protobuf:"bytes,7,opt,name=ticker,proto3" json:"ticker,omitempty"`
	Orders       []*Order   `protobuf:"bytes,8,rep,name=orders,proto3" json:"orders,omitempty"`
	Balances     []*Balance `protobuf:"bytes,9,rep,name=balances,proto3" json:"balances,omitempty"`
	SubscribedAt int64      `protobuf:"varint,10,opt,name=subscribed_at,json=subscribedAt,proto3" json:"subscribed_at,omitempty"`
	Error        *Error     `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetBalances

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

func (*SubscribeResponse) GetChannel

func (x *SubscribeResponse) GetChannel() Channel

func (*SubscribeResponse) GetDepth

func (x *SubscribeResponse) GetDepth() *Depth

func (*SubscribeResponse) GetError

func (x *SubscribeResponse) GetError() *Error

func (*SubscribeResponse) GetEvent

func (x *SubscribeResponse) GetEvent() Event

func (*SubscribeResponse) GetExchange

func (x *SubscribeResponse) GetExchange() string

func (*SubscribeResponse) GetOrders

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

func (*SubscribeResponse) GetSubscribedAt

func (x *SubscribeResponse) GetSubscribedAt() int64

func (*SubscribeResponse) GetSymbol

func (x *SubscribeResponse) GetSymbol() string

func (*SubscribeResponse) GetTicker

func (x *SubscribeResponse) GetTicker() *Ticker

func (*SubscribeResponse) GetTrades

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

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) 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    int64   `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"`
	// 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() int64

func (*Subscription) GetExchange

func (x *Subscription) GetExchange() 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 {
	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"`
	Price       float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"`
	Volume      float64 `protobuf:"fixed64,5,opt,name=volume,proto3" json:"volume,omitempty"`
	CreatedAt   int64   `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Side        Side    `protobuf:"varint,7,opt,name=side,proto3,enum=bbgo.Side" json:"side,omitempty"`
	Fee         float64 `protobuf:"fixed64,8,opt,name=fee,proto3" json:"fee,omitempty"`
	FeeCurrency string  `protobuf:"bytes,9,opt,name=fee_currency,json=feeCurrency,proto3" json:"fee_currency,omitempty"`
	Maker       bool    `protobuf:"varint,10,opt,name=maker,proto3" json:"maker,omitempty"`
	Trend       string  `protobuf:"bytes,11,opt,name=trend,proto3" json:"trend,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() float64

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() float64

func (*Trade) GetSide

func (x *Trade) GetSide() Side

func (*Trade) GetSymbol

func (x *Trade) GetSymbol() string

func (*Trade) GetTrend

func (x *Trade) GetTrend() string

func (*Trade) GetVolume

func (x *Trade) GetVolume() float64

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

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

type UserDataServiceClient interface {
	// should support streaming
	SubscribeUserData(ctx context.Context, in *Empty, opts ...grpc.CallOption) (UserDataService_SubscribeUserDataClient, 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 {
	// should support streaming
	SubscribeUserData(*Empty, UserDataService_SubscribeUserDataServer) error
	// contains filtered or unexported methods
}

UserDataServiceServer is the server API for UserDataService service. All implementations must embed UnimplementedUserDataServiceServer for forward compatibility

type UserDataService_SubscribeUserDataClient added in v1.30.0

type UserDataService_SubscribeUserDataClient interface {
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type UserDataService_SubscribeUserDataServer added in v1.30.0

type UserDataService_SubscribeUserDataServer interface {
	Send(*SubscribeResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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