trade

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(pair string, data []interface{}) (interface{}, error)

FromWSRaw - based on condition will return snapshot of trades or single trade

Types

type Snapshot

type Snapshot struct {
	Snapshot []*Trade
}

func SnapshotFromRaw

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

type Trade

type Trade struct {
	Pair   string
	ID     int64
	MTS    int64
	Amount float64
	Price  float64
	Rate   float64
	Period int
}

Trade represents a trade on the public data feed.

func FromRaw

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

Jump to

Keyboard shortcuts

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