Documentation ¶
Index ¶
- type BaseExchangeClient
- func (c *BaseExchangeClient) Connect(ctx context.Context) error
- func (c *BaseExchangeClient) Disconnect()
- func (c *BaseExchangeClient) GetOrderBook(symbol string) *orderbook.OrderBook
- func (c *BaseExchangeClient) Name() string
- func (c *BaseExchangeClient) ReadMessages(ctx context.Context, handleMessage func(WebSocketMessage) error, ...) error
- func (c *BaseExchangeClient) RegisterOrderBook(symbol string, ob *orderbook.OrderBook)
- func (c *BaseExchangeClient) SendPing() error
- type BinanceClient
- type BitflyerClient
- type ExchangeClient
- type ExchangePair
- type KrakenClient
- type Pair
- type PoloniexClient
- type WebSocketMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseExchangeClient ¶
type BaseExchangeClient struct {
// contains filtered or unexported fields
}
func NewBaseExchangeClient ¶
func NewBaseExchangeClient(name string, url string, client ExchangeClient) *BaseExchangeClient
func (*BaseExchangeClient) Connect ¶
func (c *BaseExchangeClient) Connect(ctx context.Context) error
func (*BaseExchangeClient) Disconnect ¶
func (c *BaseExchangeClient) Disconnect()
func (*BaseExchangeClient) GetOrderBook ¶
func (c *BaseExchangeClient) GetOrderBook(symbol string) *orderbook.OrderBook
func (*BaseExchangeClient) Name ¶
func (c *BaseExchangeClient) Name() string
func (*BaseExchangeClient) ReadMessages ¶
func (c *BaseExchangeClient) ReadMessages( ctx context.Context, handleMessage func(WebSocketMessage) error, pingInterval time.Duration, ) error
func (*BaseExchangeClient) RegisterOrderBook ¶
func (c *BaseExchangeClient) RegisterOrderBook(symbol string, ob *orderbook.OrderBook)
func (*BaseExchangeClient) SendPing ¶
func (c *BaseExchangeClient) SendPing() error
type BinanceClient ¶
type BinanceClient struct { *BaseExchangeClient // contains filtered or unexported fields }
func NewBinanceClient ¶
func NewBinanceClient() *BinanceClient
func (*BinanceClient) ReadMessages ¶
func (c *BinanceClient) ReadMessages(ctx context.Context) error
func (*BinanceClient) Subscribe ¶
func (c *BinanceClient) Subscribe(symbols []string) error
type BitflyerClient ¶
type BitflyerClient struct { *BaseExchangeClient // contains filtered or unexported fields }
func NewBitflyerClient ¶
func NewBitflyerClient() *BitflyerClient
func (*BitflyerClient) ReadMessages ¶
func (c *BitflyerClient) ReadMessages(ctx context.Context) error
func (*BitflyerClient) Subscribe ¶
func (c *BitflyerClient) Subscribe(symbols []string) error
type ExchangeClient ¶
type ExchangePair ¶
type KrakenClient ¶
type KrakenClient struct { *BaseExchangeClient // contains filtered or unexported fields }
func NewKrakenClient ¶
func NewKrakenClient() *KrakenClient
func (*KrakenClient) ReadMessages ¶
func (c *KrakenClient) ReadMessages(ctx context.Context) error
func (*KrakenClient) Subscribe ¶
func (c *KrakenClient) Subscribe(pairs []string) error
https://docs.kraken.com/api/docs/websocket-v2/book/ https://docs.kraken.com/api/docs/guides/spot-ws-book-v2/
type Pair ¶
type Pair struct { StandardSymbol string ExchangePairs []ExchangePair ProfitThreshold decimal.Decimal }
type PoloniexClient ¶
type PoloniexClient struct { *BaseExchangeClient // contains filtered or unexported fields }
func NewPoloniexClient ¶
func NewPoloniexClient() *PoloniexClient
func (*PoloniexClient) ReadMessages ¶
func (c *PoloniexClient) ReadMessages(ctx context.Context) error
func (*PoloniexClient) SendPing ¶
func (c *PoloniexClient) SendPing() error
func (*PoloniexClient) Subscribe ¶
func (c *PoloniexClient) Subscribe(symbols []string) error
type WebSocketMessage ¶
Click to show internal directories.
Click to hide internal directories.