snaptrade-typescript-sdk 12.2.21 → 12.2.22

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/dist/index.mjs CHANGED
@@ -467,6 +467,79 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
467
467
  };
468
468
  },
469
469
  /**
470
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
471
+ * @summary Get account details
472
+ * @param {string} accountId
473
+ * @param {string} [userId]
474
+ * @param {string} [userSecret]
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ getAccountDetails: async (accountId, userId, userSecret, options = {}) => {
479
+ assertParamExists("getAccountDetails", "accountId", accountId);
480
+ const localVarPath = `/accounts/{accountId}/details`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
481
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
482
+ let baseOptions;
483
+ if (configuration) baseOptions = configuration.baseOptions;
484
+ const localVarRequestOptions = {
485
+ method: "GET",
486
+ ...baseOptions,
487
+ ...options
488
+ };
489
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
490
+ const localVarQueryParameter = {};
491
+ if (configuration?.authMode === "commercialApiKey") {
492
+ await setApiKeyToObject({
493
+ object: localVarQueryParameter,
494
+ key: "clientId",
495
+ keyParamName: "clientId",
496
+ configuration
497
+ });
498
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
499
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
500
+ }
501
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
502
+ object: localVarQueryParameter,
503
+ key: "clientId",
504
+ keyParamName: "clientId",
505
+ configuration
506
+ });
507
+ const localVarOperationAuth = {
508
+ authModes: ["commercialApiKey", "personalApiKey"],
509
+ requestSigningByAuthMode: {
510
+ "commercialApiKey": {
511
+ secretParameter: "consumerKey",
512
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
513
+ },
514
+ "personalApiKey": {
515
+ secretParameter: "consumerKey",
516
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
517
+ }
518
+ },
519
+ selectedAuthMode: configuration?.authMode
520
+ };
521
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
522
+ localVarRequestOptions.headers = {
523
+ ...localVarHeaderParameter,
524
+ ...headersFromBaseOptions,
525
+ ...options.headers
526
+ };
527
+ requestBeforeHook({
528
+ queryParameters: localVarQueryParameter,
529
+ requestConfig: localVarRequestOptions,
530
+ path: localVarPath,
531
+ configuration,
532
+ pathTemplate: "/accounts/{accountId}/details",
533
+ httpMethod: "GET",
534
+ operationAuth: localVarOperationAuth
535
+ });
536
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
537
+ return {
538
+ url: toPathString(localVarUrlObj),
539
+ options: localVarRequestOptions
540
+ };
541
+ },
542
+ /**
470
543
  * 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, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
471
544
  * @summary List all account positions
472
545
  * @param {string} accountId
@@ -613,12 +686,13 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
613
686
  };
614
687
  },
615
688
  /**
616
- * Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
689
+ * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
617
690
  * @summary Get account detail
618
691
  * @param {string} accountId
619
692
  * @param {string} [userId]
620
693
  * @param {string} [userSecret]
621
694
  * @param {*} [options] Override http request option.
695
+ * @deprecated
622
696
  * @throws {RequiredError}
623
697
  */
624
698
  getUserAccountDetails: async (accountId, userId, userSecret, options = {}) => {
@@ -1065,11 +1139,83 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
1065
1139
  };
1066
1140
  },
