aggregation

package
v0.0.177 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EOrderBookTooThin = errors.New("Cannot find any supports. Order book is too thin. Please reconsider this market.")
)

Functions

func Get

func Get(
	exchange model.Exchange,
	market string,
	dip, pip float64,
	max, min float64,
	top int,
	strict, sandbox bool,
) (float64, float64, float64, error)

returns (agg, dip, pip, error)

func GetEx

func GetEx(
	exchange model.Exchange,
	client interface{},
	market string,
	ticker float64,
	avg float64,
	dip, pip float64,
	max, min float64,
	top int,
	strict bool,
) (float64, float64, float64, error)

returns (agg, dip, pip, error)

func Round

func Round(input, agg float64) float64

rounds [input] to to nearest multiple of [agg]

Types

This section is empty.

Jump to

Keyboard shortcuts

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