lt_kline

package
v0.1.71 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LTKline added in v0.1.39

type LTKline interface {
	SetClient(client *client.Client) error
	Subscribe(interval string, symbol string, callback func(response LTKlineResponse)) error
	// Unsubscribe unsubscribes from the specified topics.
	Unsubscribe(topics ...string) error

	// Listen reads the next message from the kline channel.
	Listen() (int, []byte, error)

	// Close closes the connection to the kline channel.
	Close()

	// GetMessagesChan returns a channel that receives messages from the kline channel.
	GetMessagesChan() <-chan []byte

	// Stop stops the kline functionality.
	Stop()
}

LTKline represents the interface for the LT Kline functionality.

func New

func New(cli *client.Client) LTKline

type LTKlineData added in v0.1.39

type LTKlineData struct {
	Start     int64  `json:"start"`
	End       int64  `json:"end"`
	Interval  string `json:"interval"`
	Open      string `json:"open"`
	Close     string `json:"close"`
	High      string `json:"high"`
	Low       string `json:"low"`
	Confirm   bool   `json:"confirm"`
	Timestamp int64  `json:"timestamp"`
}

LTKlineData represents the data structure for LT Kline.

type LTKlineResponse added in v0.1.39

type LTKlineResponse struct {
	Topic string        `json:"topic"`
	Type  string        `json:"type"`
	Ts    int64         `json:"ts"`
	Data  []LTKlineData `json:"data"`
}

LTKlineResponse represents the response structure for LT Kline.

Jump to

Keyboard shortcuts

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