ticker

package
v0.0.0-...-9e0b26f Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromWSRaw

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

FromWSRaw - based on condition will return snapshot of tickers or single tick

Types

type Snapshot

type Snapshot struct {
	Snapshot []*Ticker
}

func SnapshotFromRaw

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

type Ticker

type Ticker struct {
	Symbol          string
	Frr             float64
	Bid             float64
	BidPeriod       int64
	BidSize         float64
	Ask             float64
	AskPeriod       int64
	AskSize         float64
	DailyChange     float64
	DailyChangePerc float64
	LastPrice       float64
	Volume          float64
	High            float64
	Low             float64
	// PLACEHOLDER,
	// PLACEHOLDER,
	FrrAmountAvailable float64
}

func FromRaw

func FromRaw(symbol string, raw []interface{}) (t *Ticker, err error)

func FromRestRaw

func FromRestRaw(raw []interface{}) (t *Ticker, err error)

type Update

type Update Ticker

Jump to

Keyboard shortcuts

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