Match the fills before comparing profit figures. In this OKX case, opening and closing fees explain most of a roughly 2 USDT difference between the exchange and workbench.
The same trade shows a loss of about 112.86 USDT on one screen and 114.87 USDT on another. Match the underlying fills first, then check whether each figure includes trading fees and funding. In this OKX case, two fee entries explain most of the roughly 2 USDT difference.
A trading bot, an exchange and a strategy workbench can use different definitions for realized P&L and net P&L. When comparing AlgoRover records with the exchange, match the contract, fill identifiers and reporting period before separating price P&L, costs and any remaining difference.
Which fills belong to each P&L figure?
Match the transactions before explaining the gapTwo pages labeled profit can include different accounting items. Once the fill set matches, the difference can be broken down. In the source case, fill-by-fill price P&L was approximately −112.8504 USDT.
How do opening and closing fees change net P&L?
Attach each part of the difference to an account entryCheck the opening and closing fee records separately. Look up funding independently and compare whether each page includes it. For another trade, use that trade's actual charges.

What if a small difference remains after reconciliation?
Keep full precision through the calculationRounding every intermediate value makes the final difference harder to trace. Keep source precision until the final display step.
Ask AI to reconcile fills, fees and funding
Give each figure its own ledgerScope, fills, costs and precision provide four concrete places to investigate the next mismatch.
Trading profit, fees and reconciliation: common questions
Does trading bot profit always include fees?
Read the page's definition. A figure may show price P&L alone or include opening fees, closing fees and funding. List the accounting items on both sides before comparing.
Can I compare realized P&L directly with net P&L?
Match completed fills and check each page's fee and funding treatment. Keep unrealized position P&L, realized price P&L and the result after costs separate.
Should I deduct slippage after using actual fill prices?
Slippage is the difference between expected and actual execution prices. Actual fill prices already reflect that price effect. Deducting an additional estimated slippage amount would count it twice; actual fees and funding remain separate entries.
What records do I need to reconcile OKX closed-position P&L?
Use the same contract and period, with fill IDs, actual prices, quantities, contract units, fees and fee currencies. Match those with the workbench records, preserve precision and keep any unresolved residual visible.
Read next
How trading fees affect profit
Why costs can erase a backtest's profit
Explore AlgoRover LiveSources
OKX: trading fee rules
QuantConnect: expected prices, fills and slippage
Next step
Test the strategy yourself
Use AlgoRover Research to check costs, drawdown, and performance across market periods before you keep testing.
Try AlgoRover Research Follow us on X Follow us on Reddit
Top comments (0)