snaptrade-typescript-sdk 9.0.193 → 9.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -46
- package/dist/api/account-information-api-generated.d.ts +65 -4
- package/dist/api/account-information-api-generated.js +93 -4
- package/dist/api/connections-api-generated.d.ts +4 -4
- package/dist/api/connections-api-generated.js +4 -4
- package/dist/api/experimental-endpoints-api-generated.d.ts +0 -61
- package/dist/api/experimental-endpoints-api-generated.js +0 -89
- package/dist/api/options-api-generated.d.ts +4 -4
- package/dist/api/options-api-generated.js +4 -4
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/operationParameterMap.js +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.194)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -20,6 +20,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
20
20
|
- [Reference](#reference)
|
|
21
21
|
* [`snaptrade.accountInformation.getAccountActivities`](#snaptradeaccountinformationgetaccountactivities)
|
|
22
22
|
* [`snaptrade.accountInformation.getAccountBalanceHistory`](#snaptradeaccountinformationgetaccountbalancehistory)
|
|
23
|
+
* [`snaptrade.accountInformation.getAllAccountPositions`](#snaptradeaccountinformationgetallaccountpositions)
|
|
23
24
|
* [`snaptrade.accountInformation.getAllUserHoldings`](#snaptradeaccountinformationgetalluserholdings)
|
|
24
25
|
* [`snaptrade.accountInformation.getUserAccountBalance`](#snaptradeaccountinformationgetuseraccountbalance)
|
|
25
26
|
* [`snaptrade.accountInformation.getUserAccountDetails`](#snaptradeaccountinformationgetuseraccountdetails)
|
|
@@ -46,7 +47,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
46
47
|
* [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
|
|
47
48
|
* [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
|
|
48
49
|
* [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
|
|
49
|
-
* [`snaptrade.experimentalEndpoints.getAllAccountPositions`](#snaptradeexperimentalendpointsgetallaccountpositions)
|
|
50
50
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
|
|
51
51
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
|
|
52
52
|
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
|
|
@@ -303,6 +303,49 @@ const getAccountBalanceHistoryResponse =
|
|
|
303
303
|
---
|
|
304
304
|
|
|
305
305
|
|
|
306
|
+
### `snaptrade.accountInformation.getAllAccountPositions`<a id="snaptradeaccountinformationgetallaccountpositions"></a>
|
|
307
|
+
|
|
308
|
+
Returns a list of all positions in the specified account.
|
|
309
|
+
|
|
310
|
+
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
311
|
+
|
|
312
|
+
Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
|
|
313
|
+
|
|
314
|
+
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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
const getAllAccountPositionsResponse =
|
|
321
|
+
await snaptrade.accountInformation.getAllAccountPositions({
|
|
322
|
+
userId: "snaptrade-user-123",
|
|
323
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
324
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
325
|
+
});
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
329
|
+
|
|
330
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
331
|
+
|
|
332
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
333
|
+
|
|
334
|
+
##### accountId: `string`<a id="accountid-string"></a>
|
|
335
|
+
|
|
336
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
337
|
+
|
|
338
|
+
[AllAccountPositionsResponse](./models/all-account-positions-response.ts)
|
|
339
|
+
|
|
340
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
341
|
+
|
|
342
|
+
`/accounts/{accountId}/positions/all` `GET`
|
|
343
|
+
|
|
344
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
|
|
306
349
|
### `snaptrade.accountInformation.getAllUserHoldings`<a id="snaptradeaccountinformationgetalluserholdings"></a>
|
|
307
350
|

|
|
308
351
|
|
|
@@ -539,6 +582,8 @@ Number of days in the past to fetch the most recent orders. Defaults to the last
|
|
|
539
582
|
|
|
540
583
|
Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
|
541
584
|
|
|
585
|
+
Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
|
|
586
|
+
|
|
542
587
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
543
588
|
- If you do, this endpoint returns real-time data.
|
|
544
589
|
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
@@ -1120,7 +1165,7 @@ const disableBrokerageAuthorizationResponse =
|
|
|
1120
1165
|
|
|
1121
1166
|
Returns all brokerage accounts that belong to the specified connection for the authenticated user.
|
|
1122
1167
|
|
|
1123
|
-
On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
|
|
1168
|
+
On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
|
|
1124
1169
|
|
|
1125
1170
|
On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1126
1171
|
|
|
@@ -1352,49 +1397,6 @@ Optional comma separated list of session IDs used to filter the request on speci
|
|
|
1352
1397
|
---
|
|
1353
1398
|
|
|
1354
1399
|
|
|
1355
|
-
### `snaptrade.experimentalEndpoints.getAllAccountPositions`<a id="snaptradeexperimentalendpointsgetallaccountpositions"></a>
|
|
1356
|
-
|
|
1357
|
-
Returns a list of all positions in the specified account.
|
|
1358
|
-
|
|
1359
|
-
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
1360
|
-
|
|
1361
|
-
Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
|
|
1362
|
-
|
|
1363
|
-
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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1367
|
-
|
|
1368
|
-
```typescript
|
|
1369
|
-
const getAllAccountPositionsResponse =
|
|
1370
|
-
await snaptrade.experimentalEndpoints.getAllAccountPositions({
|
|
1371
|
-
userId: "snaptrade-user-123",
|
|
1372
|
-
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1373
|
-
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1374
|
-
});
|
|
1375
|
-
```
|
|
1376
|
-
|
|
1377
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1378
|
-
|
|
1379
|
-
##### userId: `string`<a id="userid-string"></a>
|
|
1380
|
-
|
|
1381
|
-
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1382
|
-
|
|
1383
|
-
##### accountId: `string`<a id="accountid-string"></a>
|
|
1384
|
-
|
|
1385
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1386
|
-
|
|
1387
|
-
[AllAccountPositionsResponse](./models/all-account-positions-response.ts)
|
|
1388
|
-
|
|
1389
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1390
|
-
|
|
1391
|
-
`/accounts/{accountId}/positions/all` `GET`
|
|
1392
|
-
|
|
1393
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1394
|
-
|
|
1395
|
-
---
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
1400
|
### `snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`<a id="snaptradeexperimentalendpointsgetuseraccountorderdetailv2"></a>
|
|
1399
1401
|
|
|
1400
1402
|
Returns the detail of a single order using the brokerage order ID provided as a path parameter.
|
|
@@ -1579,6 +1581,8 @@ const syncBrokerageAuthorizationTransactionsResponse =
|
|
|
1579
1581
|
|
|
1580
1582
|
Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
|
|
1581
1583
|
|
|
1584
|
+
Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
|
|
1585
|
+
|
|
1582
1586
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1583
1587
|
- If you do, this endpoint returns real-time data.
|
|
1584
1588
|
- If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
@@ -7,6 +7,7 @@ import { AccountHoldingsAccount } from '../models';
|
|
|
7
7
|
import { AccountInformationGetUserAccountOrderDetailRequest } from '../models';
|
|
8
8
|
import { AccountOrderRecord } from '../models';
|
|
9
9
|
import { AccountValueHistoryResponse } from '../models';
|
|
10
|
+
import { AllAccountPositionsResponse } from '../models';
|
|
10
11
|
import { Balance } from '../models';
|
|
11
12
|
import { PaginatedUniversalActivity } from '../models';
|
|
12
13
|
import { Position } from '../models';
|
|
@@ -42,6 +43,16 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
42
43
|
* @throws {RequiredError}
|
|
43
44
|
*/
|
|
44
45
|
getAccountBalanceHistory: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
48
|
+
* @summary List all account positions
|
|
49
|
+
* @param {string} userId
|
|
50
|
+
* @param {string} userSecret
|
|
51
|
+
* @param {string} accountId
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
getAllAccountPositions: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
45
56
|
/**
|
|
46
57
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
47
58
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -97,7 +108,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
97
108
|
*/
|
|
98
109
|
getUserAccountOrders: (userId: string, userSecret: string, accountId: string, state?: 'all' | 'open' | 'executed', days?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
99
110
|
/**
|
|
100
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
111
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
101
112
|
* @summary List account positions
|
|
102
113
|
* @param {string} userId
|
|
103
114
|
* @param {string} userSecret
|
|
@@ -180,6 +191,14 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
180
191
|
* @throws {RequiredError}
|
|
181
192
|
*/
|
|
182
193
|
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountValueHistoryResponse>>;
|
|
194
|
+
/**
|
|
195
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
196
|
+
* @summary List all account positions
|
|
197
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
198
|
+
* @param {*} [options] Override http request option.
|
|
199
|
+
* @throws {RequiredError}
|
|
200
|
+
*/
|
|
201
|
+
getAllAccountPositions(requestParameters: AccountInformationApiGetAllAccountPositionsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AllAccountPositionsResponse>>;
|
|
183
202
|
/**
|
|
184
203
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
185
204
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -222,7 +241,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
222
241
|
*/
|
|
223
242
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AccountOrderRecord>>>;
|
|
224
243
|
/**
|
|
225
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
244
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
226
245
|
* @summary List account positions
|
|
227
246
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
228
247
|
* @param {*} [options] Override http request option.
|
|
@@ -292,6 +311,14 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
292
311
|
* @throws {RequiredError}
|
|
293
312
|
*/
|
|
294
313
|
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): AxiosPromise<AccountValueHistoryResponse>;
|
|
314
|
+
/**
|
|
315
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
316
|
+
* @summary List all account positions
|
|
317
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
*/
|
|
321
|
+
getAllAccountPositions(requestParameters: AccountInformationApiGetAllAccountPositionsRequest, options?: AxiosRequestConfig): AxiosPromise<AllAccountPositionsResponse>;
|
|
295
322
|
/**
|
|
296
323
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
297
324
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -334,7 +361,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
334
361
|
*/
|
|
335
362
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<Array<AccountOrderRecord>>;
|
|
336
363
|
/**
|
|
337
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
364
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
338
365
|
* @summary List account positions
|
|
339
366
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
340
367
|
* @param {*} [options] Override http request option.
|
|
@@ -463,6 +490,31 @@ export type AccountInformationApiGetAccountBalanceHistoryRequest = {
|
|
|
463
490
|
*/
|
|
464
491
|
readonly accountId: string;
|
|
465
492
|
};
|
|
493
|
+
/**
|
|
494
|
+
* Request parameters for getAllAccountPositions operation in AccountInformationApi.
|
|
495
|
+
* @export
|
|
496
|
+
* @interface AccountInformationApiGetAllAccountPositionsRequest
|
|
497
|
+
*/
|
|
498
|
+
export type AccountInformationApiGetAllAccountPositionsRequest = {
|
|
499
|
+
/**
|
|
500
|
+
*
|
|
501
|
+
* @type {string}
|
|
502
|
+
* @memberof AccountInformationApiGetAllAccountPositions
|
|
503
|
+
*/
|
|
504
|
+
readonly userId: string;
|
|
505
|
+
/**
|
|
506
|
+
*
|
|
507
|
+
* @type {string}
|
|
508
|
+
* @memberof AccountInformationApiGetAllAccountPositions
|
|
509
|
+
*/
|
|
510
|
+
readonly userSecret: string;
|
|
511
|
+
/**
|
|
512
|
+
*
|
|
513
|
+
* @type {string}
|
|
514
|
+
* @memberof AccountInformationApiGetAllAccountPositions
|
|
515
|
+
*/
|
|
516
|
+
readonly accountId: string;
|
|
517
|
+
};
|
|
466
518
|
/**
|
|
467
519
|
* Request parameters for getAllUserHoldings operation in AccountInformationApi.
|
|
468
520
|
* @export
|
|
@@ -781,6 +833,15 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
781
833
|
* @memberof AccountInformationApiGenerated
|
|
782
834
|
*/
|
|
783
835
|
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountValueHistoryResponse, any, {}>>;
|
|
836
|
+
/**
|
|
837
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
838
|
+
* @summary List all account positions
|
|
839
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
840
|
+
* @param {*} [options] Override http request option.
|
|
841
|
+
* @throws {RequiredError}
|
|
842
|
+
* @memberof AccountInformationApiGenerated
|
|
843
|
+
*/
|
|
844
|
+
getAllAccountPositions(requestParameters: AccountInformationApiGetAllAccountPositionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AllAccountPositionsResponse, any, {}>>;
|
|
784
845
|
/**
|
|
785
846
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
786
847
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -828,7 +889,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
828
889
|
*/
|
|
829
890
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord[], any, {}>>;
|
|
830
891
|
/**
|
|
831
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
892
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
832
893
|
* @summary List account positions
|
|
833
894
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
834
895
|
* @param {*} [options] Override http request option.
|
|
@@ -169,6 +169,61 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
169
169
|
options: localVarRequestOptions,
|
|
170
170
|
};
|
|
171
171
|
}),
|
|
172
|
+
/**
|
|
173
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
174
|
+
* @summary List all account positions
|
|
175
|
+
* @param {string} userId
|
|
176
|
+
* @param {string} userSecret
|
|
177
|
+
* @param {string} accountId
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
getAllAccountPositions: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
// verify required parameter 'userId' is not null or undefined
|
|
183
|
+
(0, common_1.assertParamExists)('getAllAccountPositions', 'userId', userId);
|
|
184
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
185
|
+
(0, common_1.assertParamExists)('getAllAccountPositions', 'userSecret', userSecret);
|
|
186
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
187
|
+
(0, common_1.assertParamExists)('getAllAccountPositions', 'accountId', accountId);
|
|
188
|
+
const localVarPath = `/accounts/{accountId}/positions/all`
|
|
189
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
190
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
191
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
192
|
+
let baseOptions;
|
|
193
|
+
if (configuration) {
|
|
194
|
+
baseOptions = configuration.baseOptions;
|
|
195
|
+
}
|
|
196
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
197
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
198
|
+
const localVarQueryParameter = {};
|
|
199
|
+
// authentication PartnerClientId required
|
|
200
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
201
|
+
// authentication PartnerSignature required
|
|
202
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
203
|
+
// authentication PartnerTimestamp required
|
|
204
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
205
|
+
if (userId !== undefined) {
|
|
206
|
+
localVarQueryParameter['userId'] = userId;
|
|
207
|
+
}
|
|
208
|
+
if (userSecret !== undefined) {
|
|
209
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
210
|
+
}
|
|
211
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
212
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
213
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
214
|
+
queryParameters: localVarQueryParameter,
|
|
215
|
+
requestConfig: localVarRequestOptions,
|
|
216
|
+
path: localVarPath,
|
|
217
|
+
configuration,
|
|
218
|
+
pathTemplate: '/accounts/{accountId}/positions/all',
|
|
219
|
+
httpMethod: 'GET'
|
|
220
|
+
});
|
|
221
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
222
|
+
return {
|
|
223
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
224
|
+
options: localVarRequestOptions,
|
|
225
|
+
};
|
|
226
|
+
}),
|
|
172
227
|
/**
|
|
173
228
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
174
229
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -460,7 +515,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
460
515
|
};
|
|
461
516
|
}),
|
|
462
517
|
/**
|
|
463
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
518
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
464
519
|
* @summary List account positions
|
|
465
520
|
* @param {string} userId
|
|
466
521
|
* @param {string} userSecret
|
|
@@ -830,6 +885,19 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
830
885
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
831
886
|
});
|
|
832
887
|
},
|
|
888
|
+
/**
|
|
889
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
890
|
+
* @summary List all account positions
|
|
891
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
892
|
+
* @param {*} [options] Override http request option.
|
|
893
|
+
* @throws {RequiredError}
|
|
894
|
+
*/
|
|
895
|
+
getAllAccountPositions(requestParameters, options) {
|
|
896
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
897
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
|
|
898
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
899
|
+
});
|
|
900
|
+
},
|
|
833
901
|
/**
|
|
834
902
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
835
903
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -900,7 +968,7 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
900
968
|
});
|
|
901
969
|
},
|
|
902
970
|
/**
|
|
903
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
971
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
904
972
|
* @summary List account positions
|
|
905
973
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
906
974
|
* @param {*} [options] Override http request option.
|
|
@@ -1008,6 +1076,16 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
1008
1076
|
getAccountBalanceHistory(requestParameters, options) {
|
|
1009
1077
|
return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios, basePath));
|
|
1010
1078
|
},
|
|
1079
|
+
/**
|
|
1080
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1081
|
+
* @summary List all account positions
|
|
1082
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
1083
|
+
* @param {*} [options] Override http request option.
|
|
1084
|
+
* @throws {RequiredError}
|
|
1085
|
+
*/
|
|
1086
|
+
getAllAccountPositions(requestParameters, options) {
|
|
1087
|
+
return localVarFp.getAllAccountPositions(requestParameters, options).then((request) => request(axios, basePath));
|
|
1088
|
+
},
|
|
1011
1089
|
/**
|
|
1012
1090
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
1013
1091
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -1060,7 +1138,7 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
1060
1138
|
return localVarFp.getUserAccountOrders(requestParameters, options).then((request) => request(axios, basePath));
|
|
1061
1139
|
},
|
|
1062
1140
|
/**
|
|
1063
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1141
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1064
1142
|
* @summary List account positions
|
|
1065
1143
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
1066
1144
|
* @param {*} [options] Override http request option.
|
|
@@ -1152,6 +1230,17 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1152
1230
|
getAccountBalanceHistory(requestParameters, options) {
|
|
1153
1231
|
return (0, exports.AccountInformationApiFp)(this.configuration).getAccountBalanceHistory(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1154
1232
|
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1235
|
+
* @summary List all account positions
|
|
1236
|
+
* @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
1237
|
+
* @param {*} [options] Override http request option.
|
|
1238
|
+
* @throws {RequiredError}
|
|
1239
|
+
* @memberof AccountInformationApiGenerated
|
|
1240
|
+
*/
|
|
1241
|
+
getAllAccountPositions(requestParameters, options) {
|
|
1242
|
+
return (0, exports.AccountInformationApiFp)(this.configuration).getAllAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1243
|
+
}
|
|
1155
1244
|
/**
|
|
1156
1245
|
* **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
|
|
1157
1246
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -1209,7 +1298,7 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1209
1298
|
return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1210
1299
|
}
|
|
1211
1300
|
/**
|
|
1212
|
-
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1301
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1213
1302
|
* @summary List account positions
|
|
1214
1303
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
1215
1304
|
* @param {*} [options] Override http request option.
|
|
@@ -44,7 +44,7 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
44
44
|
*/
|
|
45
45
|
disableBrokerageAuthorization: (authorizationId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
46
|
/**
|
|
47
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
47
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
48
48
|
* @summary List accounts for a connection
|
|
49
49
|
* @param {string} authorizationId
|
|
50
50
|
* @param {string} userId
|
|
@@ -134,7 +134,7 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
|
134
134
|
*/
|
|
135
135
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BrokerageAuthorizationDisabledConfirmation>>;
|
|
136
136
|
/**
|
|
137
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
137
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
138
138
|
* @summary List accounts for a connection
|
|
139
139
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
140
140
|
* @param {*} [options] Override http request option.
|
|
@@ -212,7 +212,7 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
212
212
|
*/
|
|
213
213
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise<BrokerageAuthorizationDisabledConfirmation>;
|
|
214
214
|
/**
|
|
215
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
215
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
216
216
|
* @summary List accounts for a connection
|
|
217
217
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
218
218
|
* @param {*} [options] Override http request option.
|
|
@@ -520,7 +520,7 @@ export declare class ConnectionsApiGenerated extends BaseAPI {
|
|
|
520
520
|
*/
|
|
521
521
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageAuthorizationDisabledConfirmation, any, {}>>;
|
|
522
522
|
/**
|
|
523
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
523
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
524
524
|
* @summary List accounts for a connection
|
|
525
525
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
526
526
|
* @param {*} [options] Override http request option.
|
|
@@ -201,7 +201,7 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
201
201
|
};
|
|
202
202
|
}),
|
|
203
203
|
/**
|
|
204
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
204
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
205
205
|
* @summary List accounts for a connection
|
|
206
206
|
* @param {string} authorizationId
|
|
207
207
|
* @param {string} userId
|
|
@@ -578,7 +578,7 @@ const ConnectionsApiFp = function (configuration) {
|
|
|
578
578
|
});
|
|
579
579
|
},
|
|
580
580
|
/**
|
|
581
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
581
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
582
582
|
* @summary List accounts for a connection
|
|
583
583
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
584
584
|
* @param {*} [options] Override http request option.
|
|
@@ -696,7 +696,7 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
696
696
|
return localVarFp.disableBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
|
|
697
697
|
},
|
|
698
698
|
/**
|
|
699
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
699
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
700
700
|
* @summary List accounts for a connection
|
|
701
701
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
702
702
|
* @param {*} [options] Override http request option.
|
|
@@ -799,7 +799,7 @@ class ConnectionsApiGenerated extends base_1.BaseAPI {
|
|
|
799
799
|
return (0, exports.ConnectionsApiFp)(this.configuration).disableBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
800
800
|
}
|
|
801
801
|
/**
|
|
802
|
-
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call.
|
|
802
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
803
803
|
* @summary List accounts for a connection
|
|
804
804
|
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
805
805
|
* @param {*} [options] Override http request option.
|