Documentation
¶
Index ¶
- type AccountAsset
- type AccountAssets
- type CancelAllOrdersRequest
- type CancelOrderRequest
- type CancelOrderResponse
- type Candle
- type ClassicMixAccount
- type ClassicMixOrderList
- type ClassicMixOrderRecord
- type ClassicMixPositionRecord
- type ClassicSpotAsset
- type ClassicSpotOrderRecord
- type ClassicWSOrderMessage
- type ClassicWSPositionMessage
- type ClassicWSSpotOrderMessage
- type Client
- func (c *Client) CancelAllClassicMixOrders(ctx context.Context, productType, symbol, marginCoin string) error
- func (c *Client) CancelAllClassicSpotOrders(ctx context.Context, symbol string) error
- func (c *Client) CancelAllOrders(ctx context.Context, req *CancelAllOrdersRequest) error
- func (c *Client) CancelClassicMixOrder(ctx context.Context, ...) (*CancelOrderResponse, error)
- func (c *Client) CancelClassicSpotOrder(ctx context.Context, symbol, orderID, clientOID string) (*CancelOrderResponse, error)
- func (c *Client) CancelOrder(ctx context.Context, req *CancelOrderRequest) (*CancelOrderResponse, error)
- func (c *Client) GetAccountAssets(ctx context.Context) (*AccountAssets, error)
- func (c *Client) GetCandles(ctx context.Context, category, symbol, interval, candleType string, ...) ([]Candle, error)
- func (c *Client) GetClassicMixAccount(ctx context.Context, symbol, productType, marginCoin string) (*ClassicMixAccount, error)
- func (c *Client) GetClassicMixOpenOrders(ctx context.Context, productType, symbol string) ([]ClassicMixOrderRecord, error)
- func (c *Client) GetClassicMixOrder(ctx context.Context, symbol, productType, orderID, clientOID string) (*ClassicMixOrderRecord, error)
- func (c *Client) GetClassicMixOrderHistory(ctx context.Context, productType, symbol string) ([]ClassicMixOrderRecord, error)
- func (c *Client) GetClassicMixPositions(ctx context.Context, productType, marginCoin string) ([]ClassicMixPositionRecord, error)
- func (c *Client) GetClassicSpotAssets(ctx context.Context, coin string) ([]ClassicSpotAsset, error)
- func (c *Client) GetClassicSpotOpenOrders(ctx context.Context, symbol string) ([]ClassicSpotOrderRecord, error)
- func (c *Client) GetClassicSpotOrder(ctx context.Context, orderID, clientOID string) (*ClassicSpotOrderRecord, error)
- func (c *Client) GetClassicSpotOrderHistory(ctx context.Context, symbol string) ([]ClassicSpotOrderRecord, error)
- func (c *Client) GetCurrentPositions(ctx context.Context, category, symbol string) ([]PositionRecord, error)
- func (c *Client) GetInstruments(ctx context.Context, category, symbol string) ([]Instrument, error)
- func (c *Client) GetOpenOrders(ctx context.Context, category, symbol string) ([]OrderRecord, error)
- func (c *Client) GetOrder(ctx context.Context, category, symbol, orderID, clientOID string) (*OrderRecord, error)
- func (c *Client) GetOrderBook(ctx context.Context, category, symbol string, limit int) (*OrderBook, error)
- func (c *Client) GetOrderHistory(ctx context.Context, category, symbol string) ([]OrderRecord, error)
- func (c *Client) GetRecentFills(ctx context.Context, category, symbol string, limit int) ([]PublicFill, error)
- func (c *Client) GetTicker(ctx context.Context, category, symbol string) (*Ticker, error)
- func (c *Client) HasCredentials() bool
- func (c *Client) ModifyClassicMixOrder(ctx context.Context, req *ModifyOrderRequest, productType, marginCoin string) (*CancelOrderResponse, error)
- func (c *Client) ModifyOrder(ctx context.Context, req *ModifyOrderRequest) (*CancelOrderResponse, error)
- func (c *Client) PlaceClassicMixOrder(ctx context.Context, req *PlaceOrderRequest, productType, marginCoin string) (*PlaceOrderResponse, error)
- func (c *Client) PlaceClassicSpotOrder(ctx context.Context, req *PlaceOrderRequest) (*PlaceOrderResponse, error)
- func (c *Client) PlaceOrder(ctx context.Context, req *PlaceOrderRequest) (*PlaceOrderResponse, error)
- func (c *Client) SetClassicMixLeverage(ctx context.Context, symbol, productType, marginCoin, leverage string) error
- func (c *Client) SetLeverage(ctx context.Context, req *SetLeverageRequest) error
- func (c *Client) WithBaseURL(baseURL string) *Client
- func (c *Client) WithCredentials(apiKey, secretKey, passphrase string) *Client
- func (c *Client) WithHTTPClient(httpClient *http.Client) *Client
- type FeeDetail
- type FlexibleFeeDetails
- type Instrument
- type ModifyOrderRequest
- type NumberString
- type OrderBook
- type OrderList
- type OrderRecord
- type PlaceOrderRequest
- type PlaceOrderResponse
- type PositionList
- type PositionRecord
- type PrivateWSClient
- func (c *PrivateWSClient) CancelClassicPerpOrderWS(symbol, instType, marginCoin, orderID, clientOID string) (*CancelOrderResponse, error)
- func (c *PrivateWSClient) CancelClassicSpotOrderWS(symbol, orderID, clientOID string) (*CancelOrderResponse, error)
- func (c *PrivateWSClient) Close() error
- func (c *PrivateWSClient) Connect(ctx context.Context) error
- func (c *PrivateWSClient) PlaceClassicPerpOrderWS(req *PlaceOrderRequest, instType, marginCoin string) (*PlaceOrderResponse, error)
- func (c *PrivateWSClient) PlaceClassicSpotOrderWS(req *PlaceOrderRequest) (*PlaceOrderResponse, error)
- func (c *PrivateWSClient) Subscribe(ctx context.Context, arg WSArg, handler func(json.RawMessage)) error
- func (c *PrivateWSClient) Unsubscribe(ctx context.Context, arg WSArg) error
- func (c *PrivateWSClient) WithClassicMode() *PrivateWSClient
- func (c *PrivateWSClient) WithCredentials(apiKey, secretKey, passphrase string) *PrivateWSClient
- type PublicFill
- type PublicWSClient
- type SetLeverageRequest
- type Ticker
- type WSArg
- type WSEnvelope
- type WSOrderBookData
- type WSOrderBookMessage
- type WSOrderMessage
- type WSPositionMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAsset ¶
type AccountAssets ¶
type AccountAssets struct {
AccountEquity string `json:"accountEquity"`
UsdtEquity string `json:"usdtEquity"`
Available string `json:"available"`
UnrealizedPL string `json:"unrealizedPL"`
Coupon string `json:"coupon"`
UnionTotalMargin string `json:"unionTotalMargin"`
Assets []AccountAsset `json:"assets"`
}
type CancelAllOrdersRequest ¶
type CancelOrderRequest ¶
type CancelOrderResponse ¶
type ClassicMixAccount ¶
type ClassicMixAccount struct {
MarginCoin string `json:"marginCoin"`
Locked string `json:"locked"`
Available string `json:"available"`
CrossedMaxAvailable string `json:"crossedMaxAvailable"`
IsolatedMaxAvailable string `json:"isolatedMaxAvailable"`
MaxTransferOut string `json:"maxTransferOut"`
AccountEquity string `json:"accountEquity"`
UsdtEquity string `json:"usdtEquity"`
BtcEquity string `json:"btcEquity"`
CrossedRiskRate string `json:"crossedRiskRate"`
CrossedMarginLeverage NumberString `json:"crossedMarginLeverage"`
IsolatedLongLever NumberString `json:"isolatedLongLever"`
IsolatedShortLever NumberString `json:"isolatedShortLever"`
MarginMode string `json:"marginMode"`
PosMode string `json:"posMode"`
UnrealizedPL string `json:"unrealizedPL"`
Coupon string `json:"coupon"`
CrossedUnrealizedPL string `json:"crossedUnrealizedPL"`
IsolatedUnrealizedPL string `json:"isolatedUnrealizedPL"`
Grant string `json:"grant"`
AssetMode string `json:"assetMode"`
}
type ClassicMixOrderList ¶
type ClassicMixOrderList struct {
EntrustedList []ClassicMixOrderRecord `json:"entrustedList"`
EndID string `json:"endId"`
}
type ClassicMixOrderRecord ¶
type ClassicMixOrderRecord struct {
Symbol string `json:"symbol"`
InstID string `json:"instId"`
Size string `json:"size"`
OrderID string `json:"orderId"`
ClientOID string `json:"clientOid"`
BaseVolume string `json:"baseVolume"`
AccBaseVolume string `json:"accBaseVolume"`
Fee string `json:"fee"`
Price string `json:"price"`
PriceAvg string `json:"priceAvg"`
Status string `json:"status"`
Side string `json:"side"`
Force string `json:"force"`
TotalProfits string `json:"totalProfits"`
PosSide string `json:"posSide"`
MarginCoin string `json:"marginCoin"`
QuoteVolume string `json:"quoteVolume"`
Leverage string `json:"leverage"`
MarginMode string `json:"marginMode"`
ReduceOnly string `json:"reduceOnly"`
EnterPointSource string `json:"enterPointSource"`
TradeSide string `json:"tradeSide"`
PosMode string `json:"posMode"`
OrderType string `json:"orderType"`
OrderSource string `json:"orderSource"`
CTime string `json:"cTime"`
UTime string `json:"uTime"`
PresetStopSurplusPrice string `json:"presetStopSurplusPrice"`
PresetStopSurplusType string `json:"presetStopSurplusType"`
PresetStopSurplusExecutePrice string `json:"presetStopSurplusExecutePrice"`
PresetStopLossPrice string `json:"presetStopLossPrice"`
PresetStopLossType string `json:"presetStopLossType"`
PresetStopLossExecutePrice string `json:"presetStopLossExecutePrice"`
FeeDetail []FeeDetail `json:"feeDetail"`
}
type ClassicMixPositionRecord ¶
type ClassicMixPositionRecord struct {
PosID string `json:"posId"`
Symbol string `json:"symbol"`
InstID string `json:"instId"`
MarginCoin string `json:"marginCoin"`
MarginSize string `json:"marginSize"`
MarginMode string `json:"marginMode"`
HoldSide string `json:"holdSide"`
PosMode string `json:"posMode"`
Total string `json:"total"`
Available string `json:"available"`
Frozen string `json:"frozen"`
OpenPriceAvg string `json:"openPriceAvg"`
Leverage string `json:"leverage"`
AchievedProfits string `json:"achievedProfits"`
UnrealizedPL string `json:"unrealizedPL"`
LiquidationPrice string `json:"liquidationPrice"`
KeepMarginRate string `json:"keepMarginRate"`
MarkPrice string `json:"markPrice"`
MarginRate string `json:"marginRate"`
BreakEvenPrice string `json:"breakEvenPrice"`
TotalFee string `json:"totalFee"`
DeductedFee string `json:"deductedFee"`
AssetMode string `json:"assetMode"`
AutoMargin string `json:"autoMargin"`
CTime string `json:"cTime"`
UTime string `json:"uTime"`
}
type ClassicSpotAsset ¶
type ClassicSpotOrderRecord ¶
type ClassicSpotOrderRecord struct {
UserID string `json:"userId"`
Symbol string `json:"symbol"`
InstID string `json:"instId"`
OrderID string `json:"orderId"`
ClientOID string `json:"clientOid"`
Price string `json:"price"`
Size string `json:"size"`
NewSize string `json:"newSize"`
OrderType string `json:"orderType"`
Force string `json:"force"`
Side string `json:"side"`
Status string `json:"status"`
FillPrice string `json:"fillPrice"`
FillFee string `json:"fillFee"`
FillFeeCoin string `json:"fillFeeCoin"`
PriceAvg string `json:"priceAvg"`
BasePrice string `json:"basePrice"`
BaseVolume string `json:"baseVolume"`
AccBaseVolume string `json:"accBaseVolume"`
QuoteVolume string `json:"quoteVolume"`
EnterPointSource string `json:"enterPointSource"`
FeeDetail FlexibleFeeDetails `json:"feeDetail"`
OrderSource string `json:"orderSource"`
CancelReason string `json:"cancelReason"`
CTime string `json:"cTime"`
UTime string `json:"uTime"`
}
type ClassicWSOrderMessage ¶
type ClassicWSOrderMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []ClassicMixOrderRecord `json:"data"`
}
func DecodeClassicWSOrderMessage ¶
func DecodeClassicWSOrderMessage(payload []byte) (*ClassicWSOrderMessage, error)
type ClassicWSPositionMessage ¶
type ClassicWSPositionMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []ClassicMixPositionRecord `json:"data"`
}
func DecodeClassicWSPositionMessage ¶
func DecodeClassicWSPositionMessage(payload []byte) (*ClassicWSPositionMessage, error)
type ClassicWSSpotOrderMessage ¶
type ClassicWSSpotOrderMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []ClassicSpotOrderRecord `json:"data"`
}
func DecodeClassicWSSpotOrderMessage ¶
func DecodeClassicWSSpotOrderMessage(payload []byte) (*ClassicWSSpotOrderMessage, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelAllClassicMixOrders ¶
func (*Client) CancelAllClassicSpotOrders ¶
func (*Client) CancelAllOrders ¶
func (c *Client) CancelAllOrders(ctx context.Context, req *CancelAllOrdersRequest) error
func (*Client) CancelClassicMixOrder ¶
func (*Client) CancelClassicSpotOrder ¶
func (*Client) CancelOrder ¶
func (c *Client) CancelOrder(ctx context.Context, req *CancelOrderRequest) (*CancelOrderResponse, error)
func (*Client) GetAccountAssets ¶
func (c *Client) GetAccountAssets(ctx context.Context) (*AccountAssets, error)
func (*Client) GetCandles ¶
func (*Client) GetClassicMixAccount ¶
func (*Client) GetClassicMixOpenOrders ¶
func (*Client) GetClassicMixOrder ¶
func (*Client) GetClassicMixOrderHistory ¶
func (*Client) GetClassicMixPositions ¶
func (*Client) GetClassicSpotAssets ¶
func (*Client) GetClassicSpotOpenOrders ¶
func (*Client) GetClassicSpotOrder ¶
func (*Client) GetClassicSpotOrderHistory ¶
func (*Client) GetCurrentPositions ¶
func (*Client) GetInstruments ¶
func (*Client) GetOpenOrders ¶
func (*Client) GetOrderBook ¶
func (*Client) GetOrderHistory ¶
func (*Client) GetRecentFills ¶
func (*Client) HasCredentials ¶
func (*Client) ModifyClassicMixOrder ¶
func (c *Client) ModifyClassicMixOrder(ctx context.Context, req *ModifyOrderRequest, productType, marginCoin string) (*CancelOrderResponse, error)
func (*Client) ModifyOrder ¶
func (c *Client) ModifyOrder(ctx context.Context, req *ModifyOrderRequest) (*CancelOrderResponse, error)
func (*Client) PlaceClassicMixOrder ¶
func (c *Client) PlaceClassicMixOrder(ctx context.Context, req *PlaceOrderRequest, productType, marginCoin string) (*PlaceOrderResponse, error)
func (*Client) PlaceClassicSpotOrder ¶
func (c *Client) PlaceClassicSpotOrder(ctx context.Context, req *PlaceOrderRequest) (*PlaceOrderResponse, error)
func (*Client) PlaceOrder ¶
func (c *Client) PlaceOrder(ctx context.Context, req *PlaceOrderRequest) (*PlaceOrderResponse, error)
func (*Client) SetClassicMixLeverage ¶
func (*Client) SetLeverage ¶
func (c *Client) SetLeverage(ctx context.Context, req *SetLeverageRequest) error
func (*Client) WithBaseURL ¶
func (*Client) WithCredentials ¶
type FlexibleFeeDetails ¶
type FlexibleFeeDetails []FeeDetail
func (*FlexibleFeeDetails) UnmarshalJSON ¶
func (f *FlexibleFeeDetails) UnmarshalJSON(data []byte) error
type Instrument ¶
type Instrument struct {
Symbol string `json:"symbol"`
Category string `json:"category"`
BaseCoin string `json:"baseCoin"`
QuoteCoin string `json:"quoteCoin"`
MinOrderQty string `json:"minOrderQty"`
MaxOrderQty string `json:"maxOrderQty"`
MinOrderAmount string `json:"minOrderAmount"`
PricePrecision string `json:"pricePrecision"`
QuantityPrecision string `json:"quantityPrecision"`
QuotePrecision string `json:"quotePrecision"`
PriceMultiplier string `json:"priceMultiplier"`
QuantityMultiplier string `json:"quantityMultiplier"`
MakerFeeRate string `json:"makerFeeRate"`
TakerFeeRate string `json:"takerFeeRate"`
FundInterval string `json:"fundInterval"`
Status string `json:"status"`
}
type ModifyOrderRequest ¶
type ModifyOrderRequest struct {
Category string `json:"category"`
Symbol string `json:"symbol"`
OrderID string `json:"orderId,omitempty"`
ClientOID string `json:"clientOid,omitempty"`
NewQty string `json:"newQty,omitempty"`
NewPrice string `json:"newPrice,omitempty"`
NewClientID string `json:"newClientOid,omitempty"`
}
type NumberString ¶
type NumberString string
func (*NumberString) UnmarshalJSON ¶
func (n *NumberString) UnmarshalJSON(data []byte) error
type OrderBook ¶
type OrderBook struct {
Asks [][]NumberString `json:"a"`
Bids [][]NumberString `json:"b"`
TS string `json:"ts"`
}
type OrderList ¶
type OrderList struct {
List []OrderRecord `json:"list"`
EndID string `json:"endId"`
}
type OrderRecord ¶
type OrderRecord struct {
OrderID string `json:"orderId"`
ClientOID string `json:"clientOid"`
Symbol string `json:"symbol"`
Category string `json:"category"`
Side string `json:"side"`
OrderType string `json:"orderType"`
TimeInForce string `json:"timeInForce"`
Price string `json:"price"`
Qty string `json:"qty"`
Amount string `json:"amount"`
BaseVolume string `json:"baseVolume"`
FilledQty string `json:"filledQty"`
FilledVolume string `json:"filledVolume"`
CumExecQty string `json:"cumExecQty"`
CumExecValue string `json:"cumExecValue"`
OrderStatus string `json:"orderStatus"`
ReduceOnly string `json:"reduceOnly"`
PosSide string `json:"posSide"`
HoldSide string `json:"holdSide"`
HoldMode string `json:"holdMode"`
TradeSide string `json:"tradeSide"`
MarginMode string `json:"marginMode"`
MarginCoin string `json:"marginCoin"`
AvgPrice string `json:"avgPrice"`
Fee string `json:"fee"`
TotalProfit string `json:"totalProfit"`
CreatedTime string `json:"cTime"`
UpdatedTime string `json:"uTime"`
DelegateType string `json:"delegateType"`
StpMode string `json:"stpMode"`
FeeDetail []FeeDetail `json:"feeDetail"`
}
type PlaceOrderRequest ¶
type PlaceOrderRequest struct {
Category string `json:"category"`
Symbol string `json:"symbol"`
Qty string `json:"qty"`
Price string `json:"price,omitempty"`
Side string `json:"side"`
TradeSide string `json:"tradeSide,omitempty"`
OrderType string `json:"orderType"`
TimeInForce string `json:"timeInForce,omitempty"`
MarginMode string `json:"marginMode,omitempty"`
MarginCoin string `json:"marginCoin,omitempty"`
ClientOID string `json:"clientOid,omitempty"`
ReduceOnly string `json:"reduceOnly,omitempty"`
}
type PlaceOrderResponse ¶
type PositionList ¶
type PositionList struct {
List []PositionRecord `json:"list"`
}
type PositionRecord ¶
type PositionRecord struct {
Symbol string `json:"symbol"`
Category string `json:"category"`
PosSide string `json:"posSide"`
HoldSide string `json:"holdSide"`
Qty string `json:"qty"`
Total string `json:"total"`
Size string `json:"size"`
Available string `json:"available"`
Frozen string `json:"frozen"`
AverageOpenPrice string `json:"averageOpenPrice"`
OpenPriceAvg string `json:"openPriceAvg"`
AvgPrice string `json:"avgPrice"`
MarkPrice string `json:"markPrice"`
LiquidationPrice string `json:"liquidationPrice"`
LiqPrice string `json:"liqPrice"`
Leverage string `json:"leverage"`
MarginMode string `json:"marginMode"`
UnrealizedPL string `json:"unrealizedPL"`
AchievedProfits string `json:"achievedProfits"`
CurRealisedPnl string `json:"curRealisedPnl"`
PositionStatus string `json:"positionStatus"`
CreatedTime string `json:"createdTime"`
UpdatedTime string `json:"updatedTime"`
}
type PrivateWSClient ¶
type PrivateWSClient struct {
// contains filtered or unexported fields
}
func NewPrivateWSClient ¶
func NewPrivateWSClient() *PrivateWSClient
func (*PrivateWSClient) CancelClassicPerpOrderWS ¶
func (c *PrivateWSClient) CancelClassicPerpOrderWS(symbol, instType, marginCoin, orderID, clientOID string) (*CancelOrderResponse, error)
func (*PrivateWSClient) CancelClassicSpotOrderWS ¶
func (c *PrivateWSClient) CancelClassicSpotOrderWS(symbol, orderID, clientOID string) (*CancelOrderResponse, error)
func (*PrivateWSClient) Close ¶
func (c *PrivateWSClient) Close() error
func (*PrivateWSClient) PlaceClassicPerpOrderWS ¶
func (c *PrivateWSClient) PlaceClassicPerpOrderWS(req *PlaceOrderRequest, instType, marginCoin string) (*PlaceOrderResponse, error)
func (*PrivateWSClient) PlaceClassicSpotOrderWS ¶
func (c *PrivateWSClient) PlaceClassicSpotOrderWS(req *PlaceOrderRequest) (*PlaceOrderResponse, error)
func (*PrivateWSClient) Subscribe ¶
func (c *PrivateWSClient) Subscribe(ctx context.Context, arg WSArg, handler func(json.RawMessage)) error
func (*PrivateWSClient) Unsubscribe ¶
func (c *PrivateWSClient) Unsubscribe(ctx context.Context, arg WSArg) error
func (*PrivateWSClient) WithClassicMode ¶
func (c *PrivateWSClient) WithClassicMode() *PrivateWSClient
func (*PrivateWSClient) WithCredentials ¶
func (c *PrivateWSClient) WithCredentials(apiKey, secretKey, passphrase string) *PrivateWSClient
type PublicFill ¶
type PublicWSClient ¶
type PublicWSClient struct {
// contains filtered or unexported fields
}
func NewPublicWSClient ¶
func NewPublicWSClient() *PublicWSClient
func (*PublicWSClient) Close ¶
func (c *PublicWSClient) Close() error
func (*PublicWSClient) Subscribe ¶
func (c *PublicWSClient) Subscribe(ctx context.Context, arg WSArg, handler func(json.RawMessage)) error
func (*PublicWSClient) Unsubscribe ¶
func (c *PublicWSClient) Unsubscribe(ctx context.Context, arg WSArg) error
type SetLeverageRequest ¶
type Ticker ¶
type Ticker struct {
Category string `json:"category"`
Symbol string `json:"symbol"`
Timestamp string `json:"ts"`
LastPrice string `json:"lastPrice"`
OpenPrice24h string `json:"openPrice24h"`
HighPrice24h string `json:"highPrice24h"`
LowPrice24h string `json:"lowPrice24h"`
Ask1Price string `json:"ask1Price"`
Bid1Price string `json:"bid1Price"`
Ask1Size string `json:"ask1Size"`
Bid1Size string `json:"bid1Size"`
Volume24h string `json:"volume24h"`
Turnover24h string `json:"turnover24h"`
IndexPrice string `json:"indexPrice"`
MarkPrice string `json:"markPrice"`
FundingRate string `json:"fundingRate"`
}
type WSEnvelope ¶
type WSEnvelope struct {
Event string `json:"event"`
Code NumberString `json:"code"`
Msg string `json:"msg"`
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data json.RawMessage `json:"data"`
}
type WSOrderBookData ¶
type WSOrderBookData struct {
Asks [][]NumberString `json:"a"`
Bids [][]NumberString `json:"b"`
Checksum int64 `json:"checksum"`
PSeq int64 `json:"pseq"`
Seq int64 `json:"seq"`
TS string `json:"ts"`
}
type WSOrderBookMessage ¶
type WSOrderBookMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []WSOrderBookData `json:"data"`
TS int64 `json:"ts"`
}
func DecodeOrderBookMessage ¶
func DecodeOrderBookMessage(payload []byte) (*WSOrderBookMessage, error)
type WSOrderMessage ¶
type WSOrderMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []OrderRecord `json:"data"`
}
func DecodeOrderMessage ¶
func DecodeOrderMessage(payload []byte) (*WSOrderMessage, error)
type WSPositionMessage ¶
type WSPositionMessage struct {
Arg WSArg `json:"arg"`
Action string `json:"action"`
Data []PositionRecord `json:"data"`
}
func DecodePositionMessage ¶
func DecodePositionMessage(payload []byte) (*WSPositionMessage, error)
Click to show internal directories.
Click to hide internal directories.