Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - type AccountInfo
 - type BaseResponse
 - type DepthResponse
 - type DetailResponse
 - type 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
 - 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
 - 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
 - type OrderInfo
 - type TradeResponse
 - type WsResponse
 
Constants ¶
      View Source
      
  
const ( HB_POINT_ACCOUNT = "point" HB_SPOT_ACCOUNT = "spot" )
Variables ¶
      View Source
      
  
var HBPOINT = NewCurrency("HBPOINT", "")
    Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type BaseResponse ¶
type DepthResponse ¶
type DetailResponse ¶
type DetailResponse struct {
	Id     int64
	Open   float64
	Close  float64
	High   float64
	Low    float64
	Amount float64
	Vol    float64
	Count  int64
}
    "id": 1539842340, "mrid": 268041138, "open": 6740.47, "close": 7800, "high": 7800, "low": 6726.13, "amount": 477.1200312075244664773339914558562673572, "vol": 32414, "count": 1716 }
type Hbdm ¶
type Hbdm struct {
	// contains filtered or unexported fields
}
    func (*Hbdm) FutureCancelOrder ¶
func (*Hbdm) GetContractValue ¶
func (*Hbdm) GetExchangeName ¶
func (*Hbdm) GetExchangeRate ¶
func (*Hbdm) GetFutureDepth ¶
func (*Hbdm) GetFutureEstimatedPrice ¶
func (*Hbdm) GetFutureIndex ¶
func (*Hbdm) GetFutureOrder ¶
func (*Hbdm) GetFutureOrders ¶
func (*Hbdm) GetFuturePosition ¶
func (*Hbdm) GetFutureTicker ¶
func (*Hbdm) GetFutureUserinfo ¶
func (*Hbdm) GetKlineRecords ¶
func (*Hbdm) GetUnfinishFutureOrders ¶
type HbdmWs ¶
func (*HbdmWs) SetCallbacks ¶
func (*HbdmWs) SubscribeDepth ¶
func (*HbdmWs) SubscribeTicker ¶
func (*HbdmWs) SubscribeTrade ¶
type HuoBiPro ¶
type HuoBiPro struct {
	// contains filtered or unexported fields
}
    func NewHuoBiPro ¶
func (*HuoBiPro) CancelOrder ¶
func (*HuoBiPro) GetAccount ¶
func (*HuoBiPro) GetAccountInfo ¶
func (hbpro *HuoBiPro) GetAccountInfo(acc string) (AccountInfo, error)
func (*HuoBiPro) GetCurrenciesList ¶
func (*HuoBiPro) GetCurrenciesPrecision ¶
func (hbpro *HuoBiPro) GetCurrenciesPrecision() ([]HuoBiProSymbol, error)
func (*HuoBiPro) GetExchangeName ¶
func (*HuoBiPro) GetKlineRecords ¶
func (hbpro *HuoBiPro) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)
倒序
func (*HuoBiPro) GetOneOrder ¶
func (*HuoBiPro) GetOrderHistorys ¶
func (*HuoBiPro) GetTrades ¶
非个人,整个交易所的交易记录 https://github.com/huobiapi/API_Docs/wiki/REST_api_reference#get-markettrade-获取-trade-detail-数据
func (*HuoBiPro) GetUnfinishOrders ¶
func (*HuoBiPro) MarketSell ¶
type HuoBiProSymbol ¶
type OrderInfo ¶
type OrderInfo struct {
	Symbol         string  `json:"symbol"`
	ContractType   string  `json:"contract_type"`
	ContractCode   string  `json:"contract_code"`
	Volume         float64 `json:"volume"`
	Price          float64 `json:"price"`
	OrderPriceType string  `json:"order_price_type"`
	Direction      string  `json:"direction"`
	Offset         string  `json:"offset"`
	LeverRate      int     `json:"lever_rate"`
	OrderId        int64   `json:"order_id"`
	ClientOrderId  int64   `json:"client_order_id"`
	OrderSource    string  `json:"order_source"`
	CreatedAt      int64   `json:"created_at"`
	TradeVolume    float64 `json:"trade_volume"`
	TradeTurnover  float64 `json:"trade_turnover"`
	Fee            float64 `json:"fee"`
	TradeAvgPrice  float64 `json:"trade_avg_price"`
	MarginFrozen   float64 `json:"margin_frozen"`
	Status         int     `json:"status"`
}
    type TradeResponse ¶
type WsResponse ¶
type WsResponse struct {
	Ch   string
	Ts   int64
	Tick json.RawMessage
}
     Click to show internal directories. 
   Click to hide internal directories.