Documentation ¶
Index ¶
- Constants
- Variables
- func NewSpotAPI(client *http.Client, apikey, secretkey string) SpotAPI
- func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)
- type AccountInfo
- type HuoBiPro
- func (hbpro *HuoBiPro) Cancel(orderId string, pair CurrencyPair) (bool, error)
- func (hbpro *HuoBiPro) GetAccount() (*Account, error)
- func (hbpro *HuoBiPro) GetAccountInfo(acc string) (AccountInfo, error)
- func (hbpro *HuoBiPro) GetAllCurrencyPair() (map[string]SymbolSetting, error)
- func (hbpro *HuoBiPro) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)
- func (hbpro *HuoBiPro) GetAllTicker() ([]Ticker, error)
- func (hbpro *HuoBiPro) GetCurrenciesList() ([]string, error)
- func (hbpro *HuoBiPro) GetCurrenciesPrecision() ([]HuoBiProSymbol, error)
- func (hbpro *HuoBiPro) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)
- func (hbpro *HuoBiPro) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)
- func (hbpro *HuoBiPro) GetExchangeName() string
- func (hbpro *HuoBiPro) GetFinishedOrders(pair CurrencyPair) ([]Order, error)
- func (hbpro *HuoBiPro) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
- func (hbpro *HuoBiPro) GetOrder(orderId string, pair CurrencyPair) (*Order, error)
- func (hbpro *HuoBiPro) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)
- func (hbpro *HuoBiPro) GetPendingOrders(pair CurrencyPair) ([]Order, error)
- func (hbpro *HuoBiPro) GetTicker(pair CurrencyPair) (*Ticker, error)
- func (hbpro *HuoBiPro) GetTradeFee(symbols string) (tf *TradeFee, err error)
- func (hbpro *HuoBiPro) GetTradeFeeMap() (tfmap map[string]TradeFee, err error)
- func (hbpro *HuoBiPro) GetTrades(pair CurrencyPair, size int) ([]Trade, error)
- func (hbpro *HuoBiPro) GetURL() string
- func (hbpro *HuoBiPro) GetUserTrades(pair CurrencyPair) ([]Trade, error)
- func (hbpro *HuoBiPro) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)
- func (hbpro *HuoBiPro) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)
- func (hbpro *HuoBiPro) MarketBuy(pair CurrencyPair, amount string) (*Order, error)
- func (hbpro *HuoBiPro) MarketSell(pair CurrencyPair, amount string) (*Order, error)
- func (hbpro *HuoBiPro) SetURL(exurl string)
- type HuoBiProSymbol
- type HuobiSpotWs
- func (ws *HuobiSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *HuobiSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *HuobiSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *HuobiSpotWs) GetExchangeName() string
- func (ws *HuobiSpotWs) OnMessage(data []byte) (err error)
- type TradeFee
Constants ¶
View Source
const ( HB_POINT_ACCOUNT = "point" HB_SPOT_ACCOUNT = "spot" )
Variables ¶
View Source
var HBPOINT = NewCurrency("HBPOINT")
Functions ¶
func NewSpotWebsocket ¶
Types ¶
type AccountInfo ¶
type HuoBiPro ¶
type HuoBiPro struct {
// contains filtered or unexported fields
}
func NewHuoBiPro ¶
func (*HuoBiPro) GetAccount ¶
func (*HuoBiPro) GetAccountInfo ¶
func (hbpro *HuoBiPro) GetAccountInfo(acc string) (AccountInfo, error)
func (*HuoBiPro) GetAllCurrencyPair ¶
func (*HuoBiPro) GetAllCurrencyStatus ¶
func (*HuoBiPro) GetAllTicker ¶
func (*HuoBiPro) GetCurrenciesList ¶
func (*HuoBiPro) GetCurrenciesPrecision ¶
func (hbpro *HuoBiPro) GetCurrenciesPrecision() ([]HuoBiProSymbol, error)
func (*HuoBiPro) GetCurrencyStatus ¶
func (*HuoBiPro) GetDepth ¶
取值 说明 step0 无聚合 step1 聚合度为报价精度*10 step2 聚合度为报价精度*100 step3 聚合度为报价精度*1000 step4 聚合度为报价精度*10000 step5 聚合度为报价精度*100000
func (*HuoBiPro) GetExchangeName ¶
func (*HuoBiPro) GetFinishedOrders ¶
func (*HuoBiPro) GetKlineRecords ¶
func (hbpro *HuoBiPro) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
倒序
func (*HuoBiPro) GetOrderDeal ¶
func (*HuoBiPro) GetPendingOrders ¶
func (*HuoBiPro) GetTradeFee ¶
func (*HuoBiPro) GetTradeFeeMap ¶
func (*HuoBiPro) GetUserTrades ¶
func (*HuoBiPro) MarketSell ¶
type HuoBiProSymbol ¶
type HuobiSpotWs ¶
type HuobiSpotWs struct {
SpotWsBase
}
func (*HuobiSpotWs) FormatTopicName ¶
func (ws *HuobiSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*HuobiSpotWs) FormatTopicSubData ¶
func (ws *HuobiSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*HuobiSpotWs) FormatTopicUnsubData ¶
func (ws *HuobiSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*HuobiSpotWs) GetExchangeName ¶
func (ws *HuobiSpotWs) 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.