ws

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: GPL-3.0 Imports: 9 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(connWs ConnectorWs, s string)

func Error

func Error(connWs ConnectorWs, errName string, err error, data []interface{}, errText string)

func Start

func Start(connWs ConnectorWs) error

подключение к серверу и постоянное чтение приходящих ответов

func Subscribe

func Subscribe(connWs ConnectorWs, channel string, symbols []string)

Types

type ConnectorWs

type ConnectorWs interface {
	GetExchangeName() string
	GetPair(args ...string) string
	GetTradingType() TradingType
	GetConfiguration() Configuration
	GetConnection() *websocket.Conn
	SetConnection(c *websocket.Conn)
	GetSubs() []interface{}
	GetEmitter() *emission.Emitter
	GetLogger() *zap.Logger
	MessageHandler(data []byte)
	GetRequest(op string, channel string, symbols []string) interface{}
	GetPingMessage() string
}

type TradingType

type TradingType string
const (
	SpotTrading    TradingType = "SPOT"
	MarginTrading  TradingType = "MARGIN"
	FuturesTrading TradingType = "FUTURES"
)

Jump to

Keyboard shortcuts

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