Versions in this module Expand all Collapse all v0 v0.0.1 May 4, 2024 Changes in this version + func SyncActiveOrder(ctx context.Context, ex types.Exchange, ...) (isOrderUpdated bool, err error) + func SyncActiveOrders(ctx context.Context, opts SyncActiveOrdersOpts) error + type ProfitFixer struct + func NewProfitFixer() *ProfitFixer + func (f *ProfitFixer) AddExchange(sessionName string, service types.ExchangeTradeHistoryService) + func (f *ProfitFixer) Fix(ctx context.Context, symbol string, since, until time.Time, ...) error + func (f *ProfitFixer) FixFromTrades(allTrades []types.Trade, stats *types.ProfitStats, position *types.Position) error + type ProfitFixerConfig struct + TradesSince types.Time + type RiskController struct + CircuitBreakEMA types.IntervalWindow + CircuitBreakLossThreshold fixedpoint.Value + MaxPositionQuantity fixedpoint.Value + PositionHardLimit fixedpoint.Value + type StatusCallbacks struct + func (c *StatusCallbacks) EmitClosed() + func (c *StatusCallbacks) EmitError(err error) + func (c *StatusCallbacks) EmitReady() + func (c *StatusCallbacks) OnClosed(cb func()) + func (c *StatusCallbacks) OnError(cb func(err error)) + func (c *StatusCallbacks) OnReady(cb func()) + type Strategy struct + Environ *bbgo.Environment + OrderExecutor *bbgo.GeneralOrderExecutor + Position *types.Position + ProfitStats *types.ProfitStats + Session *bbgo.ExchangeSession + func (s *Strategy) Initialize(ctx context.Context, environ *bbgo.Environment, session *bbgo.ExchangeSession, ...) + func (s *Strategy) IsHalted(t time.Time) bool + type SyncActiveOrdersOpts struct + ActiveOrderBook *bbgo.ActiveOrderBook + Exchange types.Exchange + Logger *logrus.Entry + OpenOrders []types.Order + OrderQueryService types.ExchangeOrderQueryService