Documentation ¶
Index ¶
- func NewSpotAPI(client *http.Client, apikey, secretkey, tradepwd string) SpotAPI
- func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)
- type Bitz
- func (bitz *Bitz) Cancel(orderId string, pair CurrencyPair) (bool, error)
- func (bitz *Bitz) GetAccount() (*Account, error)
- func (bitz *Bitz) GetAllCurrencyPair() (map[string]SymbolSetting, error)
- func (bitz *Bitz) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)
- func (bitz *Bitz) GetAllTicker() ([]Ticker, error)
- func (bitz *Bitz) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)
- func (bitz *Bitz) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)
- func (bitz *Bitz) GetExchangeName() string
- func (bitz *Bitz) GetFinishedOrders(pair CurrencyPair) ([]Order, error)
- func (bitz *Bitz) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
- func (bitz *Bitz) GetOrder(orderId string, pair CurrencyPair) (*Order, error)
- func (bitz *Bitz) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)
- func (bitz *Bitz) GetPendingOrders(pair CurrencyPair) ([]Order, error)
- func (bitz *Bitz) GetTicker(pair CurrencyPair) (*Ticker, error)
- func (bitz *Bitz) GetTradeFee(symbols string) (tf *TradeFee, err error)
- func (bitz *Bitz) GetTradeFeeMap() (tfmap map[string]TradeFee, err error)
- func (bitz *Bitz) GetTrades(pair CurrencyPair, size int) ([]Trade, error)
- func (bitz *Bitz) GetURL() string
- func (bitz *Bitz) GetUserTrades(pair CurrencyPair) ([]Trade, error)
- func (bitz *Bitz) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)
- func (bitz *Bitz) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)
- func (bitz *Bitz) MarketBuy(pair CurrencyPair, amount string) (*Order, error)
- func (bitz *Bitz) MarketSell(pair CurrencyPair, amount string) (*Order, error)
- func (bitz *Bitz) SetURL(exurl string)
- type BitzSpotWs
- func (ws *BitzSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *BitzSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *BitzSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *BitzSpotWs) GetExchangeName() string
- func (ws *BitzSpotWs) OnMessage(data []byte) (err error)
- type TradeFee
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSpotWebsocket ¶
Types ¶
type Bitz ¶
type Bitz struct {
// contains filtered or unexported fields
}
func (*Bitz) GetAccount ¶
func (*Bitz) GetAllCurrencyPair ¶
func (*Bitz) GetAllCurrencyStatus ¶
func (*Bitz) GetAllTicker ¶
func (*Bitz) GetCurrencyStatus ¶
func (*Bitz) GetExchangeName ¶
func (*Bitz) GetFinishedOrders ¶
func (*Bitz) GetKlineRecords ¶
func (bitz *Bitz) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
倒序
func (*Bitz) GetOrderDeal ¶
func (*Bitz) GetPendingOrders ¶
func (*Bitz) GetTradeFeeMap ¶
func (*Bitz) GetUserTrades ¶
func (*Bitz) MarketSell ¶
type BitzSpotWs ¶
type BitzSpotWs struct { SpotWsBase // contains filtered or unexported fields }
func (*BitzSpotWs) FormatTopicName ¶
func (ws *BitzSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*BitzSpotWs) FormatTopicSubData ¶
func (ws *BitzSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*BitzSpotWs) FormatTopicUnsubData ¶
func (ws *BitzSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*BitzSpotWs) GetExchangeName ¶
func (ws *BitzSpotWs) GetExchangeName() string
type TradeFee ¶
type TradeFee struct { Symbol string `json:"symbol"` ActualMakerRate float64 `json:"actualMakerRate,string"` // 挂单手续费 ActualTakerRate float64 `json:"actualTakerRate,string"` // 吃单手续费 }
"symbol": "btcusdt", "makerFeeRate":"0.002", "takerFeeRate":"0.002", "actualMakerRate": "0.002", "actualTakerRate":"0.002
Click to show internal directories.
Click to hide internal directories.