Refresh broker-response history for one order on a trade
POST/api/v1/trades/:tradeId/orders/:orderId/refresh-broker-history
Asks the broker for the current state of the order and appends a
manual_refresh entry to the order's statusHistory if (and only
if) the broker has reported a change. Lets the user reconcile the
trade detail page with what the broker actually said.
Only the trade owner (or an admin) may call this. The endpoint is rate-limited to one call per 60 seconds per (user, order). Admins bypass the rate limit so they can drive support investigations.
Per-broker behaviour:
- Alpaca: GET /v2/orders/{id} (returns closed/cancelled orders too).
- TradeStation: GetOrdersByOrderID first; on 404 falls through to
GetHistoricalOrdersByOrderID. Both return null when the order is
older than ~90 days; in that case
refreshed=falsewithreason: broker_history_unavailable. - Interactive Brokers: routed through the desktop bridge. Open
orders refresh successfully; closed orders return
reason: broker_history_unavailablebecause IB'sget_ordersreturns open orders only. When no desktop agent is connected the response isreason: broker_unavailableso the user can tell IB being offline apart from IB being unsupported.
Request
Responses
- 200
- 401
- 403
- 404
- 429
- 500
Refresh result
Authentication required
Caller is not the trade owner and not an admin
Trade or order not found (or order does not belong to the trade)
Rate limited - one call per 60 seconds per (user, order). Admin bypasses.
Server error