logo
Account Information

List balances, positions and orders for the specified account

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

Lists balances, positions and orders for the specified account as well as option_positions and account metadata. The data returned is similar to the data returned over the more fine-grained positions, orders and balances endpoints.

Execute an API Request

Path
accountIdstring (format: uuid)required

The ID of the account to fetch holdings for.

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 (generated when registering user)

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

Response fields

object

Account Holdings with Account ID

accountobject

Holdings with account ID

balancesarray of objects or null
positionsarray of objects or null
option_positionsarray of objects or null
ordersarray of objects or null
total_valueobject

Calculated based on the sum of the values of account positions and cash balances

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