Link executions to a trade
POST/api/v1/reconciliation/link
Links one or more broker executions to an existing trade. All executions must belong to the same symbol as the target trade. Executions already linked to another trade are re-pointed (the re-match path for a fill on the wrong trade,
Request
Responses
- 200
- 400
- 401
- 404
- 409
- 500
Executions linked successfully
Validation error or symbol mismatch between executions and trade. code: EXECUTION_HAS_ORDER - one or more executions carries an orderId, so it has no independent link state (#1334, "fills follow their order"). details.orderId names the order to link instead via POST /link-order.
Authentication required
Trade or execution not found, or access denied
Linking would push the trade's recalculated aggregates above the broker's reported position (#1360). The move is rolled back atomically with the refusal, so no partial state is written. code: RECONCILIATION_SYNTHETIC_CONFLICT when the target trade still holds a synthetic estimate for the same shares (remove it first); code: RECONCILIATION_OVER_EXPOSURE otherwise. details carries the accountId, symbol, side, brokerQuantity, utmOpenSum, exceedsBy, and conflictingTradeIds.
Server error