Versions in this module Expand all Collapse all v1 v1.0.6 Sep 27, 2019 v1.0.5 Sep 7, 2019 v1.0.4 Aug 19, 2019 v1.0.3 Jul 29, 2019 v1.0.2 Jul 25, 2019 v1.0.1 Jul 16, 2019 Changes in this version + const HB_POINT_ACCOUNT + const HB_SPOT_ACCOUNT + var HBPOINT = NewCurrency("HBPOINT", "") + type AccountInfo struct + Id string + State string + Type string + type BaseResponse struct + Ch string + Data json.RawMessage + ErrCode int + ErrMsg string + Status string + Ts int64 + type DepthResponse struct + Asks [][]float64 + Bids [][]float64 + type DetailResponse struct + Amount float64 + Close float64 + Count int64 + High float64 + Id int64 + Low float64 + Open float64 + Vol float64 + type Hbdm struct + func NewHbdm(conf *APIConfig) *Hbdm + func (dm *Hbdm) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error) + func (dm *Hbdm) GetContractValue(currencyPair CurrencyPair) (float64, error) + func (dm *Hbdm) GetDeliveryTime() (int, int, int, int) + func (dm *Hbdm) GetExchangeName() string + func (dm *Hbdm) GetExchangeRate() (float64, error) + func (dm *Hbdm) GetFee() (float64, error) + func (dm *Hbdm) GetFutureDepth(currencyPair CurrencyPair, contractType string, size int) (*Depth, error) + func (dm *Hbdm) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error) + func (dm *Hbdm) GetFutureIndex(currencyPair CurrencyPair) (float64, error) + func (dm *Hbdm) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error) + func (dm *Hbdm) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error) + func (dm *Hbdm) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error) + func (dm *Hbdm) GetFutureTicker(currencyPair CurrencyPair, contractType string) (*Ticker, error) + func (dm *Hbdm) GetFutureUserinfo() (*FutureAccount, error) + func (dm *Hbdm) GetKlineRecords(contract_type string, currency CurrencyPair, period, size, since int) ([]FutureKline, error) + func (dm *Hbdm) GetTrades(contract_type string, currencyPair CurrencyPair, since int64) ([]Trade, error) + func (dm *Hbdm) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error) + func (dm *Hbdm) PlaceFutureOrder(currencyPair CurrencyPair, contractType, price, amount string, ...) (string, error) + type HbdmWs struct + func NewHbdmWs() *HbdmWs + func (hbdmWs *HbdmWs) SetCallbacks(tickerCallback func(*FutureTicker), depthCallback func(*Depth), ...) + func (hbdmWs *HbdmWs) SubscribeDepth(pair CurrencyPair, contract string, size int) error + func (hbdmWs *HbdmWs) SubscribeTicker(pair CurrencyPair, contract string) error + func (hbdmWs *HbdmWs) SubscribeTrade(pair CurrencyPair, contract string) error + type HuoBiPro struct + func NewHuoBiPro(client *http.Client, apikey, secretkey, accountId string) *HuoBiPro + func NewHuoBiProPoint(client *http.Client, apikey, secretkey string) *HuoBiPro + func NewHuoBiProSpot(client *http.Client, apikey, secretkey string) *HuoBiPro + func (hbpro *HuoBiPro) CancelOrder(orderId string, currency CurrencyPair) (bool, error) + func (hbpro *HuoBiPro) GetAccount() (*Account, error) + func (hbpro *HuoBiPro) GetAccountInfo(acc string) (AccountInfo, error) + func (hbpro *HuoBiPro) GetCurrenciesList() ([]string, error) + func (hbpro *HuoBiPro) GetCurrenciesPrecision() ([]HuoBiProSymbol, error) + func (hbpro *HuoBiPro) GetDepth(size int, currency CurrencyPair) (*Depth, error) + func (hbpro *HuoBiPro) GetExchangeName() string + func (hbpro *HuoBiPro) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error) + func (hbpro *HuoBiPro) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error) + func (hbpro *HuoBiPro) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error) + func (hbpro *HuoBiPro) GetTicker(currencyPair CurrencyPair) (*Ticker, error) + func (hbpro *HuoBiPro) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error) + func (hbpro *HuoBiPro) GetUnfinishOrders(currency CurrencyPair) ([]Order, error) + func (hbpro *HuoBiPro) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (hbpro *HuoBiPro) LimitSell(amount, price string, currency CurrencyPair) (*Order, error) + func (hbpro *HuoBiPro) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (hbpro *HuoBiPro) MarketSell(amount, price string, currency CurrencyPair) (*Order, error) + type HuoBiProSymbol struct + AmountPrecision float64 + BaseCurrency string + PricePrecision float64 + QuoteCurrency string + Symbol string + SymbolPartition string + type OrderInfo struct + ClientOrderId int64 + ContractCode string + ContractType string + CreatedAt int64 + Direction string + Fee float64 + LeverRate int + MarginFrozen float64 + Offset string + OrderId int64 + OrderPriceType string + OrderSource string + Price float64 + Status int + Symbol string + TradeAvgPrice float64 + TradeTurnover float64 + TradeVolume float64 + Volume float64 + type TradeResponse struct + Data []struct{ ... } + Id int64 + Ts int64 + type WsResponse struct + Ch string + Tick json.RawMessage + Ts int64