engine

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KlineManager

type KlineManager interface {
	Start()
	Stop()
	Subscribe(assets []string) error
	Unsubscribe(assets []string) error
	GetOhlcsChan() <-chan charts.TokenOhlcs
}

type Strategy

type Strategy interface {
	ID() string
	TokenAddress() string
	OnTick(ctx context.Context, ohlcs []charts.Ohlc) error
}

type StrategyEngine

type StrategyEngine struct {
	// contains filtered or unexported fields
}

func NewStrategyEngine

func NewStrategyEngine(klineManager KlineManager) *StrategyEngine

func (*StrategyEngine) Start

func (engine *StrategyEngine) Start()

func (*StrategyEngine) StartStrategy

func (engine *StrategyEngine) StartStrategy(strategyList []Strategy) (err error)

func (*StrategyEngine) Stop

func (engine *StrategyEngine) Stop()

func (*StrategyEngine) StopStrategy

func (engine *StrategyEngine) StopStrategy(id string)

Jump to

Keyboard shortcuts

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