ws

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: GPL-3.0 Imports: 7 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 Login added in v0.0.7

func Login(connWs ConnectorWs)

function to enter the private channel of the exchange. If exchange haven't private channel, an error will be returned

func Start

func Start(connWs ConnectorWs) error

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

func Subscribe

func Subscribe(connWs ConnectorWs, channel string, args interface{})

for Binance, Bibit args - symbols for subscrybe for OKX args- structure for subscrybe to channel (without op)

Types

type ConnectorWs

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

Jump to

Keyboard shortcuts

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