Trading Concept

Execution Risk

The gap between theoretical strategy performance and live performance caused by API latency, partial fills, platform outages, rate limiting, and order rejection.


Every backtest assumes perfect execution: the signal fires, the order fills instantly at the expected price, and the platform is always available. In live trading, none of these assumptions hold perfectly.

API latency means the order arrives at the platform milliseconds to seconds after the signal. In fast-moving markets, the price has changed. Partial fills mean a limit order for 10 units fills 3 and leaves 7 unfilled — the strategy is partially exposed. Platform outages mean the adapter cannot reach the exchange during a critical moment. Rate limiting means the bot's request is queued or rejected because it exceeded the platform's request frequency cap. Order rejection means the platform refused the order for a reason the strategy did not anticipate — insufficient balance, margin requirement change, or market halt.

The botwir3 adapter handles rate limiting and basic error recovery. The ledger records the proposed action and the actual result, making the execution gap measurable. But the gap cannot be eliminated — it is inherent to operating through external APIs. A strategy that looks profitable in backtesting may be unprofitable in live trading purely due to execution costs that the backtest did not model. The user is responsible for monitoring the gap between intended and actual execution in the ledger.


Related

SlippageAdapterLedgerBacktesting

Build your bot →