Global service for exchange operations with execution context injection.
Wraps ExchangeConnectionService with ExecutionContextService to inject symbol, when, and backtest parameters into the execution context.
Used internally by BacktestLogicPrivateService and LiveLogicPrivateService.
constructor();
loggerService: any
exchangeConnectionService: any
methodContextService: any
exchangeValidationService: any
validate: any
Validates exchange configuration. Memoized to avoid redundant validations for the same exchange. Logs validation activity.
getCandles: (symbol: string, interval: CandleInterval, limit: number, when: Date, backtest: boolean) => Promise<ICandleData[]>
Fetches historical candles with execution context.
getNextCandles: (symbol: string, interval: CandleInterval, limit: number, when: Date, backtest: boolean) => Promise<ICandleData[]>
Fetches future candles (backtest mode only) with execution context.
getAveragePrice: (symbol: string, when: Date, backtest: boolean) => Promise<number>
Calculates VWAP with execution context.
formatPrice: (symbol: string, price: number, when: Date, backtest: boolean) => Promise<string>
Formats price with execution context.
formatQuantity: (symbol: string, quantity: number, when: Date, backtest: boolean) => Promise<string>
Formats quantity with execution context.