trade

package
v0.0.0-...-51300c0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTrader

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

func (*BaseTrader) AddSubscription

func (t *BaseTrader) AddSubscription(sub *stmodel.Subscription) error

func (*BaseTrader) RemoveSubscription

func (t *BaseTrader) RemoveSubscription(id uint) error

RemoveSubscription removes algorithm subscription and stop monitoring

type MockTrader

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

func NewMockTrader

func NewMockTrader(hRep repository.HistoryRepository, lots map[string]int64, figiCurrency map[string]string, logger *zap.SugaredLogger) MockTrader

func (*MockTrader) AddSubscription

func (t *MockTrader) AddSubscription(sub *stmodel.Subscription) error

func (MockTrader) GetStatCh

func (t MockTrader) GetStatCh() chan dto.HistStatResponse

func (*MockTrader) Go

func (t *MockTrader) Go(ctx context.Context)

func (*MockTrader) RemoveSubscription

func (t *MockTrader) RemoveSubscription(id uint) error

type ProdTrader

type ProdTrader struct {
	*BaseTrader
}

func (*ProdTrader) Go

func (t *ProdTrader) Go(ctx context.Context)

type SandboxTrader

type SandboxTrader struct {
	*BaseTrader
}

func (*SandboxTrader) Go

func (t *SandboxTrader) Go(ctx context.Context)

type Trader

type Trader interface {
	AddSubscription(sub *stmodel.Subscription) error
	RemoveSubscription(id uint) error
	Go(ctx context.Context)
}

func NewProdTrader

func NewProdTrader(infoSrv service.InfoSrv, tradeSrv service.TradeService, actionRep repository.ActionRepository, logger *zap.SugaredLogger) Trader

func NewSandboxTrader

func NewSandboxTrader(infoSrv service.InfoSrv, tradeSrv service.TradeService, actionRep repository.ActionRepository, logger *zap.SugaredLogger) Trader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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