1067
1141
  /**
1068
- * Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1142
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1143
+ * @summary List all user accounts
1144
+ * @param {string} [userId]
1145
+ * @param {string} [userSecret]
1146
+ * @param {*} [options] Override http request option.
1147
+ * @throws {RequiredError}
1148
+ */
1149
+ listAllUserAccounts: async (userId, userSecret, options = {}) => {
1150
+ const localVarPath = `/accounts/all`;
1151
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1152
+ let baseOptions;
1153
+ if (configuration) baseOptions = configuration.baseOptions;
1154
+ const localVarRequestOptions = {
1155
+ method: "GET",
1156
+ ...baseOptions,
1157
+ ...options
1158
+ };
1159
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
1160
+ const localVarQueryParameter = {};
1161
+ if (configuration?.authMode === "commercialApiKey") {
1162
+ await setApiKeyToObject({
1163
+ object: localVarQueryParameter,
1164
+ key: "clientId",
1165
+ keyParamName: "clientId",
1166
+ configuration
1167
+ });
1168
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
1169
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
1170
+ }
1171
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
1172
+ object: localVarQueryParameter,
1173
+ key: "clientId",
1174
+ keyParamName: "clientId",
1175
+ configuration
1176
+ });
1177
+ const localVarOperationAuth = {
1178
+ authModes: ["commercialApiKey", "personalApiKey"],
1179
+ requestSigningByAuthMode: {
1180
+ "commercialApiKey": {
1181
+ secretParameter: "consumerKey",
1182
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1183
+ },
1184
+ "personalApiKey": {
1185
+ secretParameter: "consumerKey",
1186
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1187
+ }
1188
+ },
1189
+ selectedAuthMode: configuration?.authMode
1190
+ };
1191
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1192
+ localVarRequestOptions.headers = {
1193
+ ...localVarHeaderParameter,
1194
+ ...headersFromBaseOptions,
1195
+ ...options.headers
1196
+ };
1197
+ requestBeforeHook({
1198
+ queryParameters: localVarQueryParameter,
1199
+ requestConfig: localVarRequestOptions,
1200
+ path: localVarPath,
1201
+ configuration,
1202
+ pathTemplate: "/accounts/all",
1203
+ httpMethod: "GET",
1204
+ operationAuth: localVarOperationAuth
1205
+ });
1206
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1207
+ return {
1208
+ url: toPathString(localVarUrlObj),
1209
+ options: localVarRequestOptions
1210
+ };
1211
+ },
1212
+ /**
1213
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1069
1214
  * @summary List user accounts
1070
1215
  * @param {string} [userId]
1071
1216
  * @param {string} [userSecret]
1072
1217
  * @param {*} [options] Override http request option.
1218
+ * @deprecated
1073
1219
  * @throws {RequiredError}
1074
1220
  */
1075
1221
  listUserAccounts: async (userId, userSecret, options = {}) => {
@@ -1264,6 +1410,29 @@ const AccountInformationApiFp = function(configuration) {
1264
1410
  });
1265
1411
  },
1266
1412
  /**
1413
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1414
+ * @summary Get account details
1415
+ * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1416
+ * @param {*} [options] Override http request option.
1417
+ * @throws {RequiredError}
1418
+ */
1419
+ async getAccountDetails(...args) {
1420
+ const [requestParameters = {}, options] = args;
1421
+ return createRequestFunction(await localVarAxiosParamCreator.getAccountDetails(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
1422
+ authModes: ["commercialApiKey", "personalApiKey"],
1423
+ requestSigningByAuthMode: {
1424
+ "commercialApiKey": {
1425
+ secretParameter: "consumerKey",
1426
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1427
+ },
1428
+ "personalApiKey": {
1429
+ secretParameter: "consumerKey",
1430
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1431
+ }
1432
+ }
1433
+ });
1434
+ },
1435
+ /**
1267
1436
  * 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, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1268
1437
  * @summary List all account positions
1269
1438
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -1310,10 +1479,11 @@ const AccountInformationApiFp = function(configuration) {
1310
1479
  });
1311
1480
  },
1312
1481
  /**
1313
- * Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1482
+ * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1314
1483
  * @summary Get account detail
1315
1484
  * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1316
1485
  * @param {*} [options] Override http request option.
1486
+ * @deprecated
1317
1487
  * @throws {RequiredError}
1318
1488
  */
1319
1489
  async getUserAccountDetails(...args) {
@@ -1450,10 +1620,34 @@ const AccountInformationApiFp = function(configuration) {
1450
1620
  });
1451
1621
  },
