search_orders
Search an account's last 30 days of order history, including filled, cancelled, rejected, and expired orders, with optional filters for status, symbol, side, and date.
Instructions
Search the account's order history — orders in ANY status, created in the last 30 days.
This is the order-history tool. It differs from get_orders, which returns only the open/active orders embedded in the portfolio snapshot: search_orders queries the order-history endpoint and also returns filled, cancelled, rejected, expired and replaced orders, narrowed by the filters below. All filters are optional and combine with AND; call it with no filters to list every order in the window.
Limits (enforced by the API): only orders created within the last 30 days are searchable, and at most 500 orders are returned — narrow with created_after / created_before or the other filters if a search could exceed that.
Each result has the same shape as get_order: the order plus trades (the
individual fills: tradeId, quantity, price, side, timestamp), filledAt,
replacedAt, lastModified and equityMarketSession. equityMarketSession
reports the session an equity order was placed for as REGULAR, REST_OF_DAY or
TWENTY_FOUR_HOURS — a different vocabulary from place_order's
equity_market_session argument (CORE / EXTENDED / TWENTY_FOUR_HOURS); never
feed one into the other.
Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. status: Only orders currently in this status. One of NEW, PARTIALLY_FILLED, FILLED, CANCELLED, QUEUED_CANCELLED, PENDING_CANCEL, PENDING_REPLACE, REPLACED, REJECTED, EXPIRED. side: BUY or SELL. symbols: Only orders for these instruments, each as "SYMBOL" or "SYMBOL:TYPE" (type defaults to EQUITY), e.g. ["AAPL", "BTC:CRYPTO", "SPY260313P00670000:OPTION"]. security_type: Only orders of this instrument type. One of EQUITY, OPTION, MULTI_LEG_INSTRUMENT, CRYPTO, ALT, TREASURY, BOND, INDEX, EVENTCONTRACT. open_close_indicator: OPEN or CLOSE (set on option and shorting orders only). created_after: Only orders created at or after this ISO 8601 timestamp (e.g. 2026-09-01T00:00:00Z). Cannot reach back more than 30 days. created_before: Only orders created before this ISO 8601 timestamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | ||
| status | No | ||
| symbols | No | ||
| account_id | No | ||
| created_after | No | ||
| security_type | No | ||
| created_before | No | ||
| open_close_indicator | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |