Account Information

List account recent orders

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

Returns a list of recent orders in the specified account.

The data returned here is cached. How long the data is cached for varies by brokerage. Check the brokerage integrations doc and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time data, please use the manual refresh endpoint.

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

array of objects
object

Describes a single recent order in an account. Each record here represents a single order leg. For multi-leg orders, there will be multiple records.

1
[
2
{
3
"brokerage_order_id": "66a033fa-da74-4fcf-b527-feefdec9257e",
4
"status": "NONE",
5
"universal_symbol": {
6
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
7
"symbol": "VAB.TO",
8
"raw_symbol": "VAB",
9
"description": "VANGUARD CDN AGGREGATE BOND INDEX ETF",
10
"currency": {
11
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
12
"code": "USD",
13
"name": "US Dollar"
14
},
15
"exchange": {
16
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
17
"code": "TSX",
18
"mic_code": "XTSE",
19
"name": "Toronto Stock Exchange",
20
"timezone": "America/New_York",
21
"start_time": "09:30:00",
22
"close_time": "16:00:00",
23
"suffix": ".TO"
24
},
25
"type": {
26
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
27
"code": "cs",
28
"description": "Common Stock",
29
"is_supported": true
30
},
31
"figi_code": "BBG000B9XRY4",
32
"figi_instrument": {
33
"figi_code": "BBG000B9Y5X2",
34
"figi_share_class": "BBG001S5N8V8"
35
},
36
"currencies": [
37
{
38
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
39
"code": "USD",
40
"name": "US Dollar"
41
}
42
]
43
},
44
"option_symbol": {
45
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
46
"ticker": "AAPL 261218C00240000",
47
"option_type": "CALL",
48
"strike_price": 240,
49
"expiration_date": "2026-12-18",
50
"is_mini_option": false,
51
"underlying_symbol": {
52
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
53
"symbol": "SPY",
54
"raw_symbol": "VAB",
55
"description": "SPDR S&P 500 ETF Trust",
56
"currency": {
57
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
58
"code": "USD",
59
"name": "US Dollar"
60
},
61
"exchange": {
62
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
63
"code": "ARCX",
64
"mic_code": "ARCA",
65
"name": "NYSE ARCA",
66
"timezone": "America/New_York",
67
"start_time": "09:30:00",
68
"close_time": "16:00:00",
69
"suffix": "None",
70
"allows_cryptocurrency_symbols": false
71
},
72
"type": {
73
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
74
"code": "cs",
75
"description": "Common Stock",
76
"is_supported": true
77
},
78
"figi_code": "BBG000B9XRY4",
79
"figi_instrument": {
80
"figi_code": "BBG000B9Y5X2",
81
"figi_share_class": "BBG001S5N8V8"
82
},
83
"currencies": [
84
{
85
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
86
"code": "USD",
87
"name": "US Dollar"
88
}
89
]
90
}
91
},
92
"action": "string",
93
"total_quantity": 100,
94
"open_quantity": 10,
95
"canceled_quantity": 10,
96
"filled_quantity": 80,
97
"execution_price": 12.34,
98
"limit_price": 12.34,
99
"stop_price": 12.5,
100
"order_type": "Market",
101
"time_in_force": "string",
102
"time_placed": "2024-07-30T22:51:49.746Z",
103
"time_updated": "2024-08-05T00:05:57.409Z",
104
"time_executed": "2024-08-05T00:05:57.409Z",
105
"expiry_date": "2024-08-05T00:05:57.409Z",
106
"symbol": "2bcd7cc3-e922-4976-bce1-9858296801c3"
107
}
108
]