Skip to main content

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=false with reason: broker_history_unavailable.
  • Interactive Brokers: routed through the desktop bridge. Open orders refresh successfully; closed orders return reason: broker_history_unavailable because IB's get_orders returns open orders only. When no desktop agent is connected the response is reason: broker_unavailable so the user can tell IB being offline apart from IB being unsupported.

Request

Responses

Refresh result