snaptrade-typescript-sdk 9.0.190 → 9.0.191
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 +41 -51
- package/dist/api/account-information-api-generated.d.ts +61 -0
- package/dist/api/account-information-api-generated.js +89 -0
- package/dist/api/experimental-endpoints-api-generated.d.ts +5 -80
- package/dist/api/experimental-endpoints-api-generated.js +6 -103
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/adr-instrument.d.ts +59 -0
- package/dist/models/adr-instrument.js +2 -0
- package/dist/models/all-account-positions-response.d.ts +2 -20
- package/dist/models/cef-instrument.d.ts +59 -0
- package/dist/models/cef-instrument.js +2 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/instrument.d.ts +9 -0
- package/dist/models/mutual-fund-instrument.d.ts +59 -0
- package/dist/models/mutual-fund-instrument.js +2 -0
- package/dist/models/underlying-option-instrument.d.ts +9 -0
- package/dist/operationParameterMap.js +13 -19
- 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.191)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -19,6 +19,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
19
19
|
- [Getting Started](#getting-started)
|
|
20
20
|
- [Reference](#reference)
|
|
21
21
|
* [`snaptrade.accountInformation.getAccountActivities`](#snaptradeaccountinformationgetaccountactivities)
|
|
22
|
+
* [`snaptrade.accountInformation.getAccountBalanceHistory`](#snaptradeaccountinformationgetaccountbalancehistory)
|
|
22
23
|
* [`snaptrade.accountInformation.getAllUserHoldings`](#snaptradeaccountinformationgetalluserholdings)
|
|
23
24
|
* [`snaptrade.accountInformation.getUserAccountBalance`](#snaptradeaccountinformationgetuseraccountbalance)
|
|
24
25
|
* [`snaptrade.accountInformation.getUserAccountDetails`](#snaptradeaccountinformationgetuseraccountdetails)
|
|
@@ -44,7 +45,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
44
45
|
* [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
|
|
45
46
|
* [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
|
|
46
47
|
* [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
|
|
47
|
-
* [`snaptrade.experimentalEndpoints.getAccountBalanceHistory`](#snaptradeexperimentalendpointsgetaccountbalancehistory)
|
|
48
48
|
* [`snaptrade.experimentalEndpoints.getAllAccountPositions`](#snaptradeexperimentalendpointsgetallaccountpositions)
|
|
49
49
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
|
|
50
50
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
|
|
@@ -265,6 +265,43 @@ Optional comma separated list of transaction types to filter by. SnapTrade does
|
|
|
265
265
|
---
|
|
266
266
|
|
|
267
267
|
|
|
268
|
+
### `snaptrade.accountInformation.getAccountBalanceHistory`<a id="snaptradeaccountinformationgetaccountbalancehistory"></a>
|
|
269
|
+
|
|
270
|
+
An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
const getAccountBalanceHistoryResponse =
|
|
277
|
+
await snaptrade.accountInformation.getAccountBalanceHistory({
|
|
278
|
+
userId: "snaptrade-user-123",
|
|
279
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
280
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
281
|
+
});
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
285
|
+
|
|
286
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
287
|
+
|
|
288
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
289
|
+
|
|
290
|
+
##### accountId: `string`<a id="accountid-string"></a>
|
|
291
|
+
|
|
292
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
293
|
+
|
|
294
|
+
[AccountValueHistoryResponse](./models/account-value-history-response.ts)
|
|
295
|
+
|
|
296
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
297
|
+
|
|
298
|
+
`/accounts/{accountId}/balanceHistory` `GET`
|
|
299
|
+
|
|
300
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
|
|
268
305
|
### `snaptrade.accountInformation.getAllUserHoldings`<a id="snaptradeaccountinformationgetalluserholdings"></a>
|
|
269
306
|

|
|
270
307
|
|
|
@@ -1272,48 +1309,11 @@ Optional comma separated list of session IDs used to filter the request on speci
|
|
|
1272
1309
|
---
|
|
1273
1310
|
|
|
1274
1311
|
|
|
1275
|
-
### `snaptrade.experimentalEndpoints.getAccountBalanceHistory`<a id="snaptradeexperimentalendpointsgetaccountbalancehistory"></a>
|
|
1276
|
-
|
|
1277
|
-
An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and only available for certain brokerages with a maximum lookback of 1 year.
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1281
|
-
|
|
1282
|
-
```typescript
|
|
1283
|
-
const getAccountBalanceHistoryResponse =
|
|
1284
|
-
await snaptrade.experimentalEndpoints.getAccountBalanceHistory({
|
|
1285
|
-
userId: "snaptrade-user-123",
|
|
1286
|
-
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1287
|
-
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1288
|
-
});
|
|
1289
|
-
```
|
|
1290
|
-
|
|
1291
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1292
|
-
|
|
1293
|
-
##### userId: `string`<a id="userid-string"></a>
|
|
1294
|
-
|
|
1295
|
-
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1296
|
-
|
|
1297
|
-
##### accountId: `string`<a id="accountid-string"></a>
|
|
1298
|
-
|
|
1299
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1300
|
-
|
|
1301
|
-
[AccountValueHistoryResponse](./models/account-value-history-response.ts)
|
|
1302
|
-
|
|
1303
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1304
|
-
|
|
1305
|
-
`/accounts/{accountId}/balanceHistory` `GET`
|
|
1306
|
-
|
|
1307
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1308
|
-
|
|
1309
|
-
---
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
1312
|
### `snaptrade.experimentalEndpoints.getAllAccountPositions`<a id="snaptradeexperimentalendpointsgetallaccountpositions"></a>
|
|
1313
1313
|
|
|
1314
|
-
Returns a
|
|
1314
|
+
Returns a list of all positions in the specified account.
|
|
1315
1315
|
|
|
1316
|
-
The `results` list can contain multiple instrument types in the same response
|
|
1316
|
+
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`.
|
|
1317
1317
|
|
|
1318
1318
|
Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
|
|
1319
1319
|
|
|
@@ -1328,8 +1328,6 @@ const getAllAccountPositionsResponse =
|
|
|
1328
1328
|
userId: "snaptrade-user-123",
|
|
1329
1329
|
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1330
1330
|
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1331
|
-
page: 1,
|
|
1332
|
-
pageSize: 100,
|
|
1333
1331
|
});
|
|
1334
1332
|
```
|
|
1335
1333
|
|
|
@@ -1341,14 +1339,6 @@ const getAllAccountPositionsResponse =
|
|
|
1341
1339
|
|
|
1342
1340
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
1343
1341
|
|
|
1344
|
-
##### page: `number`<a id="page-number"></a>
|
|
1345
|
-
|
|
1346
|
-
The page number to return. Defaults to 1.
|
|
1347
|
-
|
|
1348
|
-
##### pageSize: `number`<a id="pagesize-number"></a>
|
|
1349
|
-
|
|
1350
|
-
The number of positions to return per page. Defaults to 100 with a maximum of 1000.
|
|
1351
|
-
|
|
1352
1342
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1353
1343
|
|
|
1354
1344
|
[AllAccountPositionsResponse](./models/all-account-positions-response.ts)
|
|
@@ -6,6 +6,7 @@ import { AccountHoldings } from '../models';
|
|
|
6
6
|
import { AccountHoldingsAccount } from '../models';
|
|
7
7
|
import { AccountInformationGetUserAccountOrderDetailRequest } from '../models';
|
|
8
8
|
import { AccountOrderRecord } from '../models';
|
|
9
|
+
import { AccountValueHistoryResponse } from '../models';
|
|
9
10
|
import { Balance } from '../models';
|
|
10
11
|
import { PaginatedUniversalActivity } from '../models';
|
|
11
12
|
import { Position } from '../models';
|
|
@@ -31,6 +32,16 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
31
32
|
* @throws {RequiredError}
|
|
32
33
|
*/
|
|
33
34
|
getAccountActivities: (accountId: string, userId: string, userSecret: string, startDate?: string | Date, endDate?: string | Date, offset?: number, limit?: number, type?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
|
+
/**
|
|
36
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
37
|
+
* @summary List historical account total value
|
|
38
|
+
* @param {string} userId
|
|
39
|
+
* @param {string} userSecret
|
|
40
|
+
* @param {string} accountId
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
getAccountBalanceHistory: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
45
|
/**
|
|
35
46
|
* **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.
|
|
36
47
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -160,6 +171,14 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
160
171
|
* @throws {RequiredError}
|
|
161
172
|
*/
|
|
162
173
|
getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedUniversalActivity>>;
|
|
174
|
+
/**
|
|
175
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
176
|
+
* @summary List historical account total value
|
|
177
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountValueHistoryResponse>>;
|
|
163
182
|
/**
|
|
164
183
|
* **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.
|
|
165
184
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -263,6 +282,14 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
263
282
|
* @throws {RequiredError}
|
|
264
283
|
*/
|
|
265
284
|
getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<PaginatedUniversalActivity>;
|
|
285
|
+
/**
|
|
286
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
287
|
+
* @summary List historical account total value
|
|
288
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
289
|
+
* @param {*} [options] Override http request option.
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
*/
|
|
292
|
+
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): AxiosPromise<AccountValueHistoryResponse>;
|
|
266
293
|
/**
|
|
267
294
|
* **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.
|
|
268
295
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -408,6 +435,31 @@ export type AccountInformationApiGetAccountActivitiesRequest = {
|
|
|
408
435
|
*/
|
|
409
436
|
readonly type?: string;
|
|
410
437
|
};
|
|
438
|
+
/**
|
|
439
|
+
* Request parameters for getAccountBalanceHistory operation in AccountInformationApi.
|
|
440
|
+
* @export
|
|
441
|
+
* @interface AccountInformationApiGetAccountBalanceHistoryRequest
|
|
442
|
+
*/
|
|
443
|
+
export type AccountInformationApiGetAccountBalanceHistoryRequest = {
|
|
444
|
+
/**
|
|
445
|
+
*
|
|
446
|
+
* @type {string}
|
|
447
|
+
* @memberof AccountInformationApiGetAccountBalanceHistory
|
|
448
|
+
*/
|
|
449
|
+
readonly userId: string;
|
|
450
|
+
/**
|
|
451
|
+
*
|
|
452
|
+
* @type {string}
|
|
453
|
+
* @memberof AccountInformationApiGetAccountBalanceHistory
|
|
454
|
+
*/
|
|
455
|
+
readonly userSecret: string;
|
|
456
|
+
/**
|
|
457
|
+
*
|
|
458
|
+
* @type {string}
|
|
459
|
+
* @memberof AccountInformationApiGetAccountBalanceHistory
|
|
460
|
+
*/
|
|
461
|
+
readonly accountId: string;
|
|
462
|
+
};
|
|
411
463
|
/**
|
|
412
464
|
* Request parameters for getAllUserHoldings operation in AccountInformationApi.
|
|
413
465
|
* @export
|
|
@@ -717,6 +769,15 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
717
769
|
* @memberof AccountInformationApiGenerated
|
|
718
770
|
*/
|
|
719
771
|
getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PaginatedUniversalActivity, any, {}>>;
|
|
772
|
+
/**
|
|
773
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
774
|
+
* @summary List historical account total value
|
|
775
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
* @memberof AccountInformationApiGenerated
|
|
779
|
+
*/
|
|
780
|
+
getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountValueHistoryResponse, any, {}>>;
|
|
720
781
|
/**
|
|
721
782
|
* **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.
|
|
722
783
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -114,6 +114,61 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
114
114
|
options: localVarRequestOptions,
|
|
115
115
|
};
|
|
116
116
|
}),
|
|
117
|
+
/**
|
|
118
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
119
|
+
* @summary List historical account total value
|
|
120
|
+
* @param {string} userId
|
|
121
|
+
* @param {string} userSecret
|
|
122
|
+
* @param {string} accountId
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
*/
|
|
126
|
+
getAccountBalanceHistory: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
// verify required parameter 'userId' is not null or undefined
|
|
128
|
+
(0, common_1.assertParamExists)('getAccountBalanceHistory', 'userId', userId);
|
|
129
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
130
|
+
(0, common_1.assertParamExists)('getAccountBalanceHistory', 'userSecret', userSecret);
|
|
131
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
132
|
+
(0, common_1.assertParamExists)('getAccountBalanceHistory', 'accountId', accountId);
|
|
133
|
+
const localVarPath = `/accounts/{accountId}/balanceHistory`
|
|
134
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
136
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
137
|
+
let baseOptions;
|
|
138
|
+
if (configuration) {
|
|
139
|
+
baseOptions = configuration.baseOptions;
|
|
140
|
+
}
|
|
141
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
142
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
143
|
+
const localVarQueryParameter = {};
|
|
144
|
+
// authentication PartnerClientId required
|
|
145
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
146
|
+
// authentication PartnerSignature required
|
|
147
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
148
|
+
// authentication PartnerTimestamp required
|
|
149
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
150
|
+
if (userId !== undefined) {
|
|
151
|
+
localVarQueryParameter['userId'] = userId;
|
|
152
|
+
}
|
|
153
|
+
if (userSecret !== undefined) {
|
|
154
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
155
|
+
}
|
|
156
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
157
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
158
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
159
|
+
queryParameters: localVarQueryParameter,
|
|
160
|
+
requestConfig: localVarRequestOptions,
|
|
161
|
+
path: localVarPath,
|
|
162
|
+
configuration,
|
|
163
|
+
pathTemplate: '/accounts/{accountId}/balanceHistory',
|
|
164
|
+
httpMethod: 'GET'
|
|
165
|
+
});
|
|
166
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
167
|
+
return {
|
|
168
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
169
|
+
options: localVarRequestOptions,
|
|
170
|
+
};
|
|
171
|
+
}),
|
|
117
172
|
/**
|
|
118
173
|
* **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.
|
|
119
174
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -761,6 +816,19 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
761
816
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
762
817
|
});
|
|
763
818
|
},
|
|
819
|
+
/**
|
|
820
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
821
|
+
* @summary List historical account total value
|
|
822
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
823
|
+
* @param {*} [options] Override http request option.
|
|
824
|
+
* @throws {RequiredError}
|
|
825
|
+
*/
|
|
826
|
+
getAccountBalanceHistory(requestParameters, options) {
|
|
827
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
828
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountBalanceHistory(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
|
|
829
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
830
|
+
});
|
|
831
|
+
},
|
|
764
832
|
/**
|
|
765
833
|
* **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.
|
|
766
834
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -928,6 +996,16 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
928
996
|
getAccountActivities(requestParameters, options) {
|
|
929
997
|
return localVarFp.getAccountActivities(requestParameters, options).then((request) => request(axios, basePath));
|
|
930
998
|
},
|
|
999
|
+
/**
|
|
1000
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
1001
|
+
* @summary List historical account total value
|
|
1002
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
1003
|
+
* @param {*} [options] Override http request option.
|
|
1004
|
+
* @throws {RequiredError}
|
|
1005
|
+
*/
|
|
1006
|
+
getAccountBalanceHistory(requestParameters, options) {
|
|
1007
|
+
return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios, basePath));
|
|
1008
|
+
},
|
|
931
1009
|
/**
|
|
932
1010
|
* **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.
|
|
933
1011
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -1060,6 +1138,17 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1060
1138
|
getAccountActivities(requestParameters, options) {
|
|
1061
1139
|
return (0, exports.AccountInformationApiFp)(this.configuration).getAccountActivities(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1062
1140
|
}
|
|
1141
|
+
/**
|
|
1142
|
+
* An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
|
|
1143
|
+
* @summary List historical account total value
|
|
1144
|
+
* @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
1145
|
+
* @param {*} [options] Override http request option.
|
|
1146
|
+
* @throws {RequiredError}
|
|
1147
|
+
* @memberof AccountInformationApiGenerated
|
|
1148
|
+
*/
|
|
1149
|
+
getAccountBalanceHistory(requestParameters, options) {
|
|
1150
|
+
return (0, exports.AccountInformationApiFp)(this.configuration).getAccountBalanceHistory(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1151
|
+
}
|
|
1063
1152
|
/**
|
|
1064
1153
|
* **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.
|
|
1065
1154
|
* @summary List all accounts for the user, plus balances, positions, and orders for each account.
|
|
@@ -3,7 +3,6 @@ import { Configuration } from '../configuration';
|
|
|
3
3
|
import { RequestArgs, BaseAPI } from '../base';
|
|
4
4
|
import { AccountOrderRecordV2 } from '../models';
|
|
5
5
|
import { AccountOrdersV2Response } from '../models';
|
|
6
|
-
import { AccountValueHistoryResponse } from '../models';
|
|
7
6
|
import { AllAccountPositionsResponse } from '../models';
|
|
8
7
|
import { BrokerageAuthorizationTransactionsSyncConfirmation } from '../models';
|
|
9
8
|
/**
|
|
@@ -12,27 +11,15 @@ import { BrokerageAuthorizationTransactionsSyncConfirmation } from '../models';
|
|
|
12
11
|
*/
|
|
13
12
|
export declare const ExperimentalEndpointsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @summary List historical account total value
|
|
17
|
-
* @param {string} userId
|
|
18
|
-
* @param {string} userSecret
|
|
19
|
-
* @param {string} accountId
|
|
20
|
-
* @param {*} [options] Override http request option.
|
|
21
|
-
* @throws {RequiredError}
|
|
22
|
-
*/
|
|
23
|
-
getAccountBalanceHistory: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
24
|
-
/**
|
|
25
|
-
* Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, 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.
|
|
14
|
+
* 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.
|
|
26
15
|
* @summary List all account positions
|
|
27
16
|
* @param {string} userId
|
|
28
17
|
* @param {string} userSecret
|
|
29
18
|
* @param {string} accountId
|
|
30
|
-
* @param {number} [page] The page number to return. Defaults to 1.
|
|
31
|
-
* @param {number} [pageSize] The number of positions to return per page. Defaults to 100 with a maximum of 1000.
|
|
32
19
|
* @param {*} [options] Override http request option.
|
|
33
20
|
* @throws {RequiredError}
|
|
34
21
|
*/
|
|
35
|
-
getAllAccountPositions: (userId: string, userSecret: string, accountId: string,
|
|
22
|
+
getAllAccountPositions: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
23
|
/**
|
|
37
24
|
* Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
38
25
|
* @summary Get account order detail (V2)
|
|
@@ -84,15 +71,7 @@ export declare const ExperimentalEndpointsApiAxiosParamCreator: (configuration?:
|
|
|
84
71
|
*/
|
|
85
72
|
export declare const ExperimentalEndpointsApiFp: (configuration?: Configuration) => {
|
|
86
73
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @summary List historical account total value
|
|
89
|
-
* @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
90
|
-
* @param {*} [options] Override http request option.
|
|
91
|
-
* @throws {RequiredError}
|
|
92
|
-
*/
|
|
93
|
-
getAccountBalanceHistory(requestParameters: ExperimentalEndpointsApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountValueHistoryResponse>>;
|
|
94
|
-
/**
|
|
95
|
-
* Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, 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.
|
|
74
|
+
* 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.
|
|
96
75
|
* @summary List all account positions
|
|
97
76
|
* @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
98
77
|
* @param {*} [options] Override http request option.
|
|
@@ -138,15 +117,7 @@ export declare const ExperimentalEndpointsApiFp: (configuration?: Configuration)
|
|
|
138
117
|
*/
|
|
139
118
|
export declare const ExperimentalEndpointsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
140
119
|
/**
|
|
141
|
-
*
|
|
142
|
-
* @summary List historical account total value
|
|
143
|
-
* @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
144
|
-
* @param {*} [options] Override http request option.
|
|
145
|
-
* @throws {RequiredError}
|
|
146
|
-
*/
|
|
147
|
-
getAccountBalanceHistory(requestParameters: ExperimentalEndpointsApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): AxiosPromise<AccountValueHistoryResponse>;
|
|
148
|
-
/**
|
|
149
|
-
* Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, 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.
|
|
120
|
+
* 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.
|
|
150
121
|
* @summary List all account positions
|
|
151
122
|
* @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
152
123
|
* @param {*} [options] Override http request option.
|
|
@@ -186,31 +157,6 @@ export declare const ExperimentalEndpointsApiFactory: (configuration?: Configura
|
|
|
186
157
|
*/
|
|
187
158
|
syncBrokerageAuthorizationTransactions(requestParameters: ExperimentalEndpointsApiSyncBrokerageAuthorizationTransactionsRequest, options?: AxiosRequestConfig): AxiosPromise<BrokerageAuthorizationTransactionsSyncConfirmation>;
|
|
188
159
|
};
|
|
189
|
-
/**
|
|
190
|
-
* Request parameters for getAccountBalanceHistory operation in ExperimentalEndpointsApi.
|
|
191
|
-
* @export
|
|
192
|
-
* @interface ExperimentalEndpointsApiGetAccountBalanceHistoryRequest
|
|
193
|
-
*/
|
|
194
|
-
export type ExperimentalEndpointsApiGetAccountBalanceHistoryRequest = {
|
|
195
|
-
/**
|
|
196
|
-
*
|
|
197
|
-
* @type {string}
|
|
198
|
-
* @memberof ExperimentalEndpointsApiGetAccountBalanceHistory
|
|
199
|
-
*/
|
|
200
|
-
readonly userId: string;
|
|
201
|
-
/**
|
|
202
|
-
*
|
|
203
|
-
* @type {string}
|
|
204
|
-
* @memberof ExperimentalEndpointsApiGetAccountBalanceHistory
|
|
205
|
-
*/
|
|
206
|
-
readonly userSecret: string;
|
|
207
|
-
/**
|
|
208
|
-
*
|
|
209
|
-
* @type {string}
|
|
210
|
-
* @memberof ExperimentalEndpointsApiGetAccountBalanceHistory
|
|
211
|
-
*/
|
|
212
|
-
readonly accountId: string;
|
|
213
|
-
};
|
|
214
160
|
/**
|
|
215
161
|
* Request parameters for getAllAccountPositions operation in ExperimentalEndpointsApi.
|
|
216
162
|
* @export
|
|
@@ -235,18 +181,6 @@ export type ExperimentalEndpointsApiGetAllAccountPositionsRequest = {
|
|
|
235
181
|
* @memberof ExperimentalEndpointsApiGetAllAccountPositions
|
|
236
182
|
*/
|
|
237
183
|
readonly accountId: string;
|
|
238
|
-
/**
|
|
239
|
-
* The page number to return. Defaults to 1.
|
|
240
|
-
* @type {number}
|
|
241
|
-
* @memberof ExperimentalEndpointsApiGetAllAccountPositions
|
|
242
|
-
*/
|
|
243
|
-
readonly page?: number;
|
|
244
|
-
/**
|
|
245
|
-
* The number of positions to return per page. Defaults to 100 with a maximum of 1000.
|
|
246
|
-
* @type {number}
|
|
247
|
-
* @memberof ExperimentalEndpointsApiGetAllAccountPositions
|
|
248
|
-
*/
|
|
249
|
-
readonly pageSize?: number;
|
|
250
184
|
};
|
|
251
185
|
/**
|
|
252
186
|
* Request parameters for getUserAccountOrderDetailV2 operation in ExperimentalEndpointsApi.
|
|
@@ -380,16 +314,7 @@ export type ExperimentalEndpointsApiSyncBrokerageAuthorizationTransactionsReques
|
|
|
380
314
|
*/
|
|
381
315
|
export declare class ExperimentalEndpointsApiGenerated extends BaseAPI {
|
|
382
316
|
/**
|
|
383
|
-
*
|
|
384
|
-
* @summary List historical account total value
|
|
385
|
-
* @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
|
|
386
|
-
* @param {*} [options] Override http request option.
|
|
387
|
-
* @throws {RequiredError}
|
|
388
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
389
|
-
*/
|
|
390
|
-
getAccountBalanceHistory(requestParameters: ExperimentalEndpointsApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountValueHistoryResponse, any, {}>>;
|
|
391
|
-
/**
|
|
392
|
-
* Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, 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.
|
|
317
|
+
* 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.
|
|
393
318
|
* @summary List all account positions
|
|
394
319
|
* @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
|
|
395
320
|
* @param {*} [options] Override http request option.
|