get_orders
Retrieve and format trading orders from Alpaca using filters for status, symbols, timeframes, and asset classes to monitor and analyze portfolio activity.
Instructions
Retrieves and formats orders with the specified filters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Order status to be queried. open, closed or all. Defaults to open. | |
| limit | No | The maximum number of orders in response. Defaults to 50 and max is 500. | |
| after | No | The response will include only ones submitted after this timestamp (exclusive.) | |
| until | No | The response will include only ones submitted until this timestamp (exclusive.) | |
| direction | No | The chronological order of response based on the submission time. asc or desc. Defaults to desc. | |
| nested | No | If true, the result will roll up multi-leg orders under the legs field of primary order. | |
| symbols | No | A comma-separated list of symbols to filter by (ex. “AAPL,TSLA,MSFT”). A currency pair is required for crypto orders (ex. “BTCUSD,BCHUSD,LTCUSD,ETCUSD”). | |
| side | No | Filters down to orders that have a matching side field set. | |
| asset_class | No | A comma-separated list of asset classes, the response will include only orders in the specified asset classes. By specifying `us_option` as the class, you can query option orders by underlying symbol using the symbols parameter. | |
| before_order_id | No | Return orders submitted before the order with this ID (exclusive). Mutually exclusive with `after_order_id`. Do not combine with `after`/`until`. | |
| after_order_id | No | Return orders submitted after the order with this ID (exclusive). Mutually exclusive with `before_order_id`. Do not combine with `after`/`until`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||