Add support for backtesting trading types in LiveTradingBotGrain and TradingBox

- Introduced handling for TradingType.BacktestFutures and TradingType.BacktestSpot in LiveTradingBotGrain.
- Updated TradingBox to map backtest trading types to their respective futures and spot types.
This commit is contained in:
2025-12-11 23:41:53 +07:00
parent a254db6d24
commit 5328d760dd
3 changed files with 6 additions and 4 deletions

View File

@@ -549,6 +549,8 @@ public class LiveTradingBotGrain : Grain, ILiveTradingBotGrain, IRemindable
{
TradingType.Futures => new FuturesBot(logger, _scopeFactory, config, streamProvider),
TradingType.Spot => new SpotBot(logger, _scopeFactory, config, streamProvider),
TradingType.BacktestFutures => new FuturesBot(logger, _scopeFactory, config, streamProvider),
TradingType.BacktestSpot => new SpotBot(logger, _scopeFactory, config, streamProvider),
_ => throw new InvalidOperationException($"Unsupported TradingType for live trading: {config.TradingType}")
};