Documentation
¶
Index ¶
- Constants
- type Account
- type Balance
- type BookNote
- type BookUpdate
- type BookedOrder
- type CoinInfo
- type DataStreamKey
- type ExchangeInfo
- type Filter
- type Market
- type MarketTicker24
- type NetworkInfo
- type OrderResponse
- type OrderbookSnapshot
- type PendingDeposit
- type RateLimit
- type StreamSubscription
- type StreamUpdate
- type WSBalance
Constants ¶
View Source
const ( DepositStatusPending = 0 DepositStatusSuccess = 1 DepositStatusCredited = 6 DepositStatusWrongDeposit = 7 DepositStatusWaitingUserConfirm = 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookNote ¶
type BookNote struct {
StreamName string `json:"stream"`
Data *BookUpdate `json:"data"`
ID uint64 `json:"id"`
Result []string `json:"result"`
}
type BookUpdate ¶
type BookedOrder ¶
type BookedOrder struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
Price float64 `json:"price,string"`
OrigQty float64 `json:"origQty,string"`
OrigQuoteQty float64 `json:"origQuoteOrderQty,string"`
ExecutedQty float64 `json:"executedQty,string"`
CumulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Side string `json:"side"`
}
type CoinInfo ¶
type CoinInfo struct {
Coin string `json:"coin"`
// DepositAllEnable bool `json:"depositAllEnable"`
// Free float64 `json:"free,string"`
// Freeze float64 `json:"freeze,string"`
// Ipoable float64 `json:"ipoable,string"`
// Ipoing float64 `json:"ipoing,string"`
// IsLegalMoney bool `json:"isLegalMoney"`
// Locked float64 `json:"locked,string"`
// Name string `json:"name"`
// Storage float64 `json:"storage,string"`
// Trading bool `json:"trading"`
// WithdrawAllEnable bool `json:"withdrawAllEnable"`
// Withdrawing float64 `json:"withdrawing,string"`
NetworkList []*NetworkInfo `json:"networkList"`
}
type DataStreamKey ¶
type DataStreamKey struct {
ListenKey string `json:"listenKey"`
}
type ExchangeInfo ¶
type Filter ¶ added in v1.0.3
type Filter struct {
Type string `json:"filterType"`
// Price filter
MinPrice float64 `json:"minPrice,string"`
MaxPrice float64 `json:"maxPrice,string"`
TickSize float64 `json:"tickSize,string"`
// Lot size filter
MinQty float64 `json:"minQty,string"`
MaxQty float64 `json:"maxQty,string"`
StepSize float64 `json:"stepSize,string"`
}
type Market ¶
type Market struct {
Symbol string `json:"symbol"`
Status string `json:"status"`
BaseAsset string `json:"baseAsset"`
BaseAssetPrecision int `json:"baseAssetPrecision"`
QuoteAsset string `json:"quoteAsset"`
QuoteAssetPrecision int `json:"quoteAssetPrecision"`
OrderTypes []string `json:"orderTypes"`
Filters []*Filter `json:"filters"`
// Below fields are parsed from Filters.
LotSize uint64
MinQty uint64
MaxQty uint64
RateStep uint64
MinPrice uint64
MaxPrice uint64
}
type MarketTicker24 ¶
type MarketTicker24 struct {
Symbol string `json:"symbol"`
PriceChange float64 `json:"priceChange,string"`
PriceChangePercent float64 `json:"priceChangePercent,string"`
WeightedAvgPrice float64 `json:"weightedAvgPrice,string"`
PrevClosePrice float64 `json:"prevClosePrice,string"`
LastPrice float64 `json:"lastPrice,string"`
LastQty float64 `json:"lastQty,string"`
BidPrice float64 `json:"bidPrice,string"`
BidQty float64 `json:"bidQty,string"`
AskPrice float64 `json:"askPrice,string"`
AskQty float64 `json:"askQty,string"`
OpenPrice float64 `json:"openPrice,string"`
HighPrice float64 `json:"highPrice,string"`
LowPrice float64 `json:"lowPrice,string"`
Volume float64 `json:"volume,string"`
QuoteVolume float64 `json:"quoteVolume,string"`
OpenTime int64 `json:"openTime"`
CloseTime int64 `json:"closeTime"`
FirstId int64 `json:"firstId"`
LastId int64 `json:"lastId"`
Count int64 `json:"count"`
}
type NetworkInfo ¶
type NetworkInfo struct {
// AddressRegex string `json:"addressRegex"`
Coin string `json:"coin"`
DepositEnable bool `json:"depositEnable"`
// IsDefault bool `json:"isDefault"`
// MemoRegex string `json:"memoRegex"`
// MinConfirm int `json:"minConfirm"`
// Name string `json:"name"`
Network string `json:"network"`
// ResetAddressStatus bool `json:"resetAddressStatus"`
// SpecialTips string `json:"specialTips"`
// UnLockConfirm int `json:"unLockConfirm"`
WithdrawEnable bool `json:"withdrawEnable"`
WithdrawFee float64 `json:"withdrawFee,string"`
WithdrawIntegerMultiple float64 `json:"withdrawIntegerMultiple,string"`
// WithdrawMax float64 `json:"withdrawMax,string"`
WithdrawMin float64 `json:"withdrawMin,string"`
}
type OrderResponse ¶
type OrderResponse struct {
Symbol string `json:"symbol"`
Price float64 `json:"price,string"`
OrigQty float64 `json:"origQty,string"`
OrigQuoteQty float64 `json:"origQuoteOrderQty,string"`
ExecutedQty float64 `json:"executedQty,string"`
CumulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"`
Status string `json:"status"`
}
type OrderbookSnapshot ¶
type PendingDeposit ¶
type StreamSubscription ¶
type StreamUpdate ¶
type StreamUpdate struct {
Asset string `json:"a"`
EventType string `json:"e"`
ClientOrderID string `json:"c"`
CurrentOrderStatus string `json:"X"`
Balances []*WSBalance `json:"B"`
BalanceDelta float64 `json:"d,string"`
Filled float64 `json:"z,string"`
QuoteFilled float64 `json:"Z,string"`
OrderQty float64 `json:"q,string"`
QuoteOrderQty float64 `json:"Q,string"`
CancelledOrderID string `json:"C"`
E int64 `json:"E"`
ListenKey string `json:"listenKey"`
}
Click to show internal directories.
Click to hide internal directories.