Import a broker position split across multiple trades on order boundaries
POST/api/v1/reconciliation/split-import-position-from-orders
The order-allocation variant of split import (issue #1383): every matched order (from /order-import-suggestion) is assigned to exactly one allocation's strategy. Each resulting trade is anchored on its allocated orders' real fills - no synthetic entry execution. Validity is by construction: every matched order must appear in exactly one allocation's orderIds, with no leftover and no duplicate assignment. A split that needs to divide a single order below its own boundary is not supported here; use the free-quantity POST /split-import-position instead. Alpaca only.
Request
Responses
- 200
- 400
- 401
- 404
- 409
- 422
- 500
Position split into trades anchored on real broker orders
Validation error, or the allocation assignment does not cover the matched orders exactly (an order assigned twice, or left out).
Authentication required
code: ORDER_BACKED_IMPORT_ACCOUNT_NOT_FOUND - the account does
not exist or is not owned by the caller.
Conflict. code: OPPOSING_POSITION_OPEN (see /import-position),
code: ORDER_BACKED_IMPORT_UNAVAILABLE when the suggestion is no
longer available, code: ORDER_BACKED_IMPORT_RATE_LIMITED
(#1588) when the broker rate-limited the order-history or
real-fills fetch - retry, do not fall back to the snapshot
import - or code: ORDER_BACKED_IMPORT_ORDER_CONFLICT (#1394)
when a matched order already belongs to a different UTM
trade - details.brokerOrderId and details.conflictingTradeId
name it. Resolve or unlink that trade first, then retry.
Import sanity check failed (code: IMPORT_SANITY_FAILED, see
/import-position), or an allocation's recalculated quantity was
still zero after linking and ingesting (code: ORDER_BACKED_IMPORT_ZERO_QUANTITY, #1394).
Server error