mexcwsmarket

package
v0.0.0-...-67265f5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderBook

type OrderBook struct {
	Channel string `json:"c"`
	Data    struct {
		Bids []struct {
			Price  string `json:"p"`
			Volume string `json:"v"`
		} `json:"bids"`
		Asks []struct {
			Price  string `json:"p"`
			Volume string `json:"v"`
		} `json:"asks"`
		Event     string `json:"e"`
		RequestID string `json:"r"`
	} `json:"d"`
	Symbol    string `json:"s"`
	Timestamp int64  `json:"t"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client *mexcws.MEXCWebSocket) *Service

func (*Service) OrderBook

func (s *Service) OrderBook(symbols []string, level string, listener func(*OrderBook)) error

func (*Service) Ping

func (s *Service) Ping() error

Jump to

Keyboard shortcuts

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