For AI agents: the documentation index is available at https://docs.snaptrade.com/llms.txt, and the comprehensive documentation index is available at https://docs.snaptrade.com/llms-full.txt. The complete public OpenAPI specification is available at https://docs.snaptrade.com/openapi.yaml. Complete public OpenAPI specification with all documented operations, schemas, servers, and authentication requirements. Use it for SDK generation and API tooling; beta operations are marked x-beta. Markdown versions of documentation pages are available by appending .md to the URL path.
Account Information

Get account order detail

BETA
get
https://api.snaptrade.com/accounts/{accountId}/orders/{brokerageOrderId}

Returns the detail of a single order, identified by the brokerage order ID in the path, in the same kind-discriminated format as /accounts/{accountId}/orders/all.

The order carries a legs list with at least one leg; switch on legs[].instrument.kind and order_type.kind to know which fields are present. Multi-leg orders are a single order with multiple legs.

This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change.

This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.

Beta: this endpoint and its response schema may change.

Execute an API Request

Authentication Method

Use commercial authentication when acting on behalf of your application and passing end-user credentials with requests that require them.

Credentials
Path
accountIdstring (format: uuid)required

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

brokerageOrderIdstringrequired

Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.

Request
Installation
$
npm install snaptrade-typescript-sdk
1
import {
2
Snaptrade,
3
SnaptradeAuth,
4
} from "snaptrade-typescript-sdk";
5
6
const snaptrade = new Snaptrade({
7
auth: SnaptradeAuth.commercialApiKey({
8
consumerKey: "CONSUMER_KEY",
9
clientId: "CLIENT_ID",
10
}),
11
});
12
13
const response =
14
await snaptrade.accountInformation.getAccountOrder(
15
{
16
accountId:
17
"917c8734-8470-4a3e-a18f-57c3f2ee6631",
18
brokerageOrderId:
19
"66a033fa-da74-4fcf-b527-feefdec9257e",
20
userId: "USER_ID",
21
userSecret: "USER_SECRET",
22
},
23
);
24
console.log(response.data);

Response fields

object

A single order. Single-leg orders have exactly one entry in legs; multi-leg orders (spreads, strangles, covered calls) have one entry per leg.

Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.

statusstring

Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.

The order type and the prices that belong to it. Use kind to determine which fields are present.

How long the order remains active. Brokerage values that cannot be mapped to this list are returned as OTHER.

  • DAY - valid only for the trading day on which it is placed.
  • GTC - Good Til Canceled.
  • FOK - Fill Or Kill.
  • IOC - Immediate Or Cancel.
  • GTD - Good Til Date; see expiry_date.
  • MOO - Market On Open.
  • EHP - Extended Hours P.M.
  • EHA - Extended Hours A.M.
  • OTHER - the brokerage reported a value outside this list.
expiry_datestring (format: date-time) or null

When the order expires, for orders with a time_in_force of GTD.

priced_inobject or null

The asset the order prices (execution_price and the prices inside order_type) are denominated in. Use kind to determine which schema is present.

  • cash - a fiat currency identified by its ISO-4217 code. This is the case for equities, options, futures, forex and crypto pairs quoted in fiat (for example USD for BTC-USD).
  • crypto - a crypto asset, for crypto pairs quoted in another crypto asset, including stablecoins (for example USDC for ETH-USDC or BTC for ETH-BTC). null when the quote asset could not be determined.
price_effectstring or null

Direction of the net order price. CREDIT means cash is received, DEBIT means cash is paid, EVEN means the net price is zero, and UNKNOWN means the direction could not be determined. Null when not applicable, for example for orders containing an outright futures leg (instrument.kind of future). A futures price is a contract quote, not an upfront cash flow. Futures options retain their price effect.

total_quantitystring (format: decimal) or null

Total quantity requested. For multi-leg orders this is the number of spreads, not the sum of leg quantities.

filled_quantitystring (format: decimal) or null

Quantity filled so far.

canceled_quantitystring (format: decimal) or null

Quantity canceled.

open_quantitystring (format: decimal) or null

Quantity still open (not yet filled or canceled).

execution_pricestring (format: decimal) or null

Average execution price. Per unit for single-leg orders; net price per spread for multi-leg orders.

time_placedstring (format: date-time) or null

The time the order was submitted to the brokerage, when the brokerage reports it.

time_updatedstring (format: date-time) or null

The time the order was last updated at the brokerage, when available.

time_executedstring (format: date-time) or null

The time the order was executed, when available.

groupobject or null

Set when this order belongs to a complex order group (OCO, OTO, OTOCO). Null otherwise.

legsarray of objects

The legs that make up the order. Always has at least one entry.

1
{
2
"brokerage_order_id": "66a033fa-da74-4fcf-b527-feefdec9257e",
3
"status": "PENDING",
4
"order_type": {
5
"kind": "market"
6
},
7
"time_in_force": "DAY",
8
"expiry_date": "2026-07-30T22:51:49Z",
9
"priced_in": {
10
"kind": "cash",
11
"code": "EUR"
12
},
13
"price_effect": "CREDIT",
14
"total_quantity": "10",
15
"filled_quantity": "9",
16
"canceled_quantity": "1",
17
"open_quantity": "0",
18
"execution_price": "12.34",
19
"time_placed": "2026-07-30T22:51:49Z",
20
"time_updated": "2026-07-30T22:52:10Z",
21
"time_executed": "2026-08-05T00:05:57Z",
22
"group": {
23
"id": "1234567890",
24
"role": "TRIGGER"
25
},
26
"legs": [
27
{
28
"leg_id": "string",
29
"instrument": {
30
"kind": "stock",
31
"id": "1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324",
32
"symbol": "AAPL",
33
"raw_symbol": "AAPL",
34
"description": "Apple Inc.",
35
"currency": "USD",
36
"exchange": "XNAS",
37
"figi_instrument": {
38
"figi_code": "BBG000B9Y5X2",
39
"figi_share_class": "BBG001S5N8V8"
40
}
41
},
42
"action": "string",
43
"total_quantity": "10",
44
"filled_quantity": "9",
45
"canceled_quantity": "1",
46
"execution_price": "12.34",
47
"status": "PENDING"
48
}
49
]
50
}