Versions in this module Expand all Collapse all v0 v0.1.0 Jul 22, 2026 Changes in this version + var ErrBufferTooSmall = codec.ErrBufferTooSmall + func AppendCommandJSON(dst []byte, cmdType CommandType, buf []byte) []byte + type CancelAll struct + AccountID int + SymbolID int + func NewCancelAllFromBytes(buf []byte) (CancelAll, error) + func (c CancelAll) AppendJSON(dst []byte) []byte + func (c CancelAll) CommandType() CommandType + func (c CancelAll) Encode(buf []byte) error + func (c CancelAll) GetBufferLength() int + type CancelOrder struct + AccountID int + ClientOrderID int + func NewCancelOrderFromBytes(buf []byte) (CancelOrder, error) + func (c CancelOrder) AppendJSON(dst []byte) []byte + func (c CancelOrder) CommandType() CommandType + func (c CancelOrder) Encode(buf []byte) error + func (c CancelOrder) GetBufferLength() int + type CommandType int + const CommandTypeCancelAll + const CommandTypeOrderCancel + const CommandTypeOrderRiskCheck + const CommandTypeOrderSubmit + const CommandTypeQryBalanceSnapshot + const CommandTypeReqDepthSnapshot + const CommandTypeReqHistoricalKline + const CommandTypeUnknown + func (t CommandType) String() string + type QryBalanceSnapshot struct + AccountID int + func NewQryBalanceSnapshotFromBytes(buf []byte) (QryBalanceSnapshot, error) + func (q QryBalanceSnapshot) AppendJSON(dst []byte) []byte + func (q QryBalanceSnapshot) CommandType() CommandType + func (q QryBalanceSnapshot) Encode(buf []byte) error + func (q QryBalanceSnapshot) GetBufferLength() int + type ReqDepthSnapshot struct + SymbolID int + func NewReqDepthSnapshotFromBytes(buf []byte) (ReqDepthSnapshot, error) + func (r ReqDepthSnapshot) AppendJSON(dst []byte) []byte + func (r ReqDepthSnapshot) CommandType() CommandType + func (r ReqDepthSnapshot) Encode(buf []byte) error + func (r ReqDepthSnapshot) GetBufferLength() int + type ReqHistoricalKline struct + EndTime uint64 + Interval common.Interval + Limit int + StartTime uint64 + SymbolID int + func NewReqHistoricalKlineFromBytes(buf []byte) (ReqHistoricalKline, error) + func (r ReqHistoricalKline) AppendJSON(dst []byte) []byte + func (r ReqHistoricalKline) CommandType() CommandType + func (r ReqHistoricalKline) Encode(buf []byte) error + func (r ReqHistoricalKline) GetBufferLength() int + type RiskCheck struct + AccountID int + ClientOrderID int + OrderType common.OrderType + Price float64 + Quantity float64 + Side common.Side + SymbolID int + TimeInForce common.TimeInForce + Timestamp uint64 + func NewRiskCheckFromBytes(buf []byte) (RiskCheck, error) + func (r RiskCheck) AppendJSON(dst []byte) []byte + func (r RiskCheck) CommandType() CommandType + func (r RiskCheck) Encode(buf []byte) error + func (r RiskCheck) GetBufferLength() int + type SubmitOrder struct + AccountID int + ClientOrderID int + OrderType common.OrderType + Price float64 + Quantity float64 + Side common.Side + SymbolID int + TimeInForce common.TimeInForce + func NewSubmitOrderFromBytes(buf []byte) (SubmitOrder, error) + func (s SubmitOrder) AppendJSON(dst []byte) []byte + func (s SubmitOrder) CommandType() CommandType + func (s SubmitOrder) Encode(buf []byte) error + func (s SubmitOrder) GetBufferLength() int