engine

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: BSD-3-Clause Imports: 3 Imported by: 5

Documentation

Index

Constants

View Source
const (
	StatusRunning = 0
	StatusSuccess = 1
	StatusFail    = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	OpenLong(price, amount float64) string
	CloseLong(price, amount float64) string
	OpenShort(price, amount float64) string
	CloseShort(price, amount float64) string
	StopLong(price, amount float64) string
	StopShort(price, amount float64) string
	CancelOrder(string)
	CancelAllOrder()
	DoOrder(typ trademodel.TradeType, price, amount float64) string
	AddIndicator(name string, params ...int) (ind indicator.CommonIndicator)
	Position() (pos, price float64)
	Balance() float64
	Log(v ...interface{})
	Watch(watchType string)
	SendNotify(content, contentType string)
	Merge(src, dst string, fn common.CandleFn)
	SetBalance(balance float64)
	UpdateStatus(status int, msg string)
}

Jump to

Keyboard shortcuts

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