Account Information

List account holdings

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

Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained balances, positions and orders endpoints. The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.

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.

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

Response fields

object

A wrapper object containing holdings information for a single account.

accountobject

A single account at a brokerage.

balancesarray of objects or null

List of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade allows holding multiple currencies in the same account.

positionsarray of objects or null

List of stock/ETF/crypto/mutual fund positions in the account.

option_positionsarray of objects or null

List of option positions in the account.

ordersarray of objects or null

List of recent orders in the account, including both pending and executed orders. Note that option orders are included in this list. Option orders will have a null universal_symbol field and a non-null option_symbol field.

total_valueobject

The total market value of the account. Note that this field is calculated based on the sum of the values of account positions and cash balances known to SnapTrade. It may not be accurate if the brokerage account has holdings that SnapTrade is not aware of. For example, if the brokerage account holds assets that SnapTrade does not support, the total value may be underreported. To get the brokerage reported total market value of the account, refer to account.balance.total.

1
{
2
"account": {
3
"id": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
4
"brokerage_authorization": "87b24961-b51e-4db8-9226-f198f6518a89",
5
"name": "Robinhood Individual",
6
"number": "Q6542138443",
7
"institution_name": "Robinhood",
8
"created_date": "2024-07-23T22:50:22.761Z",
9
"sync_status": {
10
"transactions": {
11
"initial_sync_completed": true,
12
"last_successful_sync": "2022-01-24",
13
"first_transaction_date": "2022-01-24"
14
},
15
"holdings": {
16
"initial_sync_completed": true,
17
"last_successful_sync": "2024-06-28 18:42:46.561408+00:00"
18
}
19
},
20
"balance": {
21
"total": {
22
"amount": 15363.23,
23
"currency": "USD"
24
}
25
},
26
"meta": {
27
"type": "Margin",
28
"status": "ACTIVE",
29
"institution_name": "Robinhood"
30
},
31
"portfolio_group": "2bcd7cc3-e922-4976-bce1-9858296801c3",
32
"cash_restrictions": []
33
},
34
"balances": [
35
{
36
"currency": {
37
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
38
"code": "USD",
39
"name": "US Dollar"
40
},
41
"cash": 300.71,
42
"buying_power": 410.71
43
}
44
],
45
"positions": [
46
{
47
"symbol": {
48
"symbol": {
49
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
50
"symbol": "VAB.TO",
51
"raw_symbol": "VAB",
52
"description": "VANGUARD CDN AGGREGATE BOND INDEX ETF",
53
"currency": {
54
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
55
"code": "USD",
56
"name": "US Dollar"
57
},
58
"exchange": {
59
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
60
"code": "TSX",
61
"mic_code": "XTSE",
62
"name": "Toronto Stock Exchange",
63
"timezone": "America/New_York",
64
"start_time": "09:30:00",
65
"close_time": "16:00:00",
66
"suffix": ".TO"
67
},
68
"type": {
69
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
70
"code": "cs",
71
"description": "Common Stock",
72
"is_supported": true
73
},
74
"figi_code": "BBG000B9XRY4",
75
"figi_instrument": {
76
"figi_code": "BBG000B9Y5X2",
77
"figi_share_class": "BBG001S5N8V8"
78
},
79
"currencies": [
80
{
81
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
82
"code": "USD",
83
"name": "US Dollar"
84
}
85
]
86
},
87
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
88
"description": "VANGUARD CDN AGGREGATE BOND INDEX ETF",
89
"local_id": "3291231",
90
"is_quotable": true,
91
"is_tradable": true
92
},
93
"units": 40,
94
"price": 113.15,
95
"open_pnl": 0.44,
96
"average_purchase_price": 108.3353,
97
"fractional_units": 1.44
98
}
99
],
100
"option_positions": [
101
{
102
"symbol": {
103
"option_symbol": {
104
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
105
"ticker": "AAPL 261218C00240000",
106
"option_type": "CALL",
107
"strike_price": 240,
108
"expiration_date": "2026-12-18",
109
"is_mini_option": false,
110
"underlying_symbol": {
111
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
112
"symbol": "SPY",
113
"raw_symbol": "VAB",
114
"description": "SPDR S&P 500 ETF Trust",
115
"currency": {
116
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
117
"code": "USD",
118
"name": "US Dollar"
119
},
120
"exchange": {
121
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
122
"code": "ARCX",
123
"mic_code": "ARCA",
124
"name": "NYSE ARCA",
125
"timezone": "America/New_York",
126
"start_time": "09:30:00",
127
"close_time": "16:00:00",
128
"suffix": "None",
129
"allows_cryptocurrency_symbols": false
130
},
131
"type": {
132
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
133
"code": "cs",
134
"description": "Common Stock",
135
"is_supported": true
136
},
137
"figi_code": "BBG000B9XRY4",
138
"figi_instrument": {
139
"figi_code": "BBG000B9Y5X2",
140
"figi_share_class": "BBG001S5N8V8"
141
},
142
"currencies": [
143
{
144
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
145
"code": "USD",
146
"name": "US Dollar"
147
}
148
]
149
}
150
},
151
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
152
"description": "SPY CALL 7/17 200"
153
},
154
"price": 38.4,
155
"units": -50,
156
"average_purchase_price": 4126,
157
"currency": {
158
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
159
"code": "USD",
160
"name": "US Dollar"
161
}
162
}
163
],
164
"orders": [
165
{
166
"brokerage_order_id": "66a033fa-da74-4fcf-b527-feefdec9257e",
167
"status": "NONE",
168
"universal_symbol": {
169
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
170
"symbol": "VAB.TO",
171
"raw_symbol": "VAB",
172
"description": "VANGUARD CDN AGGREGATE BOND INDEX ETF",
173
"currency": {
174
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
175
"code": "USD",
176
"name": "US Dollar"
177
},
178
"exchange": {
179
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
180
"code": "TSX",
181
"mic_code": "XTSE",
182
"name": "Toronto Stock Exchange",
183
"timezone": "America/New_York",
184
"start_time": "09:30:00",
185
"close_time": "16:00:00",
186
"suffix": ".TO"
187
},
188
"type": {
189
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
190
"code": "cs",
191
"description": "Common Stock",
192
"is_supported": true
193
},
194
"figi_code": "BBG000B9XRY4",
195
"figi_instrument": {
196
"figi_code": "BBG000B9Y5X2",
197
"figi_share_class": "BBG001S5N8V8"
198
},
199
"currencies": [
200
{
201
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
202
"code": "USD",
203
"name": "US Dollar"
204
}
205
]
206
},
207
"option_symbol": {
208
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
209
"ticker": "AAPL 261218C00240000",
210
"option_type": "CALL",
211
"strike_price": 240,
212
"expiration_date": "2026-12-18",
213
"is_mini_option": false,
214
"underlying_symbol": {
215
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
216
"symbol": "SPY",
217
"raw_symbol": "VAB",
218
"description": "SPDR S&P 500 ETF Trust",
219
"currency": {
220
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
221
"code": "USD",
222
"name": "US Dollar"
223
},
224
"exchange": {
225
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
226
"code": "ARCX",
227
"mic_code": "ARCA",
228
"name": "NYSE ARCA",
229
"timezone": "America/New_York",
230
"start_time": "09:30:00",
231
"close_time": "16:00:00",
232
"suffix": "None",
233
"allows_cryptocurrency_symbols": false
234
},
235
"type": {
236
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
237
"code": "cs",
238
"description": "Common Stock",
239
"is_supported": true
240
},
241
"figi_code": "BBG000B9XRY4",
242
"figi_instrument": {
243
"figi_code": "BBG000B9Y5X2",
244
"figi_share_class": "BBG001S5N8V8"
245
},
246
"currencies": [
247
{
248
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
249
"code": "USD",
250
"name": "US Dollar"
251
}
252
]
253
}
254
},
255
"action": "string",
256
"total_quantity": 100,
257
"open_quantity": 10,
258
"canceled_quantity": 10,
259
"filled_quantity": 80,
260
"execution_price": 12.34,
261
"limit_price": 12.34,
262
"stop_price": 12.5,
263
"order_type": "Market",
264
"time_in_force": "string",
265
"time_placed": "2024-07-30T22:51:49.746Z",
266
"time_updated": "2024-08-05T00:05:57.409Z",
267
"time_executed": "2024-08-05T00:05:57.409Z",
268
"expiry_date": "2024-08-05T00:05:57.409Z",
269
"symbol": "2bcd7cc3-e922-4976-bce1-9858296801c3"
270
}
271
],
272
"total_value": {
273
"value": 32600.71,
274
"currency": "USD"
275
}
276
}