Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChnlFuturesPriceRange = "futures/price_range" // 限价范围频道 ChnlFuturesDepth5 = "futures/depth5" // 深度数据频道,每次返回前5档 ChnlFuturesPosition = "futures/position" // 用户持仓信息频道 ChnlFuturesOrder = "futures/order" // 用户交易数据频道 )
View Source
const ( EventTypeLogin = "login" EventTypeSubscribe = "subscribe" EventTypeUnsubscribe = "unsubscribe" EventTypeError = "error" )
View Source
const (
ErrorInvalidSign = 30013
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(endpoint, apiKey, secretKey, password string, topics []string, handler MessageHandler) *Client
NewClient json: 返回json数据还是struct数据
func (*Client) Unsubscribe ¶
type EventError ¶
type EventLogin ¶
type EventSubscribe ¶
type EventUnsubscribe ¶
type MessageHandler ¶
type MessageHandler func(message *TableMessage)
type TableMessage ¶
Click to show internal directories.
Click to hide internal directories.