marketwebsocketclient

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

Initializer

func (*BestBidOfferWebSocketClient) SetHandler

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

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

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

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

Initializer

func (*Last24hCandlestickWebSocketClient) Request

func (p *Last24hCandlestickWebSocketClient) Request(symbol string, clientId string)

Request full candlestick data

func (*Last24hCandlestickWebSocketClient) SetHandler

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

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

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

Initializer

func (*MarketByPriceWebSocketClient) Request

func (p *MarketByPriceWebSocketClient) Request(symbol string, clientId string)

Request full Market By Price order book

func (*MarketByPriceWebSocketClient) SetHandler

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL