trigger

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TimeSleep = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type FormulaTrigger

type FormulaTrigger struct {
	Resp *Response
	Ping chan struct{}
	// contains filtered or unexported fields
}

func NewTrigger

func NewTrigger(b *binance.Binance) FormulaTrigger

func (*FormulaTrigger) Begin

func (ft *FormulaTrigger) Begin(f formula.Formula)

func (*FormulaTrigger) CheckLoop

func (ft *FormulaTrigger) CheckLoop()

func (*FormulaTrigger) End

func (ft *FormulaTrigger) End()

func (*FormulaTrigger) GetFormula

func (ft *FormulaTrigger) GetFormula() formula.Formula

func (*FormulaTrigger) GetResponse

func (ft *FormulaTrigger) GetResponse() Response

func (*FormulaTrigger) IsActive

func (ft *FormulaTrigger) IsActive() bool

func (*FormulaTrigger) UpdFormula

func (ft *FormulaTrigger) UpdFormula(f formula.Formula)

func (*FormulaTrigger) UpdResponse

func (ft *FormulaTrigger) UpdResponse()

type Response

type Response struct {
	CurRate     decimal.Decimal
	FormulaRate decimal.Decimal
	AbsDif      decimal.Decimal
	RelDif      decimal.Decimal
	StartRate   decimal.Decimal
	AbsProfit   decimal.Decimal
	RelProfit   decimal.Decimal
	T           time.Time
	Err         error
	Formula     string
}

Jump to

Keyboard shortcuts

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