Get All Orders
GET {{baseUrl}}/v2/orders
Retrieves a list of orders for the account, filtered by the supplied query parameters.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
status | string | Order status to be queried. open, closed or all. Defaults to open. | |
limit | number | The maximum number of orders in response. Defaults to 50 and max is 500. | |
after | string | The response will include only ones submitted after this timestamp (exclusive.) | |
until | string | The response will include only ones submitted until this timestamp (exclusive.) | |
direction | string | The chronological order of response based on the submission time. asc or desc. Defaults to desc. | |
nested | boolean | If true, the result will roll up multi-leg orders under the legs field of primary order. | |
symbols | string | 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 | string | Filters down to orders that have a matching side field set. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Apca-Api-Key-Id | string | ||
Apca-Api-Secret-Key | string |
RESPONSES
status: OK
[{"id":"b3edb0f5-5950-4c7a-a472-ce64387a27d9","client_order_id":"cb7240f4-f2b1-464a-b2c2-4388b2de2082","created_at":"2024-03-22T20:40:50.916594602Z","updated_at":"2024-03-22T20:40:50.940714242Z","submitted_at":"2024-03-22T20:40:50.915476843Z","filled_at":null,"expired_at":null,"canceled_at":null,"failed_at":null,"replaced_at":null,"replaced_by":null,"replaces":null,"asset_id":"a1733398-6acc-4e92-af24-0d0667f78713","symbol":"ETH/USD","asset_class":"crypto","notional":null,"qty":"0.02","filled_qty":"0","filled_avg_price":null,"order_class":"","order_type":"limit","type":"limit","side":"buy","time_in_force":"gtc","limit_price":"2100","stop_price":null,"status":"new","extended_hours":false,"legs":null,"trail_percent":null,"trail_price":null,"hwm":null,"subtag":null,"source":null},{"id":"23f0ef09-3b4d-4bd2-96b7-ff990e8e318e","client_order_id":"ef742c31-d1af-4722-b435-411aa11c7f78","created_at":"2024-03-22T20:40:03.046196Z","updated_at":"2024-03-22T20:40:03.046234Z","submitted_at":"2024-03-22T20:40:03.045459Z","filled_at":null,"expired_at":null,"canceled_at":null,"failed_at":null,"replaced_at":null,"replaced_by":null,"replaces":null,"asset_id":"28503981-2952-4704-9ac2-cea01a83ffae","symbol":"AAPL250620C00100000","asset_class":"us_option","notional":null,"qty":"2","filled_qty":"0","filled_avg_price":null,"order_class":"simple","order_type":"limit","type":"limit","side":"buy","time_in_force":"day","limit_price":"10","stop_price":null,"status":"pending_new","extended_hours":false,"legs":null,"trail_percent":null,"trail_price":null,"hwm":null,"subtag":null,"source":"access_key"},{"id":"d27f7175-073d-455d-a95d-89f43bb3ab77","client_order_id":"ab7dcbfb-f862-4145-b5e0-27d1b562f5f4","created_at":"2024-03-22T20:38:24.849158Z","updated_at":"2024-03-22T20:38:24.849158Z","submitted_at":"2024-03-22T20:38:24.848207Z","filled_at":null,"expired_at":null,"canceled_at":null,"failed_at":null,"replaced_at":null,"replaced_by":null,"replaces":null,"asset_id":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","symbol":"AAPL","asset_class":"us_equity","notional":null,"qty":"2","filled_qty":"0","filled_avg_price":null,"order_class":"","order_type":"limit","type":"limit","side":"buy","time_in_force":"gtc","limit_price":"150","stop_price":null,"status":"accepted","extended_hours":false,"legs":null,"trail_percent":null,"trail_price":null,"hwm":null,"subtag":null,"source":"access_key"}]