Documentation ¶
Index ¶
- Constants
- type State
- type Strategy
- func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.OrderExecutionRouter, ...) error
- func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession)
- func (s *Strategy) ID() string
- func (s *Strategy) LoadState() error
- func (s *Strategy) SaveState() error
- func (s *Strategy) Validate() error
Constants ¶
View Source
const ID = "xarb"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { Position *bbgo.Position `json:"position,omitempty"` AccumulatedVolume fixedpoint.Value `json:"accumulatedVolume,omitempty"` AccumulatedPnL fixedpoint.Value `json:"accumulatedPnL,omitempty"` AccumulatedProfit fixedpoint.Value `json:"accumulatedProfit,omitempty"` AccumulatedLoss fixedpoint.Value `json:"accumulatedLoss,omitempty"` AccumulatedSince int64 `json:"accumulatedSince,omitempty"` }
type Strategy ¶
type Strategy struct { *bbgo.Graceful *bbgo.Notifiability *bbgo.Persistence Symbol string `json:"symbol"` MaxQuantity fixedpoint.Value `json:"maxQuantity"` MinQuantity fixedpoint.Value `json:"minQuantity"` TakeRatio fixedpoint.Value `json:"takeRatio"` MinSpreadRatio fixedpoint.Value `json:"minSpreadRatio"` MinQuoteBalance fixedpoint.Value `json:"minQuoteBalance"` MinBaseBalance fixedpoint.Value `json:"minBaseBalance"` DelayTime types.Duration `json:"delayTime"` // contains filtered or unexported fields }
func (*Strategy) CrossRun ¶
func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.OrderExecutionRouter, sessions map[string]*bbgo.ExchangeSession) error
func (*Strategy) CrossSubscribe ¶
func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession)
Click to show internal directories.
Click to hide internal directories.