Documentation ¶
Index ¶
- type Conn
- func (c *Conn) Close() (err error)
- func (c *Conn) Encrypt() bool
- func (c *Conn) IsClosed() bool
- func (c *Conn) PingInterval() int
- func (c *Conn) PingTimeout() int
- func (c *Conn) Send(tp Type, tc Topic, sym string) (r Response, err error)
- func (c *Conn) SetUpdates(ch chan interface{})
- func (c *Conn) Symbol() string
- func (c *Conn) Updates() <-chan interface{}
- func (c *Conn) UserType() string
- type History
- type Market
- type OrderBook
- type Response
- type Topic
- type Type
- type WebSocket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents WebSocket connection to a Topic. Use Update() func to get server messages.
func (*Conn) PingInterval ¶
PingInterval returns server ping interval.
func (*Conn) PingTimeout ¶
PingTimeout returns server ping timeout.
func (*Conn) SetUpdates ¶
func (c *Conn) SetUpdates(ch chan interface{})
SetUpdates sets parsed channel to be used when a update fire.
type History ¶
type History struct { Symbol string `json:"-"` Id string `json:"oid"` Price float64 `json:"price"` Count float64 `json:"count"` Time int64 `json:"time"` VolValue float64 `json:"volValue"` Direction string `json:"direction"` }
History is the type received from History subscription
type Market ¶
type Market struct { CoinType string `json:"coinType"` Trading bool `json:"trading"` Symbol string `json:"symbol"` LastDealPrice float64 `json:"lastDealPrice"` Buy float64 `json:"buy"` Sell float64 `json:"sell"` Change float64 `json:"change"` CoinTypePair string `json:"coinTypePair"` Sort int `json:"sort"` FeeRate float64 `json:"feeRate"` VolValue float64 `json:"volValue"` High float64 `json:"high"` Datetime int64 `json:"datetime"` Vol float64 `json:"vol"` Low float64 `json:"low"` ChangeRate float64 `json:"changeRate"` }
Market is the type received from Tick and Market subscription
type OrderBook ¶
type OrderBook struct { Symbol string `json:"-"` Volume float64 `json:"volume"` Price float64 `json:"price"` Count float64 `json:"count"` Action string `json:"action"` Time int64 `json:"time"` Type string `json:"type"` }
OrderBook is the type received from Orderbook subscription
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
WebSocket represents websocket connection handler.
func (*WebSocket) SetUserType ¶
SetUserType sets user type. Can be vip or normal.
By default userType is normal.
Use this function before calling Dial.
Click to show internal directories.
Click to hide internal directories.