Documentation ¶
Index ¶
- Constants
- func NewSpotAPI(client *http.Client, apiKey, secretKey string) SpotAPI
- func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)
- type TradeFee
- type Zb
- func (zb *Zb) Cancel(orderId string, pair CurrencyPair) (bool, error)
- func (zb *Zb) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)
- func (zb *Zb) GetAccount() (*Account, error)
- func (zb *Zb) GetAllCurrencyPair() (map[string]SymbolSetting, error)
- func (zb *Zb) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)
- func (zb *Zb) GetAllTicker() ([]Ticker, error)
- func (zb *Zb) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)
- func (zb *Zb) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)
- func (zb *Zb) GetExchangeName() string
- func (zb *Zb) GetFinishedOrders(pair CurrencyPair) ([]Order, error)
- func (zb *Zb) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
- func (zb *Zb) GetOrder(orderId string, pair CurrencyPair) (*Order, error)
- func (zb *Zb) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)
- func (zb *Zb) GetOrders(pair CurrencyPair, size int) ([]Order, error)
- func (zb *Zb) GetPendingOrders(pair CurrencyPair) ([]Order, error)
- func (zb *Zb) GetTicker(pair CurrencyPair) (*Ticker, error)
- func (zb *Zb) GetTradeFee() (tf *TradeFee, err error)
- func (zb *Zb) GetTrades(pair CurrencyPair, size int) ([]Trade, error)
- func (zb *Zb) GetURL() string
- func (zb *Zb) GetUserTrades(pair CurrencyPair) ([]Trade, error)
- func (zb *Zb) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)
- func (zb *Zb) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)
- func (zb *Zb) MarketBuy(pair CurrencyPair, amount string) (*Order, error)
- func (zb *Zb) MarketSell(pair CurrencyPair, amount string) (*Order, error)
- func (zb *Zb) SetURL(exurl string)
- func (zb *Zb) Withdraw(amount string, currency Currency, fees, receiveAddr, safePwd string) (string, error)
- type ZbSpotWs
- func (ws *ZbSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *ZbSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *ZbSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *ZbSpotWs) GetExchangeName() string
- func (ws *ZbSpotWs) OnMessage(data []byte) (err error)
Constants ¶
View Source
const ( MARKET_URL = "http://api.zb.live/data/v1/" TRADE_URL = "https://trade.zb.live/api/" )
Variables ¶
This section is empty.
Functions ¶
func NewSpotAPI ¶
func NewSpotWebsocket ¶
Types ¶
type TradeFee ¶
type TradeFee struct { Maker float64 `json:"maker,string"` // 挂单手续费 Taker float64 `json:"taker,string"` // 吃单手续费 }
"maker": "0.001", "taker": "0.0015", "timestamp": "2019-12-05T09:06:20.260Z"
type Zb ¶
type Zb struct {
// contains filtered or unexported fields
}
func (*Zb) CancelWithdraw ¶
func (*Zb) GetAccount ¶
func (*Zb) GetAllCurrencyPair ¶
func (*Zb) GetAllCurrencyStatus ¶
func (*Zb) GetAllTicker ¶
func (*Zb) GetCurrencyStatus ¶
func (*Zb) GetExchangeName ¶
func (*Zb) GetFinishedOrders ¶
func (*Zb) GetKlineRecords ¶
func (*Zb) GetOrderDeal ¶
func (*Zb) GetPendingOrders ¶
func (*Zb) GetTradeFee ¶
func (*Zb) GetUserTrades ¶
func (*Zb) MarketSell ¶
type ZbSpotWs ¶
type ZbSpotWs struct {
SpotWsBase
}
func (*ZbSpotWs) FormatTopicName ¶
格式化流名称
func (*ZbSpotWs) FormatTopicSubData ¶
格式化流订阅消息
func (*ZbSpotWs) FormatTopicUnsubData ¶
格式化流取消订阅消息
func (*ZbSpotWs) GetExchangeName ¶
Click to show internal directories.
Click to hide internal directories.