domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backtests

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

func New

func New(db db.Port, evts events.Port, csClient candlesticks.Client) *Backtests

func (Backtests) Advance

func (b Backtests) Advance(ctx context.Context, backtestId uint) error

func (Backtests) Create

func (b Backtests) Create(ctx context.Context, req backtest.NewPayload) (id uint, err error)

func (Backtests) CreateOrder

func (b Backtests) CreateOrder(ctx context.Context, backtestId uint, order order.Order) error

func (Backtests) GetAccounts

func (b Backtests) GetAccounts(ctx context.Context, backtestId uint) (map[string]account.Account, error)

func (Backtests) GetOrders

func (b Backtests) GetOrders(ctx context.Context, backtestId uint) ([]order.Order, error)

func (Backtests) SubscribeToEvents

func (b Backtests) SubscribeToEvents(ctx context.Context, backtestId uint, exchange, pairSymbol string) error

Jump to

Keyboard shortcuts

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