Documentation
¶
Index ¶
Constants ¶
View Source
const ( ACCESS_KEY string = "*" SECRET_KEY string = "*" // API请求地址, 不要带最后的/ MARKET_URL string = "https://api.hbdm.com" TRADE_URL string = "https://api.hbdm.com" WS_STOCK_URL string = "wss://api.huobi.pro/ws" WS_FUTURE_URL string = "wss://www.hbdm.com/ws" WS_FUTURE_ORDER_URL string = "ws://api.hbdm.com/notification" Local_IP string = "*.*.*.*" //Your Local IP //replace with real URLs and HostName HOST_NAME string = "api.hbdm.com" )
Variables ¶
This section is empty.
Functions ¶
func AddClientNum ¶
func AddClientNum()
func SubClientNum ¶
func SubClientNum()
Types ¶
type Client ¶
type Client struct {
Name string
Params *ClientParameters
Ws *websocket.Conn
// contains filtered or unexported fields
}
func NewHuobiWSClient ¶
func NewHuobiWSClient(params *ClientParameters) *Client
type ClientParameters ¶
func NewDefaultParameters ¶
func NewDefaultParameters() *ClientParameters
type Request ¶
* 订阅websocket的请求格式
{
"sub": "market.$symbol.kline.$period",
"id": "id generate by client"
}
type TradeDetail ¶
Click to show internal directories.
Click to hide internal directories.