list_orders
Retrieve order details from your Oanda account, starting with the most recent. Use filters like state, instrument, or order ID to narrow down results.
Instructions
List orders on the configured account, most recent first.
Returns {"orders": [...], "lastTransactionID": "..."}. Each order
carries id, type (e.g. MARKET, LIMIT, STOP,
MARKET_IF_TOUCHED, TAKE_PROFIT, STOP_LOSS,
TRAILING_STOP_LOSS), instrument, units (signed decimal
string: positive = long, negative = short), price (decimal
string), state (PENDING, FILLED, TRIGGERED, or
CANCELLED), timeInForce, createTime (RFC3339), and — where
applicable — fill/cancel bookkeeping and attached
takeProfitOnFill/stopLossOnFill/trailingStopLossOnFill
details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of orders to return. | |
| state | No | Order state to filter by. | PENDING |
| before_id | No | Return only orders with an ID before this order ID; omit for the most recent. Use for paging backwards through history. | |
| instrument | No | Only orders for this instrument, e.g. 'EUR_USD'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||