Experimental endpoints

List account orders v2

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

Returns a list of recent orders in the specified account.

The V2 order response format will include all legs of each order in the legs list field. If the order is single legged, legs will be a list of one leg.

If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.

Execute an API Request

Path
accountIdstring (format: uuid)required

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

Query
userIdstringrequired

SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.

userSecretstringrequired

SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.

statestring

defaults value is set to "all"

daysinteger (format: int32)

Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.

Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
Loading...

Response fields

object

Contains a standardized list of account orders in the V2 format.

ordersarray of objects

List of orders returned by the endpoint.

1
{
2
"orders": [
3
{
4
"brokerage_order_id": "66a033fa-da74-4fcf-b527-feefdec9257e",
5
"status": "NONE",
6
"order_type": "MARKET",
7
"time_in_force": "DAY",
8
"time_placed": "2024-07-30T22:51:49.746Z",
9
"time_executed": "2024-08-05T00:05:57.409Z",
10
"quote_currency": "USD",
11
"execution_price": 12.34,
12
"limit_price": 12.34,
13
"stop_price": 12.5,
14
"legs": [
15
{
16
"leg_id": "string",
17
"instrument": {
18
"symbol": "AAPL",
19
"description": "Apple Inc.",
20
"asset_type": "EQUITY",
21
"exchange_mic_code": "XNAS",
22
"figi_code": "BBG000B9XRY4"
23
},
24
"action": "string",
25
"execution_price": 12.34,
26
"total_quantity": "10",
27
"canceled_quantity": "1",
28
"filled_quantity": "9",
29
"status": "PENDING"
30
}
31
]
32
}
33
]
34
}