Summary
There is no paper trading mode. Users cannot test strategies without real money. This is a critical safety feature for any trading platform.
What needs to be done
PaperTradingEngine in Omnijure.Core
- Implements
IExchangeClient so it is a drop-in replacement
- Maintains a virtual
Portfolio with initial balance (configurable, default $10,000 USDT)
- On
PlaceOrderAsync:
- Market order: fills immediately at the last known candle close price
- Limit order: queues the order and fills when price crosses the limit level
- Tracks open orders, filled orders, P&L per trade, total return %
- Emits
OrderFilledEvent via IEventBus just like the real client would
- Exposes
PaperPortfolio: Balance, Positions, OpenOrders, TradeHistory
Mode switching
AppSettings.General gets a TradingMode enum: Live | Paper
IExchangeClientFactory returns either BinanceClient or PaperTradingEngine based on the setting
Acceptance criteria
References
Summary
There is no paper trading mode. Users cannot test strategies without real money. This is a critical safety feature for any trading platform.
What needs to be done
PaperTradingEngineinOmnijure.CoreIExchangeClientso it is a drop-in replacementPortfoliowith initial balance (configurable, default $10,000 USDT)PlaceOrderAsync:OrderFilledEventviaIEventBusjust like the real client wouldPaperPortfolio:Balance,Positions,OpenOrders,TradeHistoryMode switching
AppSettings.Generalgets aTradingModeenum:Live | PaperIExchangeClientFactoryreturns eitherBinanceClientorPaperTradingEnginebased on the settingAcceptance criteria
PaperTradingEngineimplementsIExchangeClientPaperPortfoliotracks balance, positions, PnL correctlyReferences
src/Omnijure.Core/Entities/Exchange/