com

package
v0.2.30 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Day10MSecs = int64(864000000)
)

Variables

View Source
var (
	PriceExpireMS = int64(60000)
)

Functions

func Cron

func Cron() *cron.Cron

func DelPairCopieds

func DelPairCopieds(keys ...string)

func GetPairCopieds

func GetPairCopieds() map[string][2]int64

func GetPrice

func GetPrice(symbol string, side string) float64

GetPrice panic if price expired or not found

func GetPriceExp

func GetPriceExp(symbol string, side string, expMS int64) float64

GetPriceExp panic if price expired before expMS or not found

func GetPriceSafe

func GetPriceSafe(symbol string, side string) float64

GetPriceSafe return -1 if price expired or not found

func GetPriceSafeExp

func GetPriceSafeExp(symbol string, side string, expMS int64) float64

func IsMaker

func IsMaker(pair, side string, price float64) bool

func IsPriceEmpty

func IsPriceEmpty() bool

func SetBarPrice

func SetBarPrice(pair string, price float64)

func SetPairCopieds

func SetPairCopieds(items map[string][2]int64)

func SetPairMs

func SetPairMs(pair string, barMS, waitMS int64)

SetPairMs update LastBarMs/wait interval from spider 更新bot端从爬虫收到的标的最新时间和等待间隔

func SetPrice

func SetPrice(pair string, ask, bid float64)

func SetPrices

func SetPrices(data map[string]float64, side string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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