candle

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromWSRaw

func FromWSRaw(key string, data []interface{}) (interface{}, error)

FromWSRaw - based on condition will return snapshot of candles or single candle

Types

type Candle

type Candle struct {
	Symbol     string
	Resolution common.CandleResolution
	MTS        int64
	Open       float64
	Close      float64
	High       float64
	Low        float64
	Volume     float64
}

func FromRaw

func FromRaw(symbol string, resolution common.CandleResolution, raw []interface{}) (c *Candle, err error)

type Snapshot

type Snapshot struct {
	Snapshot []*Candle
}

func SnapshotFromRaw

func SnapshotFromRaw(symbol string, resolution common.CandleResolution, raw [][]interface{}) (*Snapshot, error)

Jump to

Keyboard shortcuts

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