aggregation

package
v0.0.197 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ECannotFindSupports = errors.New("Cannot find any supports. Please update your settings. Or reconsider this market because it might be illiquid.")
)

Functions

func Get

func Get(
	exchange model.Exchange,
	market string,
	dip, pip float64,
	max, min float64,
	dist, 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,
	dist, prec, 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