Skip to main content

Correct a bad execution and rebuild the trade

POST 

/api/v1/reconciliation/repair/:tradeId/fix-execution

Corrects a single execution linked to the trade (its price, quantity, or timestamp) and then rebuilds the trade aggregates from the corrected executions (anomaly A7). This is the only repair that edits the source execution data, so it is inherently sync-proof: a later recompute or sync re-derives avgEntryPrice, entryValue, closedQuantity, and realised P&L from the corrected execution and reproduces the fix rather than reverting it. Used when an execution carries a corrupt price the trade faithfully derived its aggregates from (the staging IP case), which the internal-consistency checks (A1, A3, A5) miss. Supply at least one of price, quantity, or executedAt; a no-op is refused. A supplied price is refused when more than 10x the last synced market price.

Request​

Responses​

Execution corrected and aggregates rebuilt