1452
1622
  /**
1453
- * Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1623
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1624
+ * @summary List all user accounts
1625
+ * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
1626
+ * @param {*} [options] Override http request option.
1627
+ * @throws {RequiredError}
1628
+ */
1629
+ async listAllUserAccounts(...args) {
1630
+ const [requestParameters = {}, options] = args;
1631
+ return createRequestFunction(await localVarAxiosParamCreator.listAllUserAccounts(requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
1632
+ authModes: ["commercialApiKey", "personalApiKey"],
1633
+ requestSigningByAuthMode: {
1634
+ "commercialApiKey": {
1635
+ secretParameter: "consumerKey",
1636
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1637
+ },
1638
+ "personalApiKey": {
1639
+ secretParameter: "consumerKey",
1640
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1641
+ }
1642
+ }
1643
+ });
1644
+ },
1645
+ /**
1646
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1454
1647
  * @summary List user accounts
1455
1648
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
1456
1649
  * @param {*} [options] Override http request option.
1650
+ * @deprecated
1457
1651
  * @throws {RequiredError}
1458
1652
  */
1459
1653
  async listUserAccounts(...args) {
@@ -1525,6 +1719,16 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1525
1719
  return localVarFp.getAccountBalanceHistory(...args).then((request) => request(axios, basePath));
1526
1720
  },
1527
1721
  /**
1722
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1723
+ * @summary Get account details
1724
+ * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1725
+ * @param {*} [options] Override http request option.
1726
+ * @throws {RequiredError}
1727
+ */
1728
+ getAccountDetails(...args) {
1729
+ return localVarFp.getAccountDetails(...args).then((request) => request(axios, basePath));
1730
+ },
1731
+ /**
1528
1732
  * 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, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1529
1733
  * @summary List all account positions
1530
1734
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -1545,10 +1749,11 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1545
1749
  return localVarFp.getUserAccountBalance(...args).then((request) => request(axios, basePath));
1546
1750
  },
1547
1751
  /**
1548
- * Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1752
+ * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1549
1753
  * @summary Get account detail
1550
1754
  * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1551
1755
  * @param {*} [options] Override http request option.
1756
+ * @deprecated
1552
1757
  * @throws {RequiredError}
1553
1758
  */
1554
1759
  getUserAccountDetails(...args) {
@@ -1606,10 +1811,21 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1606
1811
  return localVarFp.getUserHoldings(...args).then((request) => request(axios, basePath));
1607
1812
  },
1608
1813
  /**
1609
- * Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1814
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1815
+ * @summary List all user accounts
1816
+ * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
1817
+ * @param {*} [options] Override http request option.
1818
+ * @throws {RequiredError}
1819
+ */
1820
+ listAllUserAccounts(...args) {
1821
+ return localVarFp.listAllUserAccounts(...args).then((request) => request(axios, basePath));
1822
+ },
1823
+ /**
1824
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1610
1825
  * @summary List user accounts
1611
1826
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
1612
1827
  * @param {*} [options] Override http request option.
1828
+ * @deprecated
1613
1829
  * @throws {RequiredError}
1614
1830
  */
1615
1831
  listUserAccounts(...args) {
@@ -1657,6 +1873,17 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1657
1873
  return AccountInformationApiFp(this.configuration).getAccountBalanceHistory(...args).then((request) => request(this.axios, this.basePath));
1658
1874
  }
1659
1875
  /**
1876
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1877
+ * @summary Get account details
1878
+ * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1879
+ * @param {*} [options] Override http request option.
1880
+ * @throws {RequiredError}
1881
+ * @memberof AccountInformationApiGenerated
1882
+ */
1883
+ getAccountDetails(...args) {
1884
+ return AccountInformationApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
1885
+ }
1886
+ /**
1660
1887
  * 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, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1661
1888
  * @summary List all account positions
1662
1889
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -1679,10 +1906,11 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1679
1906
  return AccountInformationApiFp(this.configuration).getUserAccountBalance(...args).then((request) => request(this.axios, this.basePath));
1680
1907
  }
1681
1908
  /**
1682
- * Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1909
+ * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. Returns account detail known to SnapTrade for the specified account. 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, Daily data is cached and refreshed once a day. Exact refresh timing may vary by 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.
1683
1910
  * @summary Get account detail
1684
1911
  * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1685
1912
  * @param {*} [options] Override http request option.
1913
+ * @deprecated
1686
1914
  * @throws {RequiredError}
1687
1915
  * @memberof AccountInformationApiGenerated
1688
1916
  */
@@ -1746,10 +1974,22 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1746
1974
  return AccountInformationApiFp(this.configuration).getUserHoldings(...args).then((request) => request(this.axios, this.basePath));
