Documentation ¶
Index ¶
- type BestBidOfferWebSocketClient
- func (p *BestBidOfferWebSocketClient) Init(host string) *BestBidOfferWebSocketClient
- func (p *BestBidOfferWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *BestBidOfferWebSocketClient) Subscribe(symbol string, clientId string)
- func (p *BestBidOfferWebSocketClient) UnSubscribe(symbol string, clientId string)
- type CandlestickWebSocketClient
- func (p *CandlestickWebSocketClient) Init(host string) *CandlestickWebSocketClient
- func (p *CandlestickWebSocketClient) Request(symbol string, period string, from int64, to int64, clientId string)
- func (p *CandlestickWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *CandlestickWebSocketClient) Subscribe(symbol string, period string, clientId string)
- func (p *CandlestickWebSocketClient) UnSubscribe(symbol string, period string, clientId string)
- type DepthWebSocketClient
- func (p *DepthWebSocketClient) Init(host string) *DepthWebSocketClient
- func (p *DepthWebSocketClient) Request(symbol string, step string, clientId string)
- func (p *DepthWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *DepthWebSocketClient) Subscribe(symbol string, step string, clientId string)
- func (p *DepthWebSocketClient) UnSubscribe(symbol string, step string, clientId string)
- type Last24hCandlestickWebSocketClient
- func (p *Last24hCandlestickWebSocketClient) Init(host string) *Last24hCandlestickWebSocketClient
- func (p *Last24hCandlestickWebSocketClient) Request(symbol string, clientId string)
- func (p *Last24hCandlestickWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *Last24hCandlestickWebSocketClient) Subscribe(symbol string, clientId string)
- func (p *Last24hCandlestickWebSocketClient) UnSubscribe(symbol string, clientId string)
- type MarketByPriceTickWebSocketClient
- func (p *MarketByPriceTickWebSocketClient) Init(host string) *MarketByPriceTickWebSocketClient
- func (p *MarketByPriceTickWebSocketClient) Request(symbol string, level int, clientId string)
- func (p *MarketByPriceTickWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *MarketByPriceTickWebSocketClient) Subscribe(symbol string, level int, clientId string)
- func (p *MarketByPriceTickWebSocketClient) UnSubscribe(symbol string, level int, clientId string)
- type MarketByPriceWebSocketClient
- func (p *MarketByPriceWebSocketClient) Init(host string) *MarketByPriceWebSocketClient
- func (p *MarketByPriceWebSocketClient) Request(symbol string, clientId string)
- func (p *MarketByPriceWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *MarketByPriceWebSocketClient) Subscribe(symbol string, clientId string)
- func (p *MarketByPriceWebSocketClient) SubscribeFull(symbol string, level int, clientId string)
- func (p *MarketByPriceWebSocketClient) UnSubscribe(symbol string, clientId string)
- func (p *MarketByPriceWebSocketClient) UnSubscribeFull(symbol string, level int, clientId string)
- type TradeWebSocketClient
- func (p *TradeWebSocketClient) Init(host string) *TradeWebSocketClient
- func (p *TradeWebSocketClient) Request(symbol string, clientId string)
- func (p *TradeWebSocketClient) SetHandler(connectedHandler websocketclientbase.ConnectedHandler, ...)
- func (p *TradeWebSocketClient) Subscribe(symbol string, clientId string)
- func (p *TradeWebSocketClient) UnSubscribe(symbol string, clientId string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BestBidOfferWebSocketClient ¶
type BestBidOfferWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle BBO data from WebSocket
func (*BestBidOfferWebSocketClient) Init ¶
func (p *BestBidOfferWebSocketClient) Init(host string) *BestBidOfferWebSocketClient
Initializer
func (*BestBidOfferWebSocketClient) SetHandler ¶
func (p *BestBidOfferWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*BestBidOfferWebSocketClient) Subscribe ¶
func (p *BestBidOfferWebSocketClient) Subscribe(symbol string, clientId string)
Subscribe latest market by price order book in snapshot mode at 1-second interval.
func (*BestBidOfferWebSocketClient) UnSubscribe ¶
func (p *BestBidOfferWebSocketClient) UnSubscribe(symbol string, clientId string)
Unsubscribe market by price order book
type CandlestickWebSocketClient ¶
type CandlestickWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle candlestick data from WebSocket
func (*CandlestickWebSocketClient) Init ¶
func (p *CandlestickWebSocketClient) Init(host string) *CandlestickWebSocketClient
Initializer
func (*CandlestickWebSocketClient) Request ¶
func (p *CandlestickWebSocketClient) Request(symbol string, period string, from int64, to int64, clientId string)
Request the full candlestick data according to specified criteria
func (*CandlestickWebSocketClient) SetHandler ¶
func (p *CandlestickWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*CandlestickWebSocketClient) Subscribe ¶
func (p *CandlestickWebSocketClient) Subscribe(symbol string, period string, clientId string)
Subscribe candlestick data
func (*CandlestickWebSocketClient) UnSubscribe ¶
func (p *CandlestickWebSocketClient) UnSubscribe(symbol string, period string, clientId string)
Unsubscribe candlestick data
type DepthWebSocketClient ¶
type DepthWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle Depth data from WebSocket
func (*DepthWebSocketClient) Init ¶
func (p *DepthWebSocketClient) Init(host string) *DepthWebSocketClient
Initializer
func (*DepthWebSocketClient) Request ¶
func (p *DepthWebSocketClient) Request(symbol string, step string, clientId string)
Request full depth data
func (*DepthWebSocketClient) SetHandler ¶
func (p *DepthWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*DepthWebSocketClient) Subscribe ¶
func (p *DepthWebSocketClient) Subscribe(symbol string, step string, clientId string)
Subscribe latest market by price order book in snapshot mode at 1-second interval.
func (*DepthWebSocketClient) UnSubscribe ¶
func (p *DepthWebSocketClient) UnSubscribe(symbol string, step string, clientId string)
Unsubscribe market by price order book
type Last24hCandlestickWebSocketClient ¶
type Last24hCandlestickWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle last 24h candlestick data from WebSocket
func (*Last24hCandlestickWebSocketClient) Init ¶
func (p *Last24hCandlestickWebSocketClient) Init(host string) *Last24hCandlestickWebSocketClient
Initializer
func (*Last24hCandlestickWebSocketClient) Request ¶
func (p *Last24hCandlestickWebSocketClient) Request(symbol string, clientId string)
Request full candlestick data
func (*Last24hCandlestickWebSocketClient) SetHandler ¶
func (p *Last24hCandlestickWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*Last24hCandlestickWebSocketClient) Subscribe ¶
func (p *Last24hCandlestickWebSocketClient) Subscribe(symbol string, clientId string)
Subscribe latest 24h market stats
func (*Last24hCandlestickWebSocketClient) UnSubscribe ¶
func (p *Last24hCandlestickWebSocketClient) UnSubscribe(symbol string, clientId string)
Unsubscribe latest 24 market stats
type MarketByPriceTickWebSocketClient ¶
type MarketByPriceTickWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle MBP data from WebSocket
func (*MarketByPriceTickWebSocketClient) Init ¶
func (p *MarketByPriceTickWebSocketClient) Init(host string) *MarketByPriceTickWebSocketClient
Initializer
func (*MarketByPriceTickWebSocketClient) Request ¶
func (p *MarketByPriceTickWebSocketClient) Request(symbol string, level int, clientId string)
Request full Market By Price order book, level: 5, 20, 150
func (*MarketByPriceTickWebSocketClient) SetHandler ¶
func (p *MarketByPriceTickWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*MarketByPriceTickWebSocketClient) Subscribe ¶
func (p *MarketByPriceTickWebSocketClient) Subscribe(symbol string, level int, clientId string)
Subscribe incremental update of Market By Price order book, level: 5, 20, 150
func (*MarketByPriceTickWebSocketClient) UnSubscribe ¶
func (p *MarketByPriceTickWebSocketClient) UnSubscribe(symbol string, level int, clientId string)
Unsubscribe update of Market By Price order book
type MarketByPriceWebSocketClient ¶
type MarketByPriceWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle MBP data from WebSocket
func (*MarketByPriceWebSocketClient) Init ¶
func (p *MarketByPriceWebSocketClient) Init(host string) *MarketByPriceWebSocketClient
Initializer
func (*MarketByPriceWebSocketClient) Request ¶
func (p *MarketByPriceWebSocketClient) Request(symbol string, clientId string)
Request full Market By Price order book
func (*MarketByPriceWebSocketClient) SetHandler ¶
func (p *MarketByPriceWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*MarketByPriceWebSocketClient) Subscribe ¶
func (p *MarketByPriceWebSocketClient) Subscribe(symbol string, clientId string)
Subscribe incremental update of Market By Price order book
func (*MarketByPriceWebSocketClient) SubscribeFull ¶
func (p *MarketByPriceWebSocketClient) SubscribeFull(symbol string, level int, clientId string)
Subscribe full Market By Price order book
func (*MarketByPriceWebSocketClient) UnSubscribe ¶
func (p *MarketByPriceWebSocketClient) UnSubscribe(symbol string, clientId string)
Unsubscribe update of Market By Price order book
func (*MarketByPriceWebSocketClient) UnSubscribeFull ¶
func (p *MarketByPriceWebSocketClient) UnSubscribeFull(symbol string, level int, clientId string)
Unsubscribe full Market By Price order book
type TradeWebSocketClient ¶
type TradeWebSocketClient struct {
websocketclientbase.WebSocketClientBase
}
Responsible to handle Trade data from WebSocket
func (*TradeWebSocketClient) Init ¶
func (p *TradeWebSocketClient) Init(host string) *TradeWebSocketClient
Initializer
func (*TradeWebSocketClient) Request ¶
func (p *TradeWebSocketClient) Request(symbol string, clientId string)
Request latest 300 trade data
func (*TradeWebSocketClient) SetHandler ¶
func (p *TradeWebSocketClient) SetHandler( connectedHandler websocketclientbase.ConnectedHandler, responseHandler websocketclientbase.ResponseHandler)
Set callback handler
func (*TradeWebSocketClient) Subscribe ¶
func (p *TradeWebSocketClient) Subscribe(symbol string, clientId string)
Subscribe latest completed trade in tick by tick mode
func (*TradeWebSocketClient) UnSubscribe ¶
func (p *TradeWebSocketClient) UnSubscribe(symbol string, clientId string)
Unsubscribe trade