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
Click to show internal directories.
Click to hide internal directories.