1747
1975
  }
1748
1976
  /**
1749
- * Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1977
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1978
+ * @summary List all user accounts
1979
+ * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
1980
+ * @param {*} [options] Override http request option.
1981
+ * @throws {RequiredError}
1982
+ * @memberof AccountInformationApiGenerated
1983
+ */
1984
+ listAllUserAccounts(...args) {
1985
+ return AccountInformationApiFp(this.configuration).listAllUserAccounts(...args).then((request) => request(this.axios, this.basePath));
1986
+ }
1987
+ /**
1988
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1750
1989
  * @summary List user accounts
1751
1990
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
1752
1991
  * @param {*} [options] Override http request option.
1992
+ * @deprecated
1753
1993
  * @throws {RequiredError}
1754
1994
  * @memberof AccountInformationApiGenerated
1755
1995
  */
@@ -2799,7 +3039,7 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
2799
3039
  };
2800
3040
  },
2801
3041
  /**
2802
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3042
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
2803
3043
  * @summary List accounts
2804
3044
  * @param {string} connectionId
2805
3045
  * @param {string} [userId]
@@ -3217,7 +3457,7 @@ const ConnectionsApiFp = function(configuration) {
3217
3457
  });
3218
3458
  },
3219
3459
  /**
3220
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3460
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3221
3461
  * @summary List accounts
3222
3462
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3223
3463
  * @param {*} [options] Override http request option.
@@ -3368,7 +3608,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios) {
3368
3608
  return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios, basePath));
3369
3609
  },
3370
3610
  /**
3371
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3611
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3372
3612
  * @summary List accounts
3373
3613
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3374
3614
  * @param {*} [options] Override http request option.
@@ -3472,7 +3712,7 @@ var ConnectionsApiGenerated = class extends BaseAPI {
3472
3712
  return ConnectionsApiFp(this.configuration).listBrokerageAuthorizations(...args).then((request) => request(this.axios, this.basePath));
3473
3713
  }
3474
3714
  /**
3475
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3715
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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.
3476
3716
  * @summary List accounts
3477
3717
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3478
3718
  * @param {*} [options] Override http request option.
@@ -3674,79 +3914,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3674
3914
  };
3675
3915
  },
3676
3916
  /**
3677
- * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
3678
- * @summary Get account details
3679
- * @param {string} accountId
3680
- * @param {string} [userId]
3681
- * @param {string} [userSecret]
3682
- * @param {*} [options] Override http request option.
3683
- * @throws {RequiredError}
3684
- */
3685
- getAccountDetails: async (accountId, userId, userSecret, options = {}) => {
3686
- assertParamExists("getAccountDetails", "accountId", accountId);
3687
- const localVarPath = `/accounts/{accountId}/details`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
3688
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3689
- let baseOptions;
3690
- if (configuration) baseOptions = configuration.baseOptions;
3691
- const localVarRequestOptions = {
3692
- method: "GET",
3693
- ...baseOptions,
3694
- ...options
3695
- };
3696
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3697
- const localVarQueryParameter = {};
3698
- if (configuration?.authMode === "commercialApiKey") {
3699
- await setApiKeyToObject({
3700
- object: localVarQueryParameter,
3701
- key: "clientId",
3702
- keyParamName: "clientId",
3703
- configuration
3704
- });
3705
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3706
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3707
- }
3708
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3709
- object: localVarQueryParameter,
3710
- key: "clientId",
3711
- keyParamName: "clientId",
3712
- configuration
3713
- });
3714
- const localVarOperationAuth = {
3715
- authModes: ["commercialApiKey", "personalApiKey"],
3716
- requestSigningByAuthMode: {
3717
- "commercialApiKey": {
3718
- secretParameter: "consumerKey",
3719
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3720
- },
3721
- "personalApiKey": {
3722
- secretParameter: "consumerKey",
3723
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3724
- }
3725
- },
3726
- selectedAuthMode: configuration?.authMode
3727
- };
3728
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3729
- localVarRequestOptions.headers = {
3730
- ...localVarHeaderParameter,
3731
- ...headersFromBaseOptions,
3732
- ...options.headers
3733
- };
3734
- requestBeforeHook({
3735
- queryParameters: localVarQueryParameter,
3736
- requestConfig: localVarRequestOptions,
3737
- path: localVarPath,
3738
- configuration,
3739
- pathTemplate: "/accounts/{accountId}/details",
3740
- httpMethod: "GET",
3741
- operationAuth: localVarOperationAuth
3742
- });
3743
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3744
- return {
3745
- url: toPathString(localVarUrlObj),
3746
- options: localVarRequestOptions
3747
- };
3748
- },
3749
- /**
3750
3917
  * 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.
3751
3918
  * @summary Get account order detail (V2)
3752
3919
  * @param {string} accountId
@@ -3974,77 +4141,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3974
4141
  };
3975
4142
  },
3976
4143
  /**
3977
- * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
3978
- * @summary List all user accounts
3979
- * @param {string} [userId]
3980
- * @param {string} [userSecret]
3981
- * @param {*} [options] Override http request option.
3982
- * @throws {RequiredError}
3983
- */
3984
- listAllUserAccounts: async (userId, userSecret, options = {}) => {
3985
- const localVarPath = `/accounts/all`;
3986
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3987
- let baseOptions;
3988
- if (configuration) baseOptions = configuration.baseOptions;
3989
- const localVarRequestOptions = {
3990
- method: "GET",
3991
- ...baseOptions,
3992
- ...options
3993
- };
3994
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3995
- const localVarQueryParameter = {};
3996
- if (configuration?.authMode === "commercialApiKey") {
3997
- await setApiKeyToObject({
3998
- object: localVarQueryParameter,
3999
- key: "clientId",
4000
- keyParamName: "clientId",
4001
- configuration
4002
- });
4003
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4004
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4005
- }
4006
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4007
- object: localVarQueryParameter,
4008
- key: "clientId",
4009
- keyParamName: "clientId",
4010
- configuration
4011
- });
4012
- const localVarOperationAuth = {
4013
- authModes: ["commercialApiKey", "personalApiKey"],
4014
- requestSigningByAuthMode: {
4015
- "commercialApiKey": {
4016
- secretParameter: "consumerKey",
4017
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4018
- },
4019
- "personalApiKey": {
4020
- secretParameter: "consumerKey",
4021
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4022
- }
4023
- },
4024
- selectedAuthMode: configuration?.authMode
4025
- };
4026
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4027
- localVarRequestOptions.headers = {
4028
- ...localVarHeaderParameter,
4029
- ...headersFromBaseOptions,
4030
- ...options.headers
4031
- };
4032
- requestBeforeHook({
4033
- queryParameters: localVarQueryParameter,
4034
- requestConfig: localVarRequestOptions,
4035
- path: localVarPath,
4036
- configuration,
4037
- pathTemplate: "/accounts/all",
4038
- httpMethod: "GET",
4039
- operationAuth: localVarOperationAuth
4040
- });
4041
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4042
- return {
4043
- url: toPathString(localVarUrlObj),
4044
- options: localVarRequestOptions
4045
- };
4046
- },
4047
- /**
4048
4144
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4049
4145
  * @summary List active Trade Detection subscriptions
4050
4146
  * @param {*} [options] Override http request option.
@@ -4248,29 +4344,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4248
4344
  });
4249
4345
  },
4250
4346
  /**
4251
- * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4252
- * @summary Get account details
4253
- * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4254
- * @param {*} [options] Override http request option.
4255
- * @throws {RequiredError}
4256
- */
4257
- async getAccountDetails(...args) {
4258
- const [requestParameters = {}, options] = args;
4259
- return createRequestFunction(await localVarAxiosParamCreator.getAccountDetails(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
4260
- authModes: ["commercialApiKey", "personalApiKey"],
4261
- requestSigningByAuthMode: {
4262
- "commercialApiKey": {
4263
- secretParameter: "consumerKey",
4264
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4265
- },
4266
- "personalApiKey": {
4267
- secretParameter: "consumerKey",
4268
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4269
- }
4270
- }
4271
- });
4272
- },
4273
- /**
4274
4347
  * 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.
4275
4348
  * @summary Get account order detail (V2)
4276
4349
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4340,29 +4413,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4340
4413
  });
4341
4414
  },
4342
4415
  /**
4343
- * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4344
- * @summary List all user accounts
4345
- * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4346
- * @param {*} [options] Override http request option.
4347
- * @throws {RequiredError}
4348
- */
4349
- async listAllUserAccounts(...args) {
4350
- const [requestParameters = {}, options] = args;
4351
- return createRequestFunction(await localVarAxiosParamCreator.listAllUserAccounts(requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
4352
- authModes: ["commercialApiKey", "personalApiKey"],
4353
- requestSigningByAuthMode: {
4354
- "commercialApiKey": {
4355
- secretParameter: "consumerKey",
4356
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4357
- },
4358
- "personalApiKey": {
4359
- secretParameter: "consumerKey",
4360
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4361
- }
4362
- }
4363
- });
4364
- },
4365
- /**
4366
4416
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4367
4417
  * @summary List active Trade Detection subscriptions
4368
4418
  * @param {*} [options] Override http request option.
@@ -4449,16 +4499,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
4449
4499
  return localVarFp.cancelSubscription(...args).then((request) => request(axios, basePath));
4450
4500
  },
4451
4501
  /**
4452
- * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4453
- * @summary Get account details
4454
- * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4455
- * @param {*} [options] Override http request option.
4456
- * @throws {RequiredError}
4457
- */
4458
- getAccountDetails(...args) {
4459
- return localVarFp.getAccountDetails(...args).then((request) => request(axios, basePath));
4460
- },
4461
- /**
4462
4502
  * 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.
4463
4503
  * @summary Get account order detail (V2)
4464
4504
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4489,16 +4529,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
4489
4529
  return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios, basePath));
4490
4530
  },
4491
4531
  /**
4492
- * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4493
- * @summary List all user accounts
4494
- * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4495
- * @param {*} [options] Override http request option.
4496
- * @throws {RequiredError}
4497
- */
4498
- listAllUserAccounts(...args) {
4499
- return localVarFp.listAllUserAccounts(...args).then((request) => request(axios, basePath));
4500
- },
4501
- /**
4502
4532
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4503
4533
  * @summary List active Trade Detection subscriptions
4504
4534
  * @param {*} [options] Override http request option.
@@ -4549,17 +4579,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4549
4579
  return ExperimentalEndpointsApiFp(this.configuration).cancelSubscription(...args).then((request) => request(this.axios, this.basePath));
4550
4580
  }
4551
4581
  /**
4552
- * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4553
- * @summary Get account details
4554
- * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4555
- * @param {*} [options] Override http request option.
4556
- * @throws {RequiredError}
4557
- * @memberof ExperimentalEndpointsApiGenerated
4558
- */
4559
- getAccountDetails(...args) {
4560
- return ExperimentalEndpointsApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
4561
- }
4562
- /**
4563
4582
  * 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.
4564
4583
  * @summary Get account order detail (V2)
4565
4584
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4593,17 +4612,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4593
4612
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(...args).then((request) => request(this.axios, this.basePath));
4594
4613
  }
4595
4614
  /**
4596
- * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4597
- * @summary List all user accounts
4598
- * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4599
- * @param {*} [options] Override http request option.
4600
- * @throws {RequiredError}
4601
- * @memberof ExperimentalEndpointsApiGenerated
4602
- */
4603
- listAllUserAccounts(...args) {
4604
- return ExperimentalEndpointsApiFp(this.configuration).listAllUserAccounts(...args).then((request) => request(this.axios, this.basePath));
4605
- }
4606
- /**
4607
4615
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4608
4616
  * @summary List active Trade Detection subscriptions
4609
4617
  * @param {*} [options] Override http request option.
@@ -7493,7 +7501,7 @@ var Configuration = class {
7493
7501
  }
7494
7502
  this.basePath = param.basePath;
7495
7503
  this.baseOptions = param.baseOptions ?? {};
7496
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.21/typescript" : param.userAgent;
7504
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.22/typescript" : param.userAgent;
7497
7505
  this.formDataCtor = param.formDataCtor;
7498
7506
  }
7499
7507
  /**