snaptrade-typescript-sdk 11.0.4 → 12.0.0

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.cjs CHANGED
@@ -31,9 +31,9 @@ const BASE_PATH = "https://api.snaptrade.com".replace(/\/+$/, "");
31
31
  * @class BaseAPI
32
32
  */
33
33
  var BaseAPI = class {
34
- constructor(configuration, basePath = BASE_PATH, axios$11 = axios.default) {
34
+ constructor(configuration, basePath = BASE_PATH, axios$9 = axios.default) {
35
35
  this.basePath = basePath;
36
- this.axios = axios$11;
36
+ this.axios = axios$9;
37
37
  if (configuration) {
38
38
  this.configuration = configuration;
39
39
  this.basePath = configuration.basePath || this.basePath;
@@ -264,7 +264,7 @@ async function wrapAxiosRequest(makeRequest) {
264
264
  * @export
265
265
  */
266
266
  const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration, operationAuth) {
267
- return async (axios$10 = globalAxios, basePath = BASE_PATH) => {
267
+ return async (axios$8 = globalAxios, basePath = BASE_PATH) => {
268
268
  const url = (configuration?.basePath || basePath) + axiosArgs.url;
269
269
  await requestAfterHook({
270
270
  axiosArgs,
@@ -276,7 +276,7 @@ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, config
276
276
  selectedAuthMode: configuration?.authMode
277
277
  } : void 0
278
278
  });
279
- return wrapAxiosRequest(async () => await axios$10.request({
279
+ return wrapAxiosRequest(async () => await axios$8.request({
280
280
  ...axiosArgs.options,
281
281
  url
282
282
  }));
@@ -531,80 +531,6 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
531
531
  };
532
532
  },
533
533
  /**
534
- * **Deprecated.** Use the account-specific holdings endpoint instead. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. List all accounts for the user, plus balances, positions, and orders for each account.
535
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
536
- * @param {string} [brokerageAuthorizations] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
537
- * @param {string} [userId]
538
- * @param {string} [userSecret]
539
- * @param {*} [options] Override http request option.
540
- * @deprecated
541
- * @throws {RequiredError}
542
- */
543
- getAllUserHoldings: async (brokerageAuthorizations, userId, userSecret, options = {}) => {
544
- const localVarPath = `/holdings`;
545
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
546
- let baseOptions;
547
- if (configuration) baseOptions = configuration.baseOptions;
548
- const localVarRequestOptions = {
549
- method: "GET",
550
- ...baseOptions,
551
- ...options
552
- };
553
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
554
- const localVarQueryParameter = {};
555
- if (configuration?.authMode === "commercialApiKey") {
556
- await setApiKeyToObject({
557
- object: localVarQueryParameter,
558
- key: "clientId",
559
- keyParamName: "clientId",
560
- configuration
561
- });
562
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
563
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
564
- }
565
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
566
- object: localVarQueryParameter,
567
- key: "clientId",
568
- keyParamName: "clientId",
569
- configuration
570
- });
571
- if (brokerageAuthorizations !== void 0) localVarQueryParameter["brokerage_authorizations"] = brokerageAuthorizations;
572
- const localVarOperationAuth = {
573
- authModes: ["commercialApiKey", "personalApiKey"],
574
- requestSigningByAuthMode: {
575
- "commercialApiKey": {
576
- secretParameter: "consumerKey",
577
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
578
- },
579
- "personalApiKey": {
580
- secretParameter: "consumerKey",
581
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
582
- }
583
- },
584
- selectedAuthMode: configuration?.authMode
585
- };
586
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
587
- localVarRequestOptions.headers = {
588
- ...localVarHeaderParameter,
589
- ...headersFromBaseOptions,
590
- ...options.headers
591
- };
592
- requestBeforeHook({
593
- queryParameters: localVarQueryParameter,
594
- requestConfig: localVarRequestOptions,
595
- path: localVarPath,
596
- configuration,
597
- pathTemplate: "/holdings",
598
- httpMethod: "GET",
599
- operationAuth: localVarOperationAuth
600
- });
601
- setSearchParams(localVarUrlObj, localVarQueryParameter);
602
- return {
603
- url: toPathString(localVarUrlObj),
604
- options: localVarRequestOptions
605
- };
606
- },
607
- /**
608
534
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). 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.
609
535
  * @summary List account balances
610
536
  * @param {string} accountId
@@ -906,80 +832,6 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
906
832
  };
907
833
  },
908
834
  /**
909
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, 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.
910
- * @summary List account positions
911
- * @param {string} accountId
912
- * @param {string} [userId]
913
- * @param {string} [userSecret]
914
- * @param {*} [options] Override http request option.
915
- * @deprecated
916
- * @throws {RequiredError}
917
- */
918
- getUserAccountPositions: async (accountId, userId, userSecret, options = {}) => {
919
- assertParamExists("getUserAccountPositions", "accountId", accountId);
920
- const localVarPath = `/accounts/{accountId}/positions`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
921
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
922
- let baseOptions;
923
- if (configuration) baseOptions = configuration.baseOptions;
924
- const localVarRequestOptions = {
925
- method: "GET",
926
- ...baseOptions,
927
- ...options
928
- };
929
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
930
- const localVarQueryParameter = {};
931
- if (configuration?.authMode === "commercialApiKey") {
932
- await setApiKeyToObject({
933
- object: localVarQueryParameter,
934
- key: "clientId",
935
- keyParamName: "clientId",
936
- configuration
937
- });
938
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
939
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
940
- }
941
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
942
- object: localVarQueryParameter,
943
- key: "clientId",
944
- keyParamName: "clientId",
945
- configuration
946
- });
947
- const localVarOperationAuth = {
948
- authModes: ["commercialApiKey", "personalApiKey"],
949
- requestSigningByAuthMode: {
950
- "commercialApiKey": {
951
- secretParameter: "consumerKey",
952
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
953
- },
954
- "personalApiKey": {
955
- secretParameter: "consumerKey",
956
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
957
- }
958
- },
959
- selectedAuthMode: configuration?.authMode
960
- };
961
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
962
- localVarRequestOptions.headers = {
963
- ...localVarHeaderParameter,
964
- ...headersFromBaseOptions,
965
- ...options.headers
966
- };
967
- requestBeforeHook({
968
- queryParameters: localVarQueryParameter,
969
- requestConfig: localVarRequestOptions,
970
- path: localVarPath,
971
- configuration,
972
- pathTemplate: "/accounts/{accountId}/positions",
973
- httpMethod: "GET",
974
- operationAuth: localVarOperationAuth
975
- });
976
- setSearchParams(localVarUrlObj, localVarQueryParameter);
977
- return {
978
- url: toPathString(localVarUrlObj),
979
- options: localVarRequestOptions
980
- };
981
- },
982
- /**
983
835
  * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
984
836
  * @summary List account recent orders (last 24 hours only)
985
837
  * @param {string} accountId
@@ -1423,29 +1275,6 @@ const AccountInformationApiFp = function(configuration) {
1423
1275
  });
1424
1276
  },
1425
1277
  /**
1426
- * **Deprecated.** Use the account-specific holdings endpoint instead. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. List all accounts for the user, plus balances, positions, and orders for each account.
1427
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
1428
- * @param {AccountInformationApiGetAllUserHoldingsRequest<TAuth>} requestParameters Request parameters.
1429
- * @param {*} [options] Override http request option.
1430
- * @deprecated
1431
- * @throws {RequiredError}
1432
- */
1433
- async getAllUserHoldings(requestParameters = {}, options) {
1434
- return createRequestFunction(await localVarAxiosParamCreator.getAllUserHoldings(requestParameters.brokerageAuthorizations, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1435
- authModes: ["commercialApiKey", "personalApiKey"],
1436
- requestSigningByAuthMode: {
1437
- "commercialApiKey": {
1438
- secretParameter: "consumerKey",
1439
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1440
- },
1441
- "personalApiKey": {
1442
- secretParameter: "consumerKey",
1443
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1444
- }
1445
- }
1446
- });
1447
- },
1448
- /**
1449
1278
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). 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.
1450
1279
  * @summary List account balances
1451
1280
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -1535,29 +1364,6 @@ const AccountInformationApiFp = function(configuration) {
1535
1364
  });
1536
1365
  },
1537
1366
  /**
1538
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, 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.
1539
- * @summary List account positions
1540
- * @param {AccountInformationApiGetUserAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1541
- * @param {*} [options] Override http request option.
1542
- * @deprecated
1543
- * @throws {RequiredError}
1544
- */
1545
- async getUserAccountPositions(requestParameters, options) {
1546
- return createRequestFunction(await localVarAxiosParamCreator.getUserAccountPositions(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1547
- authModes: ["commercialApiKey", "personalApiKey"],
1548
- requestSigningByAuthMode: {
1549
- "commercialApiKey": {
1550
- secretParameter: "consumerKey",
1551
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1552
- },
1553
- "personalApiKey": {
1554
- secretParameter: "consumerKey",
1555
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1556
- }
1557
- }
1558
- });
1559
- },
1560
- /**
1561
1367
  * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
1562
1368
  * @summary List account recent orders (last 24 hours only)
1563
1369
  * @param {AccountInformationApiGetUserAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
@@ -1674,7 +1480,7 @@ const AccountInformationApiFp = function(configuration) {
1674
1480
  * AccountInformationApi - factory interface
1675
1481
  * @export
1676
1482
  */
1677
- const AccountInformationApiFactory = function(configuration, basePath, axios$9) {
1483
+ const AccountInformationApiFactory = function(configuration, basePath, axios$7) {
1678
1484
  const localVarFp = AccountInformationApiFp(configuration);
1679
1485
  return {
1680
1486
  /**
@@ -1685,7 +1491,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1685
1491
  * @throws {RequiredError}
1686
1492
  */
1687
1493
  getAccountActivities(requestParameters, options) {
1688
- return localVarFp.getAccountActivities(requestParameters, options).then((request) => request(axios$9, basePath));
1494
+ return localVarFp.getAccountActivities(requestParameters, options).then((request) => request(axios$7, basePath));
1689
1495
  },
1690
1496
  /**
1691
1497
  * 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.
@@ -1695,7 +1501,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1695
1501
  * @throws {RequiredError}
1696
1502
  */
1697
1503
  getAccountBalanceHistory(requestParameters, options) {
1698
- return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios$9, basePath));
1504
+ return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios$7, basePath));
1699
1505
  },
1700
1506
  /**
1701
1507
  * 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, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions 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.
@@ -1705,18 +1511,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1705
1511
  * @throws {RequiredError}
1706
1512
  */
1707
1513
  getAllAccountPositions(requestParameters, options) {
1708
- return localVarFp.getAllAccountPositions(requestParameters, options).then((request) => request(axios$9, basePath));
1709
- },
1710
- /**
1711
- * **Deprecated.** Use the account-specific holdings endpoint instead. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. List all accounts for the user, plus balances, positions, and orders for each account.
1712
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
1713
- * @param {AccountInformationApiGetAllUserHoldingsRequest<TAuth>} requestParameters Request parameters.
1714
- * @param {*} [options] Override http request option.
1715
- * @deprecated
1716
- * @throws {RequiredError}
1717
- */
1718
- getAllUserHoldings(requestParameters = {}, options) {
1719
- return localVarFp.getAllUserHoldings(requestParameters, options).then((request) => request(axios$9, basePath));
1514
+ return localVarFp.getAllAccountPositions(requestParameters, options).then((request) => request(axios$7, basePath));
1720
1515
  },
1721
1516
  /**
1722
1517
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). 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.
@@ -1726,7 +1521,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1726
1521
  * @throws {RequiredError}
1727
1522
  */
1728
1523
  getUserAccountBalance(requestParameters, options) {
1729
- return localVarFp.getUserAccountBalance(requestParameters, options).then((request) => request(axios$9, basePath));
1524
+ return localVarFp.getUserAccountBalance(requestParameters, options).then((request) => request(axios$7, basePath));
1730
1525
  },
1731
1526
  /**
1732
1527
  * 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.
@@ -1736,7 +1531,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1736
1531
  * @throws {RequiredError}
1737
1532
  */
1738
1533
  getUserAccountDetails(requestParameters, options) {
1739
- return localVarFp.getUserAccountDetails(requestParameters, options).then((request) => request(axios$9, basePath));
1534
+ return localVarFp.getUserAccountDetails(requestParameters, options).then((request) => request(axios$7, basePath));
1740
1535
  },
1741
1536
  /**
1742
1537
  * Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. 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.
@@ -1746,7 +1541,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1746
1541
  * @throws {RequiredError}
1747
1542
  */
1748
1543
  getUserAccountOrderDetail(requestParameters, options) {
1749
- return localVarFp.getUserAccountOrderDetail(requestParameters, options).then((request) => request(axios$9, basePath));
1544
+ return localVarFp.getUserAccountOrderDetail(requestParameters, options).then((request) => request(axios$7, basePath));
1750
1545
  },
1751
1546
  /**
1752
1547
  * Returns a list of recent orders in 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.
@@ -1756,18 +1551,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1756
1551
  * @throws {RequiredError}
1757
1552
  */
1758
1553
  getUserAccountOrders(requestParameters, options) {
1759
- return localVarFp.getUserAccountOrders(requestParameters, options).then((request) => request(axios$9, basePath));
1760
- },
1761
- /**
1762
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, 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.
1763
- * @summary List account positions
1764
- * @param {AccountInformationApiGetUserAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1765
- * @param {*} [options] Override http request option.
1766
- * @deprecated
1767
- * @throws {RequiredError}
1768
- */
1769
- getUserAccountPositions(requestParameters, options) {
1770
- return localVarFp.getUserAccountPositions(requestParameters, options).then((request) => request(axios$9, basePath));
1554
+ return localVarFp.getUserAccountOrders(requestParameters, options).then((request) => request(axios$7, basePath));
1771
1555
  },
1772
1556
  /**
1773
1557
  * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
@@ -1777,7 +1561,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1777
1561
  * @throws {RequiredError}
1778
1562
  */
1779
1563
  getUserAccountRecentOrders(requestParameters, options) {
1780
- return localVarFp.getUserAccountRecentOrders(requestParameters, options).then((request) => request(axios$9, basePath));
1564
+ return localVarFp.getUserAccountRecentOrders(requestParameters, options).then((request) => request(axios$7, basePath));
1781
1565
  },
1782
1566
  /**
1783
1567
  * Returns a list of rate of return percents for a given account.
@@ -1787,7 +1571,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1787
1571
  * @throws {RequiredError}
1788
1572
  */
1789
1573
  getUserAccountReturnRates(requestParameters, options) {
1790
- return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios$9, basePath));
1574
+ return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios$7, basePath));
1791
1575
  },
1792
1576
  /**
1793
1577
  * **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026. Returns a list of balances, positions, and recent orders 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.
@@ -1798,7 +1582,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1798
1582
  * @throws {RequiredError}
1799
1583
  */
1800
1584
  getUserHoldings(requestParameters, options) {
1801
- return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios$9, basePath));
1585
+ return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios$7, basePath));
1802
1586
  },
1803
1587
  /**
1804
1588
  * 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).
@@ -1808,7 +1592,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1808
1592
  * @throws {RequiredError}
1809
1593
  */
1810
1594
  listUserAccounts(requestParameters = {}, options) {
1811
- return localVarFp.listUserAccounts(requestParameters, options).then((request) => request(axios$9, basePath));
1595
+ return localVarFp.listUserAccounts(requestParameters, options).then((request) => request(axios$7, basePath));
1812
1596
  },
1813
1597
  /**
1814
1598
  * Updates various properties of a specified account.
@@ -1818,7 +1602,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$9)
1818
1602
  * @throws {RequiredError}
1819
1603
  */
1820
1604
  updateUserAccount(requestParameters, options) {
1821
- return localVarFp.updateUserAccount(requestParameters, options).then((request) => request(axios$9, basePath));
1605
+ return localVarFp.updateUserAccount(requestParameters, options).then((request) => request(axios$7, basePath));
1822
1606
  }
1823
1607
  };
1824
1608
  };
@@ -1863,18 +1647,6 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1863
1647
  return AccountInformationApiFp(this.configuration).getAllAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
1864
1648
  }
1865
1649
  /**
1866
- * **Deprecated.** Use the account-specific holdings endpoint instead. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. List all accounts for the user, plus balances, positions, and orders for each account.
1867
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
1868
- * @param {AccountInformationApiGetAllUserHoldingsRequest<TAuth>} requestParameters Request parameters.
1869
- * @param {*} [options] Override http request option.
1870
- * @deprecated
1871
- * @throws {RequiredError}
1872
- * @memberof AccountInformationApiGenerated
1873
- */
1874
- getAllUserHoldings(requestParameters = {}, options) {
1875
- return AccountInformationApiFp(this.configuration).getAllUserHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
1876
- }
1877
- /**
1878
1650
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). 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.
1879
1651
  * @summary List account balances
1880
1652
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -1919,18 +1691,6 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1919
1691
  return AccountInformationApiFp(this.configuration).getUserAccountOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
1920
1692
  }
1921
1693
  /**
1922
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, 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.
1923
- * @summary List account positions
1924
- * @param {AccountInformationApiGetUserAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1925
- * @param {*} [options] Override http request option.
1926
- * @deprecated
1927
- * @throws {RequiredError}
1928
- * @memberof AccountInformationApiGenerated
1929
- */
1930
- getUserAccountPositions(requestParameters, options) {
1931
- return AccountInformationApiFp(this.configuration).getUserAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
1932
- }
1933
- /**
1934
1694
  * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
1935
1695
  * @summary List account recent orders (last 24 hours only)
1936
1696
  * @param {AccountInformationApiGetUserAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
@@ -2063,7 +1823,7 @@ async check(options) {
2063
1823
  * ApiStatusApi - factory interface
2064
1824
  * @export
2065
1825
  */
2066
- const ApiStatusApiFactory = function(configuration, basePath, axios$8) {
1826
+ const ApiStatusApiFactory = function(configuration, basePath, axios$6) {
2067
1827
  const localVarFp = ApiStatusApiFp(configuration);
2068
1828
  return {
2069
1829
  /**
@@ -2073,7 +1833,7 @@ const ApiStatusApiFactory = function(configuration, basePath, axios$8) {
2073
1833
  * @throws {RequiredError}
2074
1834
  */
2075
1835
  check(options) {
2076
- return localVarFp.check(options).then((request) => request(axios$8, basePath));
1836
+ return localVarFp.check(options).then((request) => request(axios$6, basePath));
2077
1837
  } };
2078
1838
  };
2079
1839
  /**
@@ -2522,7 +2282,7 @@ const AuthenticationApiFp = function(configuration) {
2522
2282
  * AuthenticationApi - factory interface
2523
2283
  * @export
2524
2284
  */
2525
- const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2285
+ const AuthenticationApiFactory = function(configuration, basePath, axios$5) {
2526
2286
  const localVarFp = AuthenticationApiFp(configuration);
2527
2287
  return {
2528
2288
  /**
@@ -2533,7 +2293,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2533
2293
  * @throws {RequiredError}
2534
2294
  */
2535
2295
  deleteSnapTradeUser(requestParameters, options) {
2536
- return localVarFp.deleteSnapTradeUser(requestParameters, options).then((request) => request(axios$7, basePath));
2296
+ return localVarFp.deleteSnapTradeUser(requestParameters, options).then((request) => request(axios$5, basePath));
2537
2297
  },
2538
2298
  /**
2539
2299
  * Returns a list of all registered user IDs. Please note that the response is not currently paginated.
@@ -2542,7 +2302,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2542
2302
  * @throws {RequiredError}
2543
2303
  */
2544
2304
  listSnapTradeUsers(...args) {
2545
- return localVarFp.listSnapTradeUsers(...args).then((request) => request(axios$7, basePath));
2305
+ return localVarFp.listSnapTradeUsers(...args).then((request) => request(axios$5, basePath));
2546
2306
  },
2547
2307
  /**
2548
2308
  * Authenticates a SnapTrade user and returns the Connection Portal URL used for connecting brokerage accounts. Please check [this guide](/docs/implement-connection-portal) for how to integrate the Connection Portal into your app. Please note that the returned URL expires in 5 minutes.
@@ -2552,7 +2312,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2552
2312
  * @throws {RequiredError}
2553
2313
  */
2554
2314
  loginSnapTradeUser(requestParameters = {}, options) {
2555
- return localVarFp.loginSnapTradeUser(requestParameters, options).then((request) => request(axios$7, basePath));
2315
+ return localVarFp.loginSnapTradeUser(requestParameters, options).then((request) => request(axios$5, basePath));
2556
2316
  },
2557
2317
  /**
2558
2318
  * Registers a new SnapTrade user under your Client ID. A user secret will be automatically generated for you and must be properly stored in your system. Most SnapTrade operations require a user ID and user secret to be passed in as parameters.
@@ -2562,7 +2322,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2562
2322
  * @throws {RequiredError}
2563
2323
  */
2564
2324
  registerSnapTradeUser(requestParameters, options) {
2565
- return localVarFp.registerSnapTradeUser(requestParameters, options).then((request) => request(axios$7, basePath));
2325
+ return localVarFp.registerSnapTradeUser(requestParameters, options).then((request) => request(axios$5, basePath));
2566
2326
  },
2567
2327
  /**
2568
2328
  * Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you\'ll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
@@ -2572,7 +2332,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
2572
2332
  * @throws {RequiredError}
2573
2333
  */
2574
2334
  resetSnapTradeUserSecret(requestParameters, options) {
2575
- return localVarFp.resetSnapTradeUserSecret(requestParameters, options).then((request) => request(axios$7, basePath));
2335
+ return localVarFp.resetSnapTradeUserSecret(requestParameters, options).then((request) => request(axios$5, basePath));
2576
2336
  }
2577
2337
  };
2578
2338
  };
@@ -3086,22 +2846,23 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3086
2846
  };
3087
2847
  },
3088
2848
  /**
3089
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
3090
- * @summary Delete connection
2849
+ * Returns a list of rate of return percents for a given connection.
2850
+ * @summary List connection rate of returns
3091
2851
  * @param {string} authorizationId
2852
+ * @param {string} [timeframes] Optional comma separated list of rate-of-return timeframes to return. Supported values are &#x60;ALL&#x60;, &#x60;1Y&#x60;, &#x60;YTD&#x60;, &#x60;1M&#x60;, &#x60;1W&#x60;, and &#x60;1D&#x60;. If omitted, SnapTrade returns all six supported timeframes.
3092
2853
  * @param {string} [userId]
3093
2854
  * @param {string} [userSecret]
3094
2855
  * @param {*} [options] Override http request option.
3095
2856
  * @throws {RequiredError}
3096
2857
  */
3097
- removeBrokerageAuthorization: async (authorizationId, userId, userSecret, options = {}) => {
3098
- assertParamExists("removeBrokerageAuthorization", "authorizationId", authorizationId);
3099
- const localVarPath = `/authorizations/{authorizationId}`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
2858
+ returnRates: async (authorizationId, timeframes, userId, userSecret, options = {}) => {
2859
+ assertParamExists("returnRates", "authorizationId", authorizationId);
2860
+ const localVarPath = `/authorizations/{authorizationId}/returnRates`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
3100
2861
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3101
2862
  let baseOptions;
3102
2863
  if (configuration) baseOptions = configuration.baseOptions;
3103
2864
  const localVarRequestOptions = {
3104
- method: "DELETE",
2865
+ method: "GET",
3105
2866
  ...baseOptions,
3106
2867
  ...options
3107
2868
  };
@@ -3123,6 +2884,7 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3123
2884
  keyParamName: "clientId",
3124
2885
  configuration
3125
2886
  });
2887
+ if (timeframes !== void 0) localVarQueryParameter["timeframes"] = timeframes;
3126
2888
  const localVarOperationAuth = {
3127
2889
  authModes: ["commercialApiKey", "personalApiKey"],
3128
2890
  requestSigningByAuthMode: {
@@ -3148,8 +2910,8 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3148
2910
  requestConfig: localVarRequestOptions,
3149
2911
  path: localVarPath,
3150
2912
  configuration,
3151
- pathTemplate: "/authorizations/{authorizationId}",
3152
- httpMethod: "DELETE",
2913
+ pathTemplate: "/authorizations/{authorizationId}/returnRates",
2914
+ httpMethod: "GET",
3153
2915
  operationAuth: localVarOperationAuth
3154
2916
  });
3155
2917
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -3159,23 +2921,22 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3159
2921
  };
3160
2922
  },
3161
2923
  /**
3162
- * Returns a list of rate of return percents for a given connection.
3163
- * @summary List connection rate of returns
2924
+ * Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
2925
+ * @summary Sync transactions for a connection
3164
2926
  * @param {string} authorizationId
3165
- * @param {string} [timeframes] Optional comma separated list of rate-of-return timeframes to return. Supported values are &#x60;ALL&#x60;, &#x60;1Y&#x60;, &#x60;YTD&#x60;, &#x60;1M&#x60;, &#x60;1W&#x60;, and &#x60;1D&#x60;. If omitted, SnapTrade returns all six supported timeframes.
3166
2927
  * @param {string} [userId]
3167
2928
  * @param {string} [userSecret]
3168
2929
  * @param {*} [options] Override http request option.
3169
2930
  * @throws {RequiredError}
3170
2931
  */
3171
- returnRates: async (authorizationId, timeframes, userId, userSecret, options = {}) => {
3172
- assertParamExists("returnRates", "authorizationId", authorizationId);
3173
- const localVarPath = `/authorizations/{authorizationId}/returnRates`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
2932
+ syncBrokerageAuthorizationTransactions: async (authorizationId, userId, userSecret, options = {}) => {
2933
+ assertParamExists("syncBrokerageAuthorizationTransactions", "authorizationId", authorizationId);
2934
+ const localVarPath = `/authorizations/{authorizationId}/transactions/sync`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
3174
2935
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3175
2936
  let baseOptions;
3176
2937
  if (configuration) baseOptions = configuration.baseOptions;
3177
2938
  const localVarRequestOptions = {
3178
- method: "GET",
2939
+ method: "POST",
3179
2940
  ...baseOptions,
3180
2941
  ...options
3181
2942
  };
@@ -3197,7 +2958,6 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3197
2958
  keyParamName: "clientId",
3198
2959
  configuration
3199
2960
  });
3200
- if (timeframes !== void 0) localVarQueryParameter["timeframes"] = timeframes;
3201
2961
  const localVarOperationAuth = {
3202
2962
  authModes: ["commercialApiKey", "personalApiKey"],
3203
2963
  requestSigningByAuthMode: {
@@ -3223,8 +2983,8 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3223
2983
  requestConfig: localVarRequestOptions,
3224
2984
  path: localVarPath,
3225
2985
  configuration,
3226
- pathTemplate: "/authorizations/{authorizationId}/returnRates",
3227
- httpMethod: "GET",
2986
+ pathTemplate: "/authorizations/{authorizationId}/transactions/sync",
2987
+ httpMethod: "POST",
3228
2988
  operationAuth: localVarOperationAuth
3229
2989
  });
3230
2990
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -3232,165 +2992,20 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3232
2992
  url: toPathString(localVarUrlObj),
3233
2993
  options: localVarRequestOptions
3234
2994
  };
3235
- },
2995
+ }
2996
+ };
2997
+ };
2998
+ /**
2999
+ * ConnectionsApi - functional programming interface
3000
+ * @export
3001
+ */
3002
+ const ConnectionsApiFp = function(configuration) {
3003
+ const localVarAxiosParamCreator = ConnectionsApiAxiosParamCreator(configuration);
3004
+ return {
3236
3005
  /**
3237
- * Returns a list of session events associated with a user.
3238
- * @summary Get all session events for a user
3239
- * @param {string} partnerClientId
3240
- * @param {string} [userId] Optional comma separated list of user IDs used to filter the request on specific users
3241
- * @param {string} [sessionId] Optional comma separated list of session IDs used to filter the request on specific users
3242
- * @param {*} [options] Override http request option.
3243
- * @throws {RequiredError}
3244
- */
3245
- sessionEvents: async (partnerClientId, userId, sessionId, options = {}) => {
3246
- assertParamExists("sessionEvents", "partnerClientId", partnerClientId);
3247
- const localVarPath = `/sessionEvents`;
3248
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3249
- let baseOptions;
3250
- if (configuration) baseOptions = configuration.baseOptions;
3251
- const localVarRequestOptions = {
3252
- method: "GET",
3253
- ...baseOptions,
3254
- ...options
3255
- };
3256
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3257
- const localVarQueryParameter = {};
3258
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
3259
- object: localVarQueryParameter,
3260
- key: "clientId",
3261
- keyParamName: "clientId",
3262
- configuration
3263
- });
3264
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3265
- object: localVarQueryParameter,
3266
- key: "clientId",
3267
- keyParamName: "clientId",
3268
- configuration
3269
- });
3270
- if (partnerClientId !== void 0) localVarQueryParameter["PartnerClientId"] = partnerClientId;
3271
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3272
- if (sessionId !== void 0) localVarQueryParameter["sessionId"] = sessionId;
3273
- const localVarOperationAuth = {
3274
- authModes: ["commercialApiKey", "personalApiKey"],
3275
- requestSigningByAuthMode: {
3276
- "commercialApiKey": {
3277
- secretParameter: "consumerKey",
3278
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3279
- },
3280
- "personalApiKey": {
3281
- secretParameter: "consumerKey",
3282
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3283
- }
3284
- },
3285
- selectedAuthMode: configuration?.authMode
3286
- };
3287
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3288
- localVarRequestOptions.headers = {
3289
- ...localVarHeaderParameter,
3290
- ...headersFromBaseOptions,
3291
- ...options.headers
3292
- };
3293
- requestBeforeHook({
3294
- queryParameters: localVarQueryParameter,
3295
- requestConfig: localVarRequestOptions,
3296
- path: localVarPath,
3297
- configuration,
3298
- pathTemplate: "/sessionEvents",
3299
- httpMethod: "GET",
3300
- operationAuth: localVarOperationAuth
3301
- });
3302
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3303
- return {
3304
- url: toPathString(localVarUrlObj),
3305
- options: localVarRequestOptions
3306
- };
3307
- },
3308
- /**
3309
- * Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
3310
- * @summary Sync transactions for a connection
3311
- * @param {string} authorizationId
3312
- * @param {string} [userId]
3313
- * @param {string} [userSecret]
3314
- * @param {*} [options] Override http request option.
3315
- * @throws {RequiredError}
3316
- */
3317
- syncBrokerageAuthorizationTransactions: async (authorizationId, userId, userSecret, options = {}) => {
3318
- assertParamExists("syncBrokerageAuthorizationTransactions", "authorizationId", authorizationId);
3319
- const localVarPath = `/authorizations/{authorizationId}/transactions/sync`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
3320
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3321
- let baseOptions;
3322
- if (configuration) baseOptions = configuration.baseOptions;
3323
- const localVarRequestOptions = {
3324
- method: "POST",
3325
- ...baseOptions,
3326
- ...options
3327
- };
3328
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3329
- const localVarQueryParameter = {};
3330
- if (configuration?.authMode === "commercialApiKey") {
3331
- await setApiKeyToObject({
3332
- object: localVarQueryParameter,
3333
- key: "clientId",
3334
- keyParamName: "clientId",
3335
- configuration
3336
- });
3337
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3338
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3339
- }
3340
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3341
- object: localVarQueryParameter,
3342
- key: "clientId",
3343
- keyParamName: "clientId",
3344
- configuration
3345
- });
3346
- const localVarOperationAuth = {
3347
- authModes: ["commercialApiKey", "personalApiKey"],
3348
- requestSigningByAuthMode: {
3349
- "commercialApiKey": {
3350
- secretParameter: "consumerKey",
3351
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3352
- },
3353
- "personalApiKey": {
3354
- secretParameter: "consumerKey",
3355
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3356
- }
3357
- },
3358
- selectedAuthMode: configuration?.authMode
3359
- };
3360
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3361
- localVarRequestOptions.headers = {
3362
- ...localVarHeaderParameter,
3363
- ...headersFromBaseOptions,
3364
- ...options.headers
3365
- };
3366
- requestBeforeHook({
3367
- queryParameters: localVarQueryParameter,
3368
- requestConfig: localVarRequestOptions,
3369
- path: localVarPath,
3370
- configuration,
3371
- pathTemplate: "/authorizations/{authorizationId}/transactions/sync",
3372
- httpMethod: "POST",
3373
- operationAuth: localVarOperationAuth
3374
- });
3375
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3376
- return {
3377
- url: toPathString(localVarUrlObj),
3378
- options: localVarRequestOptions
3379
- };
3380
- }
3381
- };
3382
- };
3383
- /**
3384
- * ConnectionsApi - functional programming interface
3385
- * @export
3386
- */
3387
- const ConnectionsApiFp = function(configuration) {
3388
- const localVarAxiosParamCreator = ConnectionsApiAxiosParamCreator(configuration);
3389
- return {
3390
- /**
3391
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
3392
- * @summary Delete connection
3393
- * @param {ConnectionsApiDeleteConnectionRequest<TAuth>} requestParameters Request parameters.
3006
+ * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
3007
+ * @summary Delete connection
3008
+ * @param {ConnectionsApiDeleteConnectionRequest<TAuth>} requestParameters Request parameters.
3394
3009
  * @param {*} [options] Override http request option.
3395
3010
  * @throws {RequiredError}
3396
3011
  */
@@ -3520,28 +3135,6 @@ const ConnectionsApiFp = function(configuration) {
3520
3135
  });
3521
3136
  },
3522
3137
  /**
3523
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
3524
- * @summary Delete connection
3525
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
3526
- * @param {*} [options] Override http request option.
3527
- * @throws {RequiredError}
3528
- */
3529
- async removeBrokerageAuthorization(requestParameters, options) {
3530
- return createRequestFunction(await localVarAxiosParamCreator.removeBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
3531
- authModes: ["commercialApiKey", "personalApiKey"],
3532
- requestSigningByAuthMode: {
3533
- "commercialApiKey": {
3534
- secretParameter: "consumerKey",
3535
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3536
- },
3537
- "personalApiKey": {
3538
- secretParameter: "consumerKey",
3539
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3540
- }
3541
- }
3542
- });
3543
- },
3544
- /**
3545
3138
  * Returns a list of rate of return percents for a given connection.
3546
3139
  * @summary List connection rate of returns
3547
3140
  * @param {ConnectionsApiReturnRatesRequest<TAuth>} requestParameters Request parameters.
@@ -3564,28 +3157,6 @@ const ConnectionsApiFp = function(configuration) {
3564
3157
  });
3565
3158
  },
3566
3159
  /**
3567
- * Returns a list of session events associated with a user.
3568
- * @summary Get all session events for a user
3569
- * @param {ConnectionsApiSessionEventsRequest<TAuth>} requestParameters Request parameters.
3570
- * @param {*} [options] Override http request option.
3571
- * @throws {RequiredError}
3572
- */
3573
- async sessionEvents(requestParameters, options) {
3574
- return createRequestFunction(await localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, requestParameters.sessionId, options), axios.default, BASE_PATH, configuration, {
3575
- authModes: ["commercialApiKey", "personalApiKey"],
3576
- requestSigningByAuthMode: {
3577
- "commercialApiKey": {
3578
- secretParameter: "consumerKey",
3579
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3580
- },
3581
- "personalApiKey": {
3582
- secretParameter: "consumerKey",
3583
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3584
- }
3585
- }
3586
- });
3587
- },
3588
- /**
3589
3160
  * Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
3590
3161
  * @summary Sync transactions for a connection
3591
3162
  * @param {ConnectionsApiSyncBrokerageAuthorizationTransactionsRequest<TAuth>} requestParameters Request parameters.
@@ -3613,7 +3184,7 @@ const ConnectionsApiFp = function(configuration) {
3613
3184
  * ConnectionsApi - factory interface
3614
3185
  * @export
3615
3186
  */
3616
- const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3187
+ const ConnectionsApiFactory = function(configuration, basePath, axios$4) {
3617
3188
  const localVarFp = ConnectionsApiFp(configuration);
3618
3189
  return {
3619
3190
  /**
@@ -3624,7 +3195,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3624
3195
  * @throws {RequiredError}
3625
3196
  */
3626
3197
  deleteConnection(requestParameters, options) {
3627
- return localVarFp.deleteConnection(requestParameters, options).then((request) => request(axios$6, basePath));
3198
+ return localVarFp.deleteConnection(requestParameters, options).then((request) => request(axios$4, basePath));
3628
3199
  },
3629
3200
  /**
3630
3201
  * Returns a single connection for the specified ID.
@@ -3634,7 +3205,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3634
3205
  * @throws {RequiredError}
3635
3206
  */
3636
3207
  detailBrokerageAuthorization(requestParameters, options) {
3637
- return localVarFp.detailBrokerageAuthorization(requestParameters, options).then((request) => request(axios$6, basePath));
3208
+ return localVarFp.detailBrokerageAuthorization(requestParameters, options).then((request) => request(axios$4, basePath));
3638
3209
  },
3639
3210
  /**
3640
3211
  * Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
@@ -3644,7 +3215,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3644
3215
  * @throws {RequiredError}
3645
3216
  */
3646
3217
  disableBrokerageAuthorization(requestParameters, options) {
3647
- return localVarFp.disableBrokerageAuthorization(requestParameters, options).then((request) => request(axios$6, basePath));
3218
+ return localVarFp.disableBrokerageAuthorization(requestParameters, options).then((request) => request(axios$4, basePath));
3648
3219
  },
3649
3220
  /**
3650
3221
  * Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. 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 brokerage. 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.
@@ -3654,7 +3225,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3654
3225
  * @throws {RequiredError}
3655
3226
  */
3656
3227
  listBrokerageAuthorizationAccounts(requestParameters, options) {
3657
- return localVarFp.listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(axios$6, basePath));
3228
+ return localVarFp.listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(axios$4, basePath));
3658
3229
  },
3659
3230
  /**
3660
3231
  * Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
@@ -3664,7 +3235,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3664
3235
  * @throws {RequiredError}
3665
3236
  */
3666
3237
  listBrokerageAuthorizations(requestParameters = {}, options) {
3667
- return localVarFp.listBrokerageAuthorizations(requestParameters, options).then((request) => request(axios$6, basePath));
3238
+ return localVarFp.listBrokerageAuthorizations(requestParameters, options).then((request) => request(axios$4, basePath));
3668
3239
  },
3669
3240
  /**
3670
3241
  * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless the connection is delayed. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to the `data_freshness_mode` field on a connection to determine this.**
@@ -3674,17 +3245,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3674
3245
  * @throws {RequiredError}
3675
3246
  */
3676
3247
  refreshBrokerageAuthorization(requestParameters, options) {
3677
- return localVarFp.refreshBrokerageAuthorization(requestParameters, options).then((request) => request(axios$6, basePath));
3678
- },
3679
- /**
3680
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
3681
- * @summary Delete connection
3682
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
3683
- * @param {*} [options] Override http request option.
3684
- * @throws {RequiredError}
3685
- */
3686
- removeBrokerageAuthorization(requestParameters, options) {
3687
- return localVarFp.removeBrokerageAuthorization(requestParameters, options).then((request) => request(axios$6, basePath));
3248
+ return localVarFp.refreshBrokerageAuthorization(requestParameters, options).then((request) => request(axios$4, basePath));
3688
3249
  },
3689
3250
  /**
3690
3251
  * Returns a list of rate of return percents for a given connection.
@@ -3694,17 +3255,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3694
3255
  * @throws {RequiredError}
3695
3256
  */
3696
3257
  returnRates(requestParameters, options) {
3697
- return localVarFp.returnRates(requestParameters, options).then((request) => request(axios$6, basePath));
3698
- },
3699
- /**
3700
- * Returns a list of session events associated with a user.
3701
- * @summary Get all session events for a user
3702
- * @param {ConnectionsApiSessionEventsRequest<TAuth>} requestParameters Request parameters.
3703
- * @param {*} [options] Override http request option.
3704
- * @throws {RequiredError}
3705
- */
3706
- sessionEvents(requestParameters, options) {
3707
- return localVarFp.sessionEvents(requestParameters, options).then((request) => request(axios$6, basePath));
3258
+ return localVarFp.returnRates(requestParameters, options).then((request) => request(axios$4, basePath));
3708
3259
  },
3709
3260
  /**
3710
3261
  * Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
@@ -3714,7 +3265,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
3714
3265
  * @throws {RequiredError}
3715
3266
  */
3716
3267
  syncBrokerageAuthorizationTransactions(requestParameters, options) {
3717
- return localVarFp.syncBrokerageAuthorizationTransactions(requestParameters, options).then((request) => request(axios$6, basePath));
3268
+ return localVarFp.syncBrokerageAuthorizationTransactions(requestParameters, options).then((request) => request(axios$4, basePath));
3718
3269
  }
3719
3270
  };
3720
3271
  };
@@ -3792,17 +3343,6 @@ var ConnectionsApiGenerated = class extends BaseAPI {
3792
3343
  return ConnectionsApiFp(this.configuration).refreshBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
3793
3344
  }
3794
3345
  /**
3795
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
3796
- * @summary Delete connection
3797
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
3798
- * @param {*} [options] Override http request option.
3799
- * @throws {RequiredError}
3800
- * @memberof ConnectionsApiGenerated
3801
- */
3802
- removeBrokerageAuthorization(requestParameters, options) {
3803
- return ConnectionsApiFp(this.configuration).removeBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
3804
- }
3805
- /**
3806
3346
  * Returns a list of rate of return percents for a given connection.
3807
3347
  * @summary List connection rate of returns
3808
3348
  * @param {ConnectionsApiReturnRatesRequest<TAuth>} requestParameters Request parameters.
@@ -3814,17 +3354,6 @@ var ConnectionsApiGenerated = class extends BaseAPI {
3814
3354
  return ConnectionsApiFp(this.configuration).returnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
3815
3355
  }
3816
3356
  /**
3817
- * Returns a list of session events associated with a user.
3818
- * @summary Get all session events for a user
3819
- * @param {ConnectionsApiSessionEventsRequest<TAuth>} requestParameters Request parameters.
3820
- * @param {*} [options] Override http request option.
3821
- * @throws {RequiredError}
3822
- * @memberof ConnectionsApiGenerated
3823
- */
3824
- sessionEvents(requestParameters, options) {
3825
- return ConnectionsApiFp(this.configuration).sessionEvents(requestParameters, options).then((request) => request(this.axios, this.basePath));
3826
- }
3827
- /**
3828
3357
  * Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
3829
3358
  * @summary Sync transactions for a connection
3830
3359
  * @param {ConnectionsApiSyncBrokerageAuthorizationTransactionsRequest<TAuth>} requestParameters Request parameters.
@@ -4221,13 +3750,17 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4221
3750
  };
4222
3751
  },
4223
3752
  /**
4224
- * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4225
- * @summary List active Trade Detection subscriptions
3753
+ * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (currently only `investment` is implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and market value live from the brokerage on each call. 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 brokerage. 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.
3754
+ * @summary List accounts for a connection (discriminated union)
3755
+ * @param {string} authorizationId
3756
+ * @param {string} [userId]
3757
+ * @param {string} [userSecret]
4226
3758
  * @param {*} [options] Override http request option.
4227
3759
  * @throws {RequiredError}
4228
3760
  */
4229
- listSubscriptions: async (options = {}) => {
4230
- const localVarPath = `/snapTrade/tradeDetection/subscriptions`;
3761
+ listConnectionAccounts: async (authorizationId, userId, userSecret, options = {}) => {
3762
+ assertParamExists("listConnectionAccounts", "authorizationId", authorizationId);
3763
+ const localVarPath = `/connections/{authorizationId}/accounts`.replace(`{authorizationId}`, encodeURIComponent(String(authorizationId !== void 0 ? authorizationId : `-authorizationId-`)));
4231
3764
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4232
3765
  let baseOptions;
4233
3766
  if (configuration) baseOptions = configuration.baseOptions;
@@ -4238,12 +3771,16 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4238
3771
  };
4239
3772
  const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4240
3773
  const localVarQueryParameter = {};
4241
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4242
- object: localVarQueryParameter,
4243
- key: "clientId",
4244
- keyParamName: "clientId",
4245
- configuration
4246
- });
3774
+ if (configuration?.authMode === "commercialApiKey") {
3775
+ await setApiKeyToObject({
3776
+ object: localVarQueryParameter,
3777
+ key: "clientId",
3778
+ keyParamName: "clientId",
3779
+ configuration
3780
+ });
3781
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3782
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3783
+ }
4247
3784
  if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4248
3785
  object: localVarQueryParameter,
4249
3786
  key: "clientId",
@@ -4275,7 +3812,7 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4275
3812
  requestConfig: localVarRequestOptions,
4276
3813
  path: localVarPath,
4277
3814
  configuration,
4278
- pathTemplate: "/snapTrade/tradeDetection/subscriptions",
3815
+ pathTemplate: "/connections/{authorizationId}/accounts",
4279
3816
  httpMethod: "GET",
4280
3817
  operationAuth: localVarOperationAuth
4281
3818
  });
@@ -4284,46 +3821,111 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4284
3821
  url: toPathString(localVarUrlObj),
4285
3822
  options: localVarRequestOptions
4286
3823
  };
4287
- }
4288
- };
4289
- };
4290
- /**
4291
- * ExperimentalEndpointsApi - functional programming interface
4292
- * @export
4293
- */
4294
- const ExperimentalEndpointsApiFp = function(configuration) {
4295
- const localVarAxiosParamCreator = ExperimentalEndpointsApiAxiosParamCreator(configuration);
4296
- return {
4297
- /**
4298
- * Adds or restores a Trade Detection subscription for a connected brokerage account. This endpoint requires `userId` and `userSecret` in addition to the partner signature.
4299
- * @summary Add a Trade Detection subscription
4300
- * @param {ExperimentalEndpointsApiAddSubscriptionRequest<TAuth>} requestParameters Request parameters.
4301
- * @param {*} [options] Override http request option.
4302
- * @throws {RequiredError}
4303
- */
4304
- async addSubscription(requestParameters, options) {
4305
- const tradeDetectionAddSubscriptionRequest = {
4306
- account_id: requestParameters.account_id,
4307
- check_interval_seconds: requestParameters.check_interval_seconds
4308
- };
4309
- return createRequestFunction(await localVarAxiosParamCreator.addSubscription(tradeDetectionAddSubscriptionRequest, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4310
- authModes: ["commercialApiKey", "personalApiKey"],
4311
- requestSigningByAuthMode: {
4312
- "commercialApiKey": {
4313
- secretParameter: "consumerKey",
4314
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4315
- },
4316
- "personalApiKey": {
4317
- secretParameter: "consumerKey",
4318
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4319
- }
4320
- }
4321
- });
4322
3824
  },
4323
3825
  /**
4324
- * Cancels a Trade Detection subscription for a connected brokerage account. This endpoint requires partner signature authentication only and does not require `userId` or `userSecret`.
4325
- * @summary Cancel a Trade Detection subscription
4326
- * @param {ExperimentalEndpointsApiCancelSubscriptionRequest<TAuth>} requestParameters Request parameters.
3826
+ * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
3827
+ * @summary List active Trade Detection subscriptions
3828
+ * @param {*} [options] Override http request option.
3829
+ * @throws {RequiredError}
3830
+ */
3831
+ listSubscriptions: async (options = {}) => {
3832
+ const localVarPath = `/snapTrade/tradeDetection/subscriptions`;
3833
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3834
+ let baseOptions;
3835
+ if (configuration) baseOptions = configuration.baseOptions;
3836
+ const localVarRequestOptions = {
3837
+ method: "GET",
3838
+ ...baseOptions,
3839
+ ...options
3840
+ };
3841
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3842
+ const localVarQueryParameter = {};
3843
+ if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
3844
+ object: localVarQueryParameter,
3845
+ key: "clientId",
3846
+ keyParamName: "clientId",
3847
+ configuration
3848
+ });
3849
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3850
+ object: localVarQueryParameter,
3851
+ key: "clientId",
3852
+ keyParamName: "clientId",
3853
+ configuration
3854
+ });
3855
+ const localVarOperationAuth = {
3856
+ authModes: ["commercialApiKey", "personalApiKey"],
3857
+ requestSigningByAuthMode: {
3858
+ "commercialApiKey": {
3859
+ secretParameter: "consumerKey",
3860
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3861
+ },
3862
+ "personalApiKey": {
3863
+ secretParameter: "consumerKey",
3864
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3865
+ }
3866
+ },
3867
+ selectedAuthMode: configuration?.authMode
3868
+ };
3869
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3870
+ localVarRequestOptions.headers = {
3871
+ ...localVarHeaderParameter,
3872
+ ...headersFromBaseOptions,
3873
+ ...options.headers
3874
+ };
3875
+ requestBeforeHook({
3876
+ queryParameters: localVarQueryParameter,
3877
+ requestConfig: localVarRequestOptions,
3878
+ path: localVarPath,
3879
+ configuration,
3880
+ pathTemplate: "/snapTrade/tradeDetection/subscriptions",
3881
+ httpMethod: "GET",
3882
+ operationAuth: localVarOperationAuth
3883
+ });
3884
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3885
+ return {
3886
+ url: toPathString(localVarUrlObj),
3887
+ options: localVarRequestOptions
3888
+ };
3889
+ }
3890
+ };
3891
+ };
3892
+ /**
3893
+ * ExperimentalEndpointsApi - functional programming interface
3894
+ * @export
3895
+ */
3896
+ const ExperimentalEndpointsApiFp = function(configuration) {
3897
+ const localVarAxiosParamCreator = ExperimentalEndpointsApiAxiosParamCreator(configuration);
3898
+ return {
3899
+ /**
3900
+ * Adds or restores a Trade Detection subscription for a connected brokerage account. This endpoint requires `userId` and `userSecret` in addition to the partner signature.
3901
+ * @summary Add a Trade Detection subscription
3902
+ * @param {ExperimentalEndpointsApiAddSubscriptionRequest<TAuth>} requestParameters Request parameters.
3903
+ * @param {*} [options] Override http request option.
3904
+ * @throws {RequiredError}
3905
+ */
3906
+ async addSubscription(requestParameters, options) {
3907
+ const tradeDetectionAddSubscriptionRequest = {
3908
+ account_id: requestParameters.account_id,
3909
+ check_interval_seconds: requestParameters.check_interval_seconds
3910
+ };
3911
+ return createRequestFunction(await localVarAxiosParamCreator.addSubscription(tradeDetectionAddSubscriptionRequest, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
3912
+ authModes: ["commercialApiKey", "personalApiKey"],
3913
+ requestSigningByAuthMode: {
3914
+ "commercialApiKey": {
3915
+ secretParameter: "consumerKey",
3916
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3917
+ },
3918
+ "personalApiKey": {
3919
+ secretParameter: "consumerKey",
3920
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3921
+ }
3922
+ }
3923
+ });
3924
+ },
3925
+ /**
3926
+ * Cancels a Trade Detection subscription for a connected brokerage account. This endpoint requires partner signature authentication only and does not require `userId` or `userSecret`.
3927
+ * @summary Cancel a Trade Detection subscription
3928
+ * @param {ExperimentalEndpointsApiCancelSubscriptionRequest<TAuth>} requestParameters Request parameters.
4327
3929
  * @param {*} [options] Override http request option.
4328
3930
  * @throws {RequiredError}
4329
3931
  */
@@ -4410,6 +4012,28 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4410
4012
  });
4411
4013
  },
4412
4014
  /**
4015
+ * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (currently only `investment` is implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and market value live from the brokerage on each call. 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 brokerage. 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.
4016
+ * @summary List accounts for a connection (discriminated union)
4017
+ * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4018
+ * @param {*} [options] Override http request option.
4019
+ * @throws {RequiredError}
4020
+ */
4021
+ async listConnectionAccounts(requestParameters, options) {
4022
+ return createRequestFunction(await localVarAxiosParamCreator.listConnectionAccounts(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4023
+ authModes: ["commercialApiKey", "personalApiKey"],
4024
+ requestSigningByAuthMode: {
4025
+ "commercialApiKey": {
4026
+ secretParameter: "consumerKey",
4027
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4028
+ },
4029
+ "personalApiKey": {
4030
+ secretParameter: "consumerKey",
4031
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4032
+ }
4033
+ }
4034
+ });
4035
+ },
4036
+ /**
4413
4037
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4414
4038
  * @summary List active Trade Detection subscriptions
4415
4039
  * @param {*} [options] Override http request option.
@@ -4437,7 +4061,7 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4437
4061
  * ExperimentalEndpointsApi - factory interface
4438
4062
  * @export
4439
4063
  */
4440
- const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$5) {
4064
+ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$3) {
4441
4065
  const localVarFp = ExperimentalEndpointsApiFp(configuration);
4442
4066
  return {
4443
4067
  /**
@@ -4448,7 +4072,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4448
4072
  * @throws {RequiredError}
4449
4073
  */
4450
4074
  addSubscription(requestParameters, options) {
4451
- return localVarFp.addSubscription(requestParameters, options).then((request) => request(axios$5, basePath));
4075
+ return localVarFp.addSubscription(requestParameters, options).then((request) => request(axios$3, basePath));
4452
4076
  },
4453
4077
  /**
4454
4078
  * Cancels a Trade Detection subscription for a connected brokerage account. This endpoint requires partner signature authentication only and does not require `userId` or `userSecret`.
@@ -4458,7 +4082,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4458
4082
  * @throws {RequiredError}
4459
4083
  */
4460
4084
  cancelSubscription(requestParameters, options) {
4461
- return localVarFp.cancelSubscription(requestParameters, options).then((request) => request(axios$5, basePath));
4085
+ return localVarFp.cancelSubscription(requestParameters, options).then((request) => request(axios$3, basePath));
4462
4086
  },
4463
4087
  /**
4464
4088
  * 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.
@@ -4468,7 +4092,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4468
4092
  * @throws {RequiredError}
4469
4093
  */
4470
4094
  getUserAccountOrderDetailV2(requestParameters, options) {
4471
- return localVarFp.getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(axios$5, basePath));
4095
+ return localVarFp.getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(axios$3, basePath));
4472
4096
  },
4473
4097
  /**
4474
4098
  * Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
@@ -4478,7 +4102,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4478
4102
  * @throws {RequiredError}
4479
4103
  */
4480
4104
  getUserAccountOrdersV2(requestParameters, options) {
4481
- return localVarFp.getUserAccountOrdersV2(requestParameters, options).then((request) => request(axios$5, basePath));
4105
+ return localVarFp.getUserAccountOrdersV2(requestParameters, options).then((request) => request(axios$3, basePath));
4482
4106
  },
4483
4107
  /**
4484
4108
  * A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
@@ -4488,7 +4112,17 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4488
4112
  * @throws {RequiredError}
4489
4113
  */
4490
4114
  getUserAccountRecentOrdersV2(requestParameters, options) {
4491
- return localVarFp.getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(axios$5, basePath));
4115
+ return localVarFp.getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(axios$3, basePath));
4116
+ },
4117
+ /**
4118
+ * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (currently only `investment` is implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and market value live from the brokerage on each call. 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 brokerage. 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.
4119
+ * @summary List accounts for a connection (discriminated union)
4120
+ * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4121
+ * @param {*} [options] Override http request option.
4122
+ * @throws {RequiredError}
4123
+ */
4124
+ listConnectionAccounts(requestParameters, options) {
4125
+ return localVarFp.listConnectionAccounts(requestParameters, options).then((request) => request(axios$3, basePath));
4492
4126
  },
4493
4127
  /**
4494
4128
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
@@ -4497,7 +4131,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4497
4131
  * @throws {RequiredError}
4498
4132
  */
4499
4133
  listSubscriptions(...args) {
4500
- return localVarFp.listSubscriptions(...args).then((request) => request(axios$5, basePath));
4134
+ return localVarFp.listSubscriptions(...args).then((request) => request(axios$3, basePath));
4501
4135
  }
4502
4136
  };
4503
4137
  };
@@ -4541,346 +4175,69 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4541
4175
  getUserAccountOrderDetailV2(requestParameters, options) {
4542
4176
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4543
4177
  }
4544
- /**
4545
- * Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
4546
- * @summary List account orders v2
4547
- * @param {ExperimentalEndpointsApiGetUserAccountOrdersV2Request<TAuth>} requestParameters Request parameters.
4548
- * @param {*} [options] Override http request option.
4549
- * @throws {RequiredError}
4550
- * @memberof ExperimentalEndpointsApiGenerated
4551
- */
4552
- getUserAccountOrdersV2(requestParameters, options) {
4553
- return ExperimentalEndpointsApiFp(this.configuration).getUserAccountOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4554
- }
4555
- /**
4556
- * A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
4557
- * @summary List account recent orders (V2, last 24 hours only)
4558
- * @param {ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request<TAuth>} requestParameters Request parameters.
4559
- * @param {*} [options] Override http request option.
4560
- * @throws {RequiredError}
4561
- * @memberof ExperimentalEndpointsApiGenerated
4562
- */
4563
- getUserAccountRecentOrdersV2(requestParameters, options) {
4564
- return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4565
- }
4566
- /**
4567
- * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4568
- * @summary List active Trade Detection subscriptions
4569
- * @param {*} [options] Override http request option.
4570
- * @throws {RequiredError}
4571
- * @memberof ExperimentalEndpointsApiGenerated
4572
- */
4573
- listSubscriptions(...args) {
4574
- return ExperimentalEndpointsApiFp(this.configuration).listSubscriptions(...args).then((request) => request(this.axios, this.basePath));
4575
- }
4576
- };
4577
- //#endregion
4578
- //#region api/experimental-endpoints-api.ts
4579
- var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {};
4580
- //#endregion
4581
- //#region api/options-api-generated.ts
4582
- /**
4583
- * OptionsApi - axios parameter creator
4584
- * @export
4585
- */
4586
- const OptionsApiAxiosParamCreator = function(configuration) {
4587
- return {
4588
- /**
4589
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). 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.
4590
- * @summary List account option positions
4591
- * @param {string} accountId
4592
- * @param {string} [userId]
4593
- * @param {string} [userSecret]
4594
- * @param {*} [options] Override http request option.
4595
- * @deprecated
4596
- * @throws {RequiredError}
4597
- */
4598
- listOptionHoldings: async (accountId, userId, userSecret, options = {}) => {
4599
- assertParamExists("listOptionHoldings", "accountId", accountId);
4600
- const localVarPath = `/accounts/{accountId}/options`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4601
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4602
- let baseOptions;
4603
- if (configuration) baseOptions = configuration.baseOptions;
4604
- const localVarRequestOptions = {
4605
- method: "GET",
4606
- ...baseOptions,
4607
- ...options
4608
- };
4609
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4610
- const localVarQueryParameter = {};
4611
- if (configuration?.authMode === "commercialApiKey") {
4612
- await setApiKeyToObject({
4613
- object: localVarQueryParameter,
4614
- key: "clientId",
4615
- keyParamName: "clientId",
4616
- configuration
4617
- });
4618
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4619
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4620
- }
4621
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4622
- object: localVarQueryParameter,
4623
- key: "clientId",
4624
- keyParamName: "clientId",
4625
- configuration
4626
- });
4627
- const localVarOperationAuth = {
4628
- authModes: ["commercialApiKey", "personalApiKey"],
4629
- requestSigningByAuthMode: {
4630
- "commercialApiKey": {
4631
- secretParameter: "consumerKey",
4632
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4633
- },
4634
- "personalApiKey": {
4635
- secretParameter: "consumerKey",
4636
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4637
- }
4638
- },
4639
- selectedAuthMode: configuration?.authMode
4640
- };
4641
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4642
- localVarRequestOptions.headers = {
4643
- ...localVarHeaderParameter,
4644
- ...headersFromBaseOptions,
4645
- ...options.headers
4646
- };
4647
- requestBeforeHook({
4648
- queryParameters: localVarQueryParameter,
4649
- requestConfig: localVarRequestOptions,
4650
- path: localVarPath,
4651
- configuration,
4652
- pathTemplate: "/accounts/{accountId}/options",
4653
- httpMethod: "GET",
4654
- operationAuth: localVarOperationAuth
4655
- });
4656
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4657
- return {
4658
- url: toPathString(localVarUrlObj),
4659
- options: localVarRequestOptions
4660
- };
4661
- } };
4662
- };
4663
- /**
4664
- * OptionsApi - functional programming interface
4665
- * @export
4666
- */
4667
- const OptionsApiFp = function(configuration) {
4668
- const localVarAxiosParamCreator = OptionsApiAxiosParamCreator(configuration);
4669
- return {
4670
- /**
4671
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). 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.
4672
- * @summary List account option positions
4673
- * @param {OptionsApiListOptionHoldingsRequest<TAuth>} requestParameters Request parameters.
4674
- * @param {*} [options] Override http request option.
4675
- * @deprecated
4676
- * @throws {RequiredError}
4677
- */
4678
- async listOptionHoldings(requestParameters, options) {
4679
- return createRequestFunction(await localVarAxiosParamCreator.listOptionHoldings(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4680
- authModes: ["commercialApiKey", "personalApiKey"],
4681
- requestSigningByAuthMode: {
4682
- "commercialApiKey": {
4683
- secretParameter: "consumerKey",
4684
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4685
- },
4686
- "personalApiKey": {
4687
- secretParameter: "consumerKey",
4688
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4689
- }
4690
- }
4691
- });
4692
- } };
4693
- };
4694
- /**
4695
- * OptionsApi - factory interface
4696
- * @export
4697
- */
4698
- const OptionsApiFactory = function(configuration, basePath, axios$4) {
4699
- const localVarFp = OptionsApiFp(configuration);
4700
- return {
4701
- /**
4702
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). 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.
4703
- * @summary List account option positions
4704
- * @param {OptionsApiListOptionHoldingsRequest<TAuth>} requestParameters Request parameters.
4705
- * @param {*} [options] Override http request option.
4706
- * @deprecated
4707
- * @throws {RequiredError}
4708
- */
4709
- listOptionHoldings(requestParameters, options) {
4710
- return localVarFp.listOptionHoldings(requestParameters, options).then((request) => request(axios$4, basePath));
4711
- } };
4712
- };
4713
- /**
4714
- * OptionsApiGenerated - object-oriented interface
4715
- * @export
4716
- * @class OptionsApiGenerated
4717
- * @extends {BaseAPI}
4718
- */
4719
- var OptionsApiGenerated = class extends BaseAPI {
4720
- /**
4721
- * **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). 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.
4722
- * @summary List account option positions
4723
- * @param {OptionsApiListOptionHoldingsRequest<TAuth>} requestParameters Request parameters.
4724
- * @param {*} [options] Override http request option.
4725
- * @deprecated
4726
- * @throws {RequiredError}
4727
- * @memberof OptionsApiGenerated
4728
- */
4729
- listOptionHoldings(requestParameters, options) {
4730
- return OptionsApiFp(this.configuration).listOptionHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
4731
- }
4732
- };
4733
- //#endregion
4734
- //#region api/options-api.ts
4735
- var OptionsApi = class extends OptionsApiGenerated {};
4736
- //#endregion
4737
- //#region api/reference-data-api-generated.ts
4738
- /**
4739
- * ReferenceDataApi - axios parameter creator
4740
- * @export
4741
- */
4742
- const ReferenceDataApiAxiosParamCreator = function(configuration) {
4743
- return {
4744
- /**
4745
- * Returns an Exchange Rate Pair object for the specified Currency Pair.
4746
- * @summary Get exchange rate of a currency pair
4747
- * @param {string} currencyPair A currency pair based on currency code for example, {CAD-USD}
4748
- * @param {*} [options] Override http request option.
4749
- * @throws {RequiredError}
4750
- */
4751
- getCurrencyExchangeRatePair: async (currencyPair, options = {}) => {
4752
- assertParamExists("getCurrencyExchangeRatePair", "currencyPair", currencyPair);
4753
- const localVarPath = `/currencies/rates/{currencyPair}`.replace(`{currencyPair}`, encodeURIComponent(String(currencyPair !== void 0 ? currencyPair : `-currencyPair-`)));
4754
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4755
- let baseOptions;
4756
- if (configuration) baseOptions = configuration.baseOptions;
4757
- const localVarRequestOptions = {
4758
- method: "GET",
4759
- ...baseOptions,
4760
- ...options
4761
- };
4762
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4763
- const localVarQueryParameter = {};
4764
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4765
- object: localVarQueryParameter,
4766
- key: "clientId",
4767
- keyParamName: "clientId",
4768
- configuration
4769
- });
4770
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4771
- object: localVarQueryParameter,
4772
- key: "clientId",
4773
- keyParamName: "clientId",
4774
- configuration
4775
- });
4776
- const localVarOperationAuth = {
4777
- authModes: ["commercialApiKey", "personalApiKey"],
4778
- requestSigningByAuthMode: {
4779
- "commercialApiKey": {
4780
- secretParameter: "consumerKey",
4781
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4782
- },
4783
- "personalApiKey": {
4784
- secretParameter: "consumerKey",
4785
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4786
- }
4787
- },
4788
- selectedAuthMode: configuration?.authMode
4789
- };
4790
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4791
- localVarRequestOptions.headers = {
4792
- ...localVarHeaderParameter,
4793
- ...headersFromBaseOptions,
4794
- ...options.headers
4795
- };
4796
- requestBeforeHook({
4797
- queryParameters: localVarQueryParameter,
4798
- requestConfig: localVarRequestOptions,
4799
- path: localVarPath,
4800
- configuration,
4801
- pathTemplate: "/currencies/rates/{currencyPair}",
4802
- httpMethod: "GET",
4803
- operationAuth: localVarOperationAuth
4804
- });
4805
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4806
- return {
4807
- url: toPathString(localVarUrlObj),
4808
- options: localVarRequestOptions
4809
- };
4810
- },
4811
- /**
4812
- * Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
4813
- * @summary Get Client Info
4814
- * @param {*} [options] Override http request option.
4815
- * @throws {RequiredError}
4816
- */
4817
- getPartnerInfo: async (options = {}) => {
4818
- const localVarPath = `/snapTrade/partners`;
4819
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4820
- let baseOptions;
4821
- if (configuration) baseOptions = configuration.baseOptions;
4822
- const localVarRequestOptions = {
4823
- method: "GET",
4824
- ...baseOptions,
4825
- ...options
4826
- };
4827
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4828
- const localVarQueryParameter = {};
4829
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4830
- object: localVarQueryParameter,
4831
- key: "clientId",
4832
- keyParamName: "clientId",
4833
- configuration
4834
- });
4835
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4836
- object: localVarQueryParameter,
4837
- key: "clientId",
4838
- keyParamName: "clientId",
4839
- configuration
4840
- });
4841
- const localVarOperationAuth = {
4842
- authModes: ["commercialApiKey", "personalApiKey"],
4843
- requestSigningByAuthMode: {
4844
- "commercialApiKey": {
4845
- secretParameter: "consumerKey",
4846
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4847
- },
4848
- "personalApiKey": {
4849
- secretParameter: "consumerKey",
4850
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4851
- }
4852
- },
4853
- selectedAuthMode: configuration?.authMode
4854
- };
4855
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4856
- localVarRequestOptions.headers = {
4857
- ...localVarHeaderParameter,
4858
- ...headersFromBaseOptions,
4859
- ...options.headers
4860
- };
4861
- requestBeforeHook({
4862
- queryParameters: localVarQueryParameter,
4863
- requestConfig: localVarRequestOptions,
4864
- path: localVarPath,
4865
- configuration,
4866
- pathTemplate: "/snapTrade/partners",
4867
- httpMethod: "GET",
4868
- operationAuth: localVarOperationAuth
4869
- });
4870
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4871
- return {
4872
- url: toPathString(localVarUrlObj),
4873
- options: localVarRequestOptions
4874
- };
4875
- },
4178
+ /**
4179
+ * Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
4180
+ * @summary List account orders v2
4181
+ * @param {ExperimentalEndpointsApiGetUserAccountOrdersV2Request<TAuth>} requestParameters Request parameters.
4182
+ * @param {*} [options] Override http request option.
4183
+ * @throws {RequiredError}
4184
+ * @memberof ExperimentalEndpointsApiGenerated
4185
+ */
4186
+ getUserAccountOrdersV2(requestParameters, options) {
4187
+ return ExperimentalEndpointsApiFp(this.configuration).getUserAccountOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4188
+ }
4189
+ /**
4190
+ * A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
4191
+ * @summary List account recent orders (V2, last 24 hours only)
4192
+ * @param {ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request<TAuth>} requestParameters Request parameters.
4193
+ * @param {*} [options] Override http request option.
4194
+ * @throws {RequiredError}
4195
+ * @memberof ExperimentalEndpointsApiGenerated
4196
+ */
4197
+ getUserAccountRecentOrdersV2(requestParameters, options) {
4198
+ return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4199
+ }
4200
+ /**
4201
+ * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (currently only `investment` is implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and market value live from the brokerage on each call. 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 brokerage. 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.
4202
+ * @summary List accounts for a connection (discriminated union)
4203
+ * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4204
+ * @param {*} [options] Override http request option.
4205
+ * @throws {RequiredError}
4206
+ * @memberof ExperimentalEndpointsApiGenerated
4207
+ */
4208
+ listConnectionAccounts(requestParameters, options) {
4209
+ return ExperimentalEndpointsApiFp(this.configuration).listConnectionAccounts(requestParameters, options).then((request) => request(this.axios, this.basePath));
4210
+ }
4211
+ /**
4212
+ * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4213
+ * @summary List active Trade Detection subscriptions
4214
+ * @param {*} [options] Override http request option.
4215
+ * @throws {RequiredError}
4216
+ * @memberof ExperimentalEndpointsApiGenerated
4217
+ */
4218
+ listSubscriptions(...args) {
4219
+ return ExperimentalEndpointsApiFp(this.configuration).listSubscriptions(...args).then((request) => request(this.axios, this.basePath));
4220
+ }
4221
+ };
4222
+ //#endregion
4223
+ //#region api/experimental-endpoints-api.ts
4224
+ var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {};
4225
+ //#endregion
4226
+ //#region api/reference-data-api-generated.ts
4227
+ /**
4228
+ * ReferenceDataApi - axios parameter creator
4229
+ * @export
4230
+ */
4231
+ const ReferenceDataApiAxiosParamCreator = function(configuration) {
4232
+ return {
4876
4233
  /**
4877
- * Return all available security types supported by SnapTrade.
4878
- * @summary List security types
4234
+ * Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
4235
+ * @summary Get Client Info
4879
4236
  * @param {*} [options] Override http request option.
4880
4237
  * @throws {RequiredError}
4881
4238
  */
4882
- getSecurityTypes: async (options = {}) => {
4883
- const localVarPath = `/securityTypes`;
4239
+ getPartnerInfo: async (options = {}) => {
4240
+ const localVarPath = `/snapTrade/partners`;
4884
4241
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4885
4242
  let baseOptions;
4886
4243
  if (configuration) baseOptions = configuration.baseOptions;
@@ -4928,7 +4285,7 @@ const ReferenceDataApiAxiosParamCreator = function(configuration) {
4928
4285
  requestConfig: localVarRequestOptions,
4929
4286
  path: localVarPath,
4930
4287
  configuration,
4931
- pathTemplate: "/securityTypes",
4288
+ pathTemplate: "/snapTrade/partners",
4932
4289
  httpMethod: "GET",
4933
4290
  operationAuth: localVarOperationAuth
4934
4291
  });
@@ -5339,136 +4696,6 @@ const ReferenceDataApiAxiosParamCreator = function(configuration) {
5339
4696
  };
5340
4697
  },
5341
4698
  /**
5342
- * Returns a list of all defined Currency objects.
5343
- * @summary Get currencies
5344
- * @param {*} [options] Override http request option.
5345
- * @throws {RequiredError}
5346
- */
5347
- listAllCurrencies: async (options = {}) => {
5348
- const localVarPath = `/currencies`;
5349
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5350
- let baseOptions;
5351
- if (configuration) baseOptions = configuration.baseOptions;
5352
- const localVarRequestOptions = {
5353
- method: "GET",
5354
- ...baseOptions,
5355
- ...options
5356
- };
5357
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
5358
- const localVarQueryParameter = {};
5359
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
5360
- object: localVarQueryParameter,
5361
- key: "clientId",
5362
- keyParamName: "clientId",
5363
- configuration
5364
- });
5365
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
5366
- object: localVarQueryParameter,
5367
- key: "clientId",
5368
- keyParamName: "clientId",
5369
- configuration
5370
- });
5371
- const localVarOperationAuth = {
5372
- authModes: ["commercialApiKey", "personalApiKey"],
5373
- requestSigningByAuthMode: {
5374
- "commercialApiKey": {
5375
- secretParameter: "consumerKey",
5376
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5377
- },
5378
- "personalApiKey": {
5379
- secretParameter: "consumerKey",
5380
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5381
- }
5382
- },
5383
- selectedAuthMode: configuration?.authMode
5384
- };
5385
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5386
- localVarRequestOptions.headers = {
5387
- ...localVarHeaderParameter,
5388
- ...headersFromBaseOptions,
5389
- ...options.headers
5390
- };
5391
- requestBeforeHook({
5392
- queryParameters: localVarQueryParameter,
5393
- requestConfig: localVarRequestOptions,
5394
- path: localVarPath,
5395
- configuration,
5396
- pathTemplate: "/currencies",
5397
- httpMethod: "GET",
5398
- operationAuth: localVarOperationAuth
5399
- });
5400
- setSearchParams(localVarUrlObj, localVarQueryParameter);
5401
- return {
5402
- url: toPathString(localVarUrlObj),
5403
- options: localVarRequestOptions
5404
- };
5405
- },
5406
- /**
5407
- * Returns a list of all Exchange Rate Pairs for all supported Currencies.
5408
- * @summary Get currency exchange rates
5409
- * @param {*} [options] Override http request option.
5410
- * @throws {RequiredError}
5411
- */
5412
- listAllCurrenciesRates: async (options = {}) => {
5413
- const localVarPath = `/currencies/rates`;
5414
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5415
- let baseOptions;
5416
- if (configuration) baseOptions = configuration.baseOptions;
5417
- const localVarRequestOptions = {
5418
- method: "GET",
5419
- ...baseOptions,
5420
- ...options
5421
- };
5422
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
5423
- const localVarQueryParameter = {};
5424
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
5425
- object: localVarQueryParameter,
5426
- key: "clientId",
5427
- keyParamName: "clientId",
5428
- configuration
5429
- });
5430
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
5431
- object: localVarQueryParameter,
5432
- key: "clientId",
5433
- keyParamName: "clientId",
5434
- configuration
5435
- });
5436
- const localVarOperationAuth = {
5437
- authModes: ["commercialApiKey", "personalApiKey"],
5438
- requestSigningByAuthMode: {
5439
- "commercialApiKey": {
5440
- secretParameter: "consumerKey",
5441
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5442
- },
5443
- "personalApiKey": {
5444
- secretParameter: "consumerKey",
5445
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5446
- }
5447
- },
5448
- selectedAuthMode: configuration?.authMode
5449
- };
5450
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5451
- localVarRequestOptions.headers = {
5452
- ...localVarHeaderParameter,
5453
- ...headersFromBaseOptions,
5454
- ...options.headers
5455
- };
5456
- requestBeforeHook({
5457
- queryParameters: localVarQueryParameter,
5458
- requestConfig: localVarRequestOptions,
5459
- path: localVarPath,
5460
- configuration,
5461
- pathTemplate: "/currencies/rates",
5462
- httpMethod: "GET",
5463
- operationAuth: localVarOperationAuth
5464
- });
5465
- setSearchParams(localVarUrlObj, localVarQueryParameter);
5466
- return {
5467
- url: toPathString(localVarUrlObj),
5468
- options: localVarRequestOptions
5469
- };
5470
- },
5471
- /**
5472
4699
  * Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
5473
4700
  * @summary Search account symbols
5474
4701
  * @param {string} accountId
@@ -5554,28 +4781,6 @@ const ReferenceDataApiAxiosParamCreator = function(configuration) {
5554
4781
  const ReferenceDataApiFp = function(configuration) {
5555
4782
  const localVarAxiosParamCreator = ReferenceDataApiAxiosParamCreator(configuration);
5556
4783
  return {
5557
- /**
5558
- * Returns an Exchange Rate Pair object for the specified Currency Pair.
5559
- * @summary Get exchange rate of a currency pair
5560
- * @param {ReferenceDataApiGetCurrencyExchangeRatePairRequest<TAuth>} requestParameters Request parameters.
5561
- * @param {*} [options] Override http request option.
5562
- * @throws {RequiredError}
5563
- */
5564
- async getCurrencyExchangeRatePair(requestParameters, options) {
5565
- return createRequestFunction(await localVarAxiosParamCreator.getCurrencyExchangeRatePair(requestParameters.currencyPair, options), axios.default, BASE_PATH, configuration, {
5566
- authModes: ["commercialApiKey", "personalApiKey"],
5567
- requestSigningByAuthMode: {
5568
- "commercialApiKey": {
5569
- secretParameter: "consumerKey",
5570
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5571
- },
5572
- "personalApiKey": {
5573
- secretParameter: "consumerKey",
5574
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5575
- }
5576
- }
5577
- });
5578
- },
5579
4784
  /**
5580
4785
  * Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
5581
4786
  * @summary Get Client Info
@@ -5599,28 +4804,6 @@ const ReferenceDataApiFp = function(configuration) {
5599
4804
  });
5600
4805
  },
5601
4806
  /**
5602
- * Return all available security types supported by SnapTrade.
5603
- * @summary List security types
5604
- * @param {*} [options] Override http request option.
5605
- * @throws {RequiredError}
5606
- */
5607
- async getSecurityTypes(...args) {
5608
- const [options] = args;
5609
- return createRequestFunction(await localVarAxiosParamCreator.getSecurityTypes(options), axios.default, BASE_PATH, configuration, {
5610
- authModes: ["commercialApiKey", "personalApiKey"],
5611
- requestSigningByAuthMode: {
5612
- "commercialApiKey": {
5613
- secretParameter: "consumerKey",
5614
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5615
- },
5616
- "personalApiKey": {
5617
- secretParameter: "consumerKey",
5618
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5619
- }
5620
- }
5621
- });
5622
- },
5623
- /**
5624
4807
  * Returns a list of all supported Exchanges.
5625
4808
  * @summary Get exchanges
5626
4809
  * @param {*} [options] Override http request option.
@@ -5672,52 +4855,8 @@ const ReferenceDataApiFp = function(configuration) {
5672
4855
  * @param {*} [options] Override http request option.
5673
4856
  * @throws {RequiredError}
5674
4857
  */
5675
- async getSymbolsByTicker(requestParameters, options) {
5676
- return createRequestFunction(await localVarAxiosParamCreator.getSymbolsByTicker(requestParameters.query, options), axios.default, BASE_PATH, configuration, {
5677
- authModes: ["commercialApiKey", "personalApiKey"],
5678
- requestSigningByAuthMode: {
5679
- "commercialApiKey": {
5680
- secretParameter: "consumerKey",
5681
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5682
- },
5683
- "personalApiKey": {
5684
- secretParameter: "consumerKey",
5685
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5686
- }
5687
- }
5688
- });
5689
- },
5690
- /**
5691
- * Returns a list of all defined Brokerage authorization Type objects.
5692
- * @summary Get all brokerage authorization types
5693
- * @param {ReferenceDataApiListAllBrokerageAuthorizationTypeRequest<TAuth>} requestParameters Request parameters.
5694
- * @param {*} [options] Override http request option.
5695
- * @throws {RequiredError}
5696
- */
5697
- async listAllBrokerageAuthorizationType(requestParameters = {}, options) {
5698
- return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerageAuthorizationType(requestParameters.brokerage, options), axios.default, BASE_PATH, configuration, {
5699
- authModes: ["commercialApiKey", "personalApiKey"],
5700
- requestSigningByAuthMode: {
5701
- "commercialApiKey": {
5702
- secretParameter: "consumerKey",
5703
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
5704
- },
5705
- "personalApiKey": {
5706
- secretParameter: "consumerKey",
5707
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
5708
- }
5709
- }
5710
- });
5711
- },
5712
- /**
5713
- * Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don\'t will return an empty list.
5714
- * @summary Get brokerage instruments
5715
- * @param {ReferenceDataApiListAllBrokerageInstrumentsRequest<TAuth>} requestParameters Request parameters.
5716
- * @param {*} [options] Override http request option.
5717
- * @throws {RequiredError}
5718
- */
5719
- async listAllBrokerageInstruments(requestParameters, options) {
5720
- return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerageInstruments(requestParameters.slug, options), axios.default, BASE_PATH, configuration, {
4858
+ async getSymbolsByTicker(requestParameters, options) {
4859
+ return createRequestFunction(await localVarAxiosParamCreator.getSymbolsByTicker(requestParameters.query, options), axios.default, BASE_PATH, configuration, {
5721
4860
  authModes: ["commercialApiKey", "personalApiKey"],
5722
4861
  requestSigningByAuthMode: {
5723
4862
  "commercialApiKey": {
@@ -5732,14 +4871,14 @@ const ReferenceDataApiFp = function(configuration) {
5732
4871
  });
5733
4872
  },
5734
4873
  /**
5735
- * Returns a list of all defined Brokerage objects.
5736
- * @summary Get brokerages
4874
+ * Returns a list of all defined Brokerage authorization Type objects.
4875
+ * @summary Get all brokerage authorization types
4876
+ * @param {ReferenceDataApiListAllBrokerageAuthorizationTypeRequest<TAuth>} requestParameters Request parameters.
5737
4877
  * @param {*} [options] Override http request option.
5738
4878
  * @throws {RequiredError}
5739
4879
  */
5740
- async listAllBrokerages(...args) {
5741
- const [options] = args;
5742
- return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerages(options), axios.default, BASE_PATH, configuration, {
4880
+ async listAllBrokerageAuthorizationType(requestParameters = {}, options) {
4881
+ return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerageAuthorizationType(requestParameters.brokerage, options), axios.default, BASE_PATH, configuration, {
5743
4882
  authModes: ["commercialApiKey", "personalApiKey"],
5744
4883
  requestSigningByAuthMode: {
5745
4884
  "commercialApiKey": {
@@ -5754,14 +4893,14 @@ const ReferenceDataApiFp = function(configuration) {
5754
4893
  });
5755
4894
  },
5756
4895
  /**
5757
- * Returns a list of all defined Currency objects.
5758
- * @summary Get currencies
4896
+ * Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don\'t will return an empty list.
4897
+ * @summary Get brokerage instruments
4898
+ * @param {ReferenceDataApiListAllBrokerageInstrumentsRequest<TAuth>} requestParameters Request parameters.
5759
4899
  * @param {*} [options] Override http request option.
5760
4900
  * @throws {RequiredError}
5761
4901
  */
5762
- async listAllCurrencies(...args) {
5763
- const [options] = args;
5764
- return createRequestFunction(await localVarAxiosParamCreator.listAllCurrencies(options), axios.default, BASE_PATH, configuration, {
4902
+ async listAllBrokerageInstruments(requestParameters, options) {
4903
+ return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerageInstruments(requestParameters.slug, options), axios.default, BASE_PATH, configuration, {
5765
4904
  authModes: ["commercialApiKey", "personalApiKey"],
5766
4905
  requestSigningByAuthMode: {
5767
4906
  "commercialApiKey": {
@@ -5776,14 +4915,14 @@ const ReferenceDataApiFp = function(configuration) {
5776
4915
  });
5777
4916
  },
5778
4917
  /**
5779
- * Returns a list of all Exchange Rate Pairs for all supported Currencies.
5780
- * @summary Get currency exchange rates
4918
+ * Returns a list of all defined Brokerage objects.
4919
+ * @summary Get brokerages
5781
4920
  * @param {*} [options] Override http request option.
5782
4921
  * @throws {RequiredError}
5783
4922
  */
5784
- async listAllCurrenciesRates(...args) {
4923
+ async listAllBrokerages(...args) {
5785
4924
  const [options] = args;
5786
- return createRequestFunction(await localVarAxiosParamCreator.listAllCurrenciesRates(options), axios.default, BASE_PATH, configuration, {
4925
+ return createRequestFunction(await localVarAxiosParamCreator.listAllBrokerages(options), axios.default, BASE_PATH, configuration, {
5787
4926
  authModes: ["commercialApiKey", "personalApiKey"],
5788
4927
  requestSigningByAuthMode: {
5789
4928
  "commercialApiKey": {
@@ -5826,19 +4965,9 @@ const ReferenceDataApiFp = function(configuration) {
5826
4965
  * ReferenceDataApi - factory interface
5827
4966
  * @export
5828
4967
  */
5829
- const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
4968
+ const ReferenceDataApiFactory = function(configuration, basePath, axios$2) {
5830
4969
  const localVarFp = ReferenceDataApiFp(configuration);
5831
4970
  return {
5832
- /**
5833
- * Returns an Exchange Rate Pair object for the specified Currency Pair.
5834
- * @summary Get exchange rate of a currency pair
5835
- * @param {ReferenceDataApiGetCurrencyExchangeRatePairRequest<TAuth>} requestParameters Request parameters.
5836
- * @param {*} [options] Override http request option.
5837
- * @throws {RequiredError}
5838
- */
5839
- getCurrencyExchangeRatePair(requestParameters, options) {
5840
- return localVarFp.getCurrencyExchangeRatePair(requestParameters, options).then((request) => request(axios$3, basePath));
5841
- },
5842
4971
  /**
5843
4972
  * Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
5844
4973
  * @summary Get Client Info
@@ -5846,16 +4975,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5846
4975
  * @throws {RequiredError}
5847
4976
  */
5848
4977
  getPartnerInfo(...args) {
5849
- return localVarFp.getPartnerInfo(...args).then((request) => request(axios$3, basePath));
5850
- },
5851
- /**
5852
- * Return all available security types supported by SnapTrade.
5853
- * @summary List security types
5854
- * @param {*} [options] Override http request option.
5855
- * @throws {RequiredError}
5856
- */
5857
- getSecurityTypes(...args) {
5858
- return localVarFp.getSecurityTypes(...args).then((request) => request(axios$3, basePath));
4978
+ return localVarFp.getPartnerInfo(...args).then((request) => request(axios$2, basePath));
5859
4979
  },
5860
4980
  /**
5861
4981
  * Returns a list of all supported Exchanges.
@@ -5864,7 +4984,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5864
4984
  * @throws {RequiredError}
5865
4985
  */
5866
4986
  getStockExchanges(...args) {
5867
- return localVarFp.getStockExchanges(...args).then((request) => request(axios$3, basePath));
4987
+ return localVarFp.getStockExchanges(...args).then((request) => request(axios$2, basePath));
5868
4988
  },
5869
4989
  /**
5870
4990
  * Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
@@ -5874,7 +4994,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5874
4994
  * @throws {RequiredError}
5875
4995
  */
5876
4996
  getSymbols(requestParameters = {}, options) {
5877
- return localVarFp.getSymbols(requestParameters, options).then((request) => request(axios$3, basePath));
4997
+ return localVarFp.getSymbols(requestParameters, options).then((request) => request(axios$2, basePath));
5878
4998
  },
5879
4999
  /**
5880
5000
  * Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a \'.TO\' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
@@ -5884,7 +5004,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5884
5004
  * @throws {RequiredError}
5885
5005
  */
5886
5006
  getSymbolsByTicker(requestParameters, options) {
5887
- return localVarFp.getSymbolsByTicker(requestParameters, options).then((request) => request(axios$3, basePath));
5007
+ return localVarFp.getSymbolsByTicker(requestParameters, options).then((request) => request(axios$2, basePath));
5888
5008
  },
5889
5009
  /**
5890
5010
  * Returns a list of all defined Brokerage authorization Type objects.
@@ -5894,7 +5014,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5894
5014
  * @throws {RequiredError}
5895
5015
  */
5896
5016
  listAllBrokerageAuthorizationType(requestParameters = {}, options) {
5897
- return localVarFp.listAllBrokerageAuthorizationType(requestParameters, options).then((request) => request(axios$3, basePath));
5017
+ return localVarFp.listAllBrokerageAuthorizationType(requestParameters, options).then((request) => request(axios$2, basePath));
5898
5018
  },
5899
5019
  /**
5900
5020
  * Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don\'t will return an empty list.
@@ -5904,7 +5024,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5904
5024
  * @throws {RequiredError}
5905
5025
  */
5906
5026
  listAllBrokerageInstruments(requestParameters, options) {
5907
- return localVarFp.listAllBrokerageInstruments(requestParameters, options).then((request) => request(axios$3, basePath));
5027
+ return localVarFp.listAllBrokerageInstruments(requestParameters, options).then((request) => request(axios$2, basePath));
5908
5028
  },
5909
5029
  /**
5910
5030
  * Returns a list of all defined Brokerage objects.
@@ -5913,25 +5033,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5913
5033
  * @throws {RequiredError}
5914
5034
  */
5915
5035
  listAllBrokerages(...args) {
5916
- return localVarFp.listAllBrokerages(...args).then((request) => request(axios$3, basePath));
5917
- },
5918
- /**
5919
- * Returns a list of all defined Currency objects.
5920
- * @summary Get currencies
5921
- * @param {*} [options] Override http request option.
5922
- * @throws {RequiredError}
5923
- */
5924
- listAllCurrencies(...args) {
5925
- return localVarFp.listAllCurrencies(...args).then((request) => request(axios$3, basePath));
5926
- },
5927
- /**
5928
- * Returns a list of all Exchange Rate Pairs for all supported Currencies.
5929
- * @summary Get currency exchange rates
5930
- * @param {*} [options] Override http request option.
5931
- * @throws {RequiredError}
5932
- */
5933
- listAllCurrenciesRates(...args) {
5934
- return localVarFp.listAllCurrenciesRates(...args).then((request) => request(axios$3, basePath));
5036
+ return localVarFp.listAllBrokerages(...args).then((request) => request(axios$2, basePath));
5935
5037
  },
5936
5038
  /**
5937
5039
  * Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
@@ -5941,7 +5043,7 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5941
5043
  * @throws {RequiredError}
5942
5044
  */
5943
5045
  symbolSearchUserAccount(requestParameters, options) {
5944
- return localVarFp.symbolSearchUserAccount(requestParameters, options).then((request) => request(axios$3, basePath));
5046
+ return localVarFp.symbolSearchUserAccount(requestParameters, options).then((request) => request(axios$2, basePath));
5945
5047
  }
5946
5048
  };
5947
5049
  };
@@ -5952,17 +5054,6 @@ const ReferenceDataApiFactory = function(configuration, basePath, axios$3) {
5952
5054
  * @extends {BaseAPI}
5953
5055
  */
5954
5056
  var ReferenceDataApiGenerated = class extends BaseAPI {
5955
- /**
5956
- * Returns an Exchange Rate Pair object for the specified Currency Pair.
5957
- * @summary Get exchange rate of a currency pair
5958
- * @param {ReferenceDataApiGetCurrencyExchangeRatePairRequest<TAuth>} requestParameters Request parameters.
5959
- * @param {*} [options] Override http request option.
5960
- * @throws {RequiredError}
5961
- * @memberof ReferenceDataApiGenerated
5962
- */
5963
- getCurrencyExchangeRatePair(requestParameters, options) {
5964
- return ReferenceDataApiFp(this.configuration).getCurrencyExchangeRatePair(requestParameters, options).then((request) => request(this.axios, this.basePath));
5965
- }
5966
5057
  /**
5967
5058
  * Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
5968
5059
  * @summary Get Client Info
@@ -5974,16 +5065,6 @@ var ReferenceDataApiGenerated = class extends BaseAPI {
5974
5065
  return ReferenceDataApiFp(this.configuration).getPartnerInfo(...args).then((request) => request(this.axios, this.basePath));
5975
5066
  }
5976
5067
  /**
5977
- * Return all available security types supported by SnapTrade.
5978
- * @summary List security types
5979
- * @param {*} [options] Override http request option.
5980
- * @throws {RequiredError}
5981
- * @memberof ReferenceDataApiGenerated
5982
- */
5983
- getSecurityTypes(...args) {
5984
- return ReferenceDataApiFp(this.configuration).getSecurityTypes(...args).then((request) => request(this.axios, this.basePath));
5985
- }
5986
- /**
5987
5068
  * Returns a list of all supported Exchanges.
5988
5069
  * @summary Get exchanges
5989
5070
  * @param {*} [options] Override http request option.
@@ -6048,26 +5129,6 @@ var ReferenceDataApiGenerated = class extends BaseAPI {
6048
5129
  return ReferenceDataApiFp(this.configuration).listAllBrokerages(...args).then((request) => request(this.axios, this.basePath));
6049
5130
  }
6050
5131
  /**
6051
- * Returns a list of all defined Currency objects.
6052
- * @summary Get currencies
6053
- * @param {*} [options] Override http request option.
6054
- * @throws {RequiredError}
6055
- * @memberof ReferenceDataApiGenerated
6056
- */
6057
- listAllCurrencies(...args) {
6058
- return ReferenceDataApiFp(this.configuration).listAllCurrencies(...args).then((request) => request(this.axios, this.basePath));
6059
- }
6060
- /**
6061
- * Returns a list of all Exchange Rate Pairs for all supported Currencies.
6062
- * @summary Get currency exchange rates
6063
- * @param {*} [options] Override http request option.
6064
- * @throws {RequiredError}
6065
- * @memberof ReferenceDataApiGenerated
6066
- */
6067
- listAllCurrenciesRates(...args) {
6068
- return ReferenceDataApiFp(this.configuration).listAllCurrenciesRates(...args).then((request) => request(this.axios, this.basePath));
6069
- }
6070
- /**
6071
5132
  * Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
6072
5133
  * @summary Search account symbols
6073
5134
  * @param {ReferenceDataApiSymbolSearchUserAccountRequest<TAuth>} requestParameters Request parameters.
@@ -6169,85 +5230,6 @@ const TradingApiAxiosParamCreator = function(configuration) {
6169
5230
  };
6170
5231
  },
6171
5232
  /**
6172
- * **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead. Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
6173
- * @summary Cancel equity order
6174
- * @param {string} accountId
6175
- * @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
6176
- * @param {string} [userId]
6177
- * @param {string} [userSecret]
6178
- * @param {*} [options] Override http request option.
6179
- * @deprecated
6180
- * @throws {RequiredError}
6181
- */
6182
- cancelUserAccountOrder: async (accountId, accountInformationGetUserAccountOrderDetailRequest, userId, userSecret, options = {}) => {
6183
- assertParamExists("cancelUserAccountOrder", "accountId", accountId);
6184
- assertParamExists("cancelUserAccountOrder", "accountInformationGetUserAccountOrderDetailRequest", accountInformationGetUserAccountOrderDetailRequest);
6185
- const localVarPath = `/accounts/{accountId}/orders/cancel`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
6186
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6187
- let baseOptions;
6188
- if (configuration) baseOptions = configuration.baseOptions;
6189
- const localVarRequestOptions = {
6190
- method: "POST",
6191
- ...baseOptions,
6192
- ...options
6193
- };
6194
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
6195
- const localVarQueryParameter = {};
6196
- if (configuration?.authMode === "commercialApiKey") {
6197
- await setApiKeyToObject({
6198
- object: localVarQueryParameter,
6199
- key: "clientId",
6200
- keyParamName: "clientId",
6201
- configuration
6202
- });
6203
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
6204
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
6205
- }
6206
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
6207
- object: localVarQueryParameter,
6208
- key: "clientId",
6209
- keyParamName: "clientId",
6210
- configuration
6211
- });
6212
- const localVarOperationAuth = {
6213
- authModes: ["commercialApiKey", "personalApiKey"],
6214
- requestSigningByAuthMode: {
6215
- "commercialApiKey": {
6216
- secretParameter: "consumerKey",
6217
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
6218
- },
6219
- "personalApiKey": {
6220
- secretParameter: "consumerKey",
6221
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
6222
- }
6223
- },
6224
- selectedAuthMode: configuration?.authMode
6225
- };
6226
- localVarHeaderParameter["Content-Type"] = "application/json";
6227
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6228
- localVarRequestOptions.headers = {
6229
- ...localVarHeaderParameter,
6230
- ...headersFromBaseOptions,
6231
- ...options.headers
6232
- };
6233
- requestBeforeHook({
6234
- requestBody: accountInformationGetUserAccountOrderDetailRequest,
6235
- queryParameters: localVarQueryParameter,
6236
- requestConfig: localVarRequestOptions,
6237
- path: localVarPath,
6238
- configuration,
6239
- pathTemplate: "/accounts/{accountId}/orders/cancel",
6240
- httpMethod: "POST",
6241
- operationAuth: localVarOperationAuth
6242
- });
6243
- localVarRequestOptions.data = serializeDataIfNeeded(accountInformationGetUserAccountOrderDetailRequest, localVarRequestOptions, configuration);
6244
- setSearchParams(localVarUrlObj, localVarQueryParameter);
6245
- return {
6246
- url: toPathString(localVarUrlObj),
6247
- options: localVarRequestOptions
6248
- };
6249
- },
6250
- /**
6251
5233
  * Gets a quote for the specified account.
6252
5234
  * @summary Get crypto pair quote
6253
5235
  * @param {string} accountId
@@ -6631,85 +5613,6 @@ const TradingApiAxiosParamCreator = function(configuration) {
6631
5613
  };
6632
5614
  },
6633
5615
  /**
6634
- * **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead. Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
6635
- * @summary Place bracket order
6636
- * @param {string} accountId The ID of the account to execute the trade on.
6637
- * @param {ManualTradeFormBracket} manualTradeFormBracket
6638
- * @param {string} [userId]
6639
- * @param {string} [userSecret]
6640
- * @param {*} [options] Override http request option.
6641
- * @deprecated
6642
- * @throws {RequiredError}
6643
- */
6644
- placeBracketOrder: async (accountId, manualTradeFormBracket, userId, userSecret, options = {}) => {
6645
- assertParamExists("placeBracketOrder", "accountId", accountId);
6646
- assertParamExists("placeBracketOrder", "manualTradeFormBracket", manualTradeFormBracket);
6647
- const localVarPath = `/accounts/{accountId}/trading/bracket`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
6648
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6649
- let baseOptions;
6650
- if (configuration) baseOptions = configuration.baseOptions;
6651
- const localVarRequestOptions = {
6652
- method: "POST",
6653
- ...baseOptions,
6654
- ...options
6655
- };
6656
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
6657
- const localVarQueryParameter = {};
6658
- if (configuration?.authMode === "commercialApiKey") {
6659
- await setApiKeyToObject({
6660
- object: localVarQueryParameter,
6661
- key: "clientId",
6662
- keyParamName: "clientId",
6663
- configuration
6664
- });
6665
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
6666
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
6667
- }
6668
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
6669
- object: localVarQueryParameter,
6670
- key: "clientId",
6671
- keyParamName: "clientId",
6672
- configuration
6673
- });
6674
- const localVarOperationAuth = {
6675
- authModes: ["commercialApiKey", "personalApiKey"],
6676
- requestSigningByAuthMode: {
6677
- "commercialApiKey": {
6678
- secretParameter: "consumerKey",
6679
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
6680
- },
6681
- "personalApiKey": {
6682
- secretParameter: "consumerKey",
6683
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
6684
- }
6685
- },
6686
- selectedAuthMode: configuration?.authMode
6687
- };
6688
- localVarHeaderParameter["Content-Type"] = "application/json";
6689
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6690
- localVarRequestOptions.headers = {
6691
- ...localVarHeaderParameter,
6692
- ...headersFromBaseOptions,
6693
- ...options.headers
6694
- };
6695
- requestBeforeHook({
6696
- requestBody: manualTradeFormBracket,
6697
- queryParameters: localVarQueryParameter,
6698
- requestConfig: localVarRequestOptions,
6699
- path: localVarPath,
6700
- configuration,
6701
- pathTemplate: "/accounts/{accountId}/trading/bracket",
6702
- httpMethod: "POST",
6703
- operationAuth: localVarOperationAuth
6704
- });
6705
- localVarRequestOptions.data = serializeDataIfNeeded(manualTradeFormBracket, localVarRequestOptions, configuration);
6706
- setSearchParams(localVarUrlObj, localVarQueryParameter);
6707
- return {
6708
- url: toPathString(localVarUrlObj),
6709
- options: localVarRequestOptions
6710
- };
6711
- },
6712
- /**
6713
5616
  * Places a complex conditional order (OCO, OTO, or OTOCO). Only supported on certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for details on which brokerages support complex orders and which types they support. - **OCO** (One Cancels the Other): Two peer orders; when one fills the other is cancelled. - **OTO** (One Triggers the Other): A trigger order that, when filled, activates a conditional order. - **OTOCO** (One Triggers a One Cancels the Other): A trigger order that, when filled, activates an OCO pair of two peer orders.
6714
5617
  * @summary Place complex order
6715
5618
  * @param {string} accountId The ID of the account to execute the trade on.
@@ -7362,30 +6265,6 @@ const TradingApiFp = function(configuration) {
7362
6265
  });
7363
6266
  },
7364
6267
  /**
7365
- * **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead. Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
7366
- * @summary Cancel equity order
7367
- * @param {TradingApiCancelUserAccountOrderRequest<TAuth>} requestParameters Request parameters.
7368
- * @param {*} [options] Override http request option.
7369
- * @deprecated
7370
- * @throws {RequiredError}
7371
- */
7372
- async cancelUserAccountOrder(requestParameters, options) {
7373
- const accountInformationGetUserAccountOrderDetailRequest = { brokerage_order_id: requestParameters.brokerage_order_id };
7374
- return createRequestFunction(await localVarAxiosParamCreator.cancelUserAccountOrder(requestParameters.accountId, accountInformationGetUserAccountOrderDetailRequest, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
7375
- authModes: ["commercialApiKey", "personalApiKey"],
7376
- requestSigningByAuthMode: {
7377
- "commercialApiKey": {
7378
- secretParameter: "consumerKey",
7379
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
7380
- },
7381
- "personalApiKey": {
7382
- secretParameter: "consumerKey",
7383
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
7384
- }
7385
- }
7386
- });
7387
- },
7388
- /**
7389
6268
  * Gets a quote for the specified account.
7390
6269
  * @summary Get crypto pair quote
7391
6270
  * @param {TradingApiGetCryptocurrencyPairQuoteRequest<TAuth>} requestParameters Request parameters.
@@ -7497,44 +6376,10 @@ const TradingApiFp = function(configuration) {
7497
6376
  * @summary Get equity symbol quotes
7498
6377
  * @param {TradingApiGetUserAccountQuotesRequest<TAuth>} requestParameters Request parameters.
7499
6378
  * @param {*} [options] Override http request option.
7500
- * @throws {RequiredError}
7501
- */
7502
- async getUserAccountQuotes(requestParameters, options) {
7503
- return createRequestFunction(await localVarAxiosParamCreator.getUserAccountQuotes(requestParameters.symbols, requestParameters.accountId, requestParameters.useTicker, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
7504
- authModes: ["commercialApiKey", "personalApiKey"],
7505
- requestSigningByAuthMode: {
7506
- "commercialApiKey": {
7507
- secretParameter: "consumerKey",
7508
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
7509
- },
7510
- "personalApiKey": {
7511
- secretParameter: "consumerKey",
7512
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
7513
- }
7514
- }
7515
- });
7516
- },
7517
- /**
7518
- * **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead. Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
7519
- * @summary Place bracket order
7520
- * @param {TradingApiPlaceBracketOrderRequest<TAuth>} requestParameters Request parameters.
7521
- * @param {*} [options] Override http request option.
7522
- * @deprecated
7523
- * @throws {RequiredError}
7524
- */
7525
- async placeBracketOrder(requestParameters, options) {
7526
- const manualTradeFormBracket = {
7527
- action: requestParameters.action,
7528
- instrument: requestParameters.instrument,
7529
- order_type: requestParameters.order_type,
7530
- time_in_force: requestParameters.time_in_force,
7531
- price: requestParameters.price,
7532
- stop: requestParameters.stop,
7533
- units: requestParameters.units,
7534
- stop_loss: requestParameters.stop_loss,
7535
- take_profit: requestParameters.take_profit
7536
- };
7537
- return createRequestFunction(await localVarAxiosParamCreator.placeBracketOrder(requestParameters.accountId, manualTradeFormBracket, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
6379
+ * @throws {RequiredError}
6380
+ */
6381
+ async getUserAccountQuotes(requestParameters, options) {
6382
+ return createRequestFunction(await localVarAxiosParamCreator.getUserAccountQuotes(requestParameters.symbols, requestParameters.accountId, requestParameters.useTicker, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
7538
6383
  authModes: ["commercialApiKey", "personalApiKey"],
7539
6384
  requestSigningByAuthMode: {
7540
6385
  "commercialApiKey": {
@@ -7791,7 +6636,7 @@ const TradingApiFp = function(configuration) {
7791
6636
  * TradingApi - factory interface
7792
6637
  * @export
7793
6638
  */
7794
- const TradingApiFactory = function(configuration, basePath, axios$2) {
6639
+ const TradingApiFactory = function(configuration, basePath, axios$1) {
7795
6640
  const localVarFp = TradingApiFp(configuration);
7796
6641
  return {
7797
6642
  /**
@@ -7802,18 +6647,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7802
6647
  * @throws {RequiredError}
7803
6648
  */
7804
6649
  cancelOrder(requestParameters, options) {
7805
- return localVarFp.cancelOrder(requestParameters, options).then((request) => request(axios$2, basePath));
7806
- },
7807
- /**
7808
- * **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead. Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
7809
- * @summary Cancel equity order
7810
- * @param {TradingApiCancelUserAccountOrderRequest<TAuth>} requestParameters Request parameters.
7811
- * @param {*} [options] Override http request option.
7812
- * @deprecated
7813
- * @throws {RequiredError}
7814
- */
7815
- cancelUserAccountOrder(requestParameters, options) {
7816
- return localVarFp.cancelUserAccountOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6650
+ return localVarFp.cancelOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7817
6651
  },
7818
6652
  /**
7819
6653
  * Gets a quote for the specified account.
@@ -7823,7 +6657,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7823
6657
  * @throws {RequiredError}
7824
6658
  */
7825
6659
  getCryptocurrencyPairQuote(requestParameters, options) {
7826
- return localVarFp.getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(axios$2, basePath));
6660
+ return localVarFp.getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(axios$1, basePath));
7827
6661
  },
7828
6662
  /**
7829
6663
  * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain enabled brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint.
@@ -7833,7 +6667,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7833
6667
  * @throws {RequiredError}
7834
6668
  */
7835
6669
  getOptionImpact(requestParameters, options) {
7836
- return localVarFp.getOptionImpact(requestParameters, options).then((request) => request(axios$2, basePath));
6670
+ return localVarFp.getOptionImpact(requestParameters, options).then((request) => request(axios$1, basePath));
7837
6671
  },
7838
6672
  /**
7839
6673
  * Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
@@ -7843,7 +6677,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7843
6677
  * @throws {RequiredError}
7844
6678
  */
7845
6679
  getOrderImpact(requestParameters, options) {
7846
- return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios$2, basePath));
6680
+ return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios$1, basePath));
7847
6681
  },
7848
6682
  /**
7849
6683
  * Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
@@ -7853,7 +6687,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7853
6687
  * @throws {RequiredError}
7854
6688
  */
7855
6689
  getUserAccountOptionQuotes(requestParameters, options) {
7856
- return localVarFp.getUserAccountOptionQuotes(requestParameters, options).then((request) => request(axios$2, basePath));
6690
+ return localVarFp.getUserAccountOptionQuotes(requestParameters, options).then((request) => request(axios$1, basePath));
7857
6691
  },
7858
6692
  /**
7859
6693
  * Returns a maximum of 10 quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes.
@@ -7863,18 +6697,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7863
6697
  * @throws {RequiredError}
7864
6698
  */
7865
6699
  getUserAccountQuotes(requestParameters, options) {
7866
- return localVarFp.getUserAccountQuotes(requestParameters, options).then((request) => request(axios$2, basePath));
7867
- },
7868
- /**
7869
- * **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead. Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
7870
- * @summary Place bracket order
7871
- * @param {TradingApiPlaceBracketOrderRequest<TAuth>} requestParameters Request parameters.
7872
- * @param {*} [options] Override http request option.
7873
- * @deprecated
7874
- * @throws {RequiredError}
7875
- */
7876
- placeBracketOrder(requestParameters, options) {
7877
- return localVarFp.placeBracketOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6700
+ return localVarFp.getUserAccountQuotes(requestParameters, options).then((request) => request(axios$1, basePath));
7878
6701
  },
7879
6702
  /**
7880
6703
  * Places a complex conditional order (OCO, OTO, or OTOCO). Only supported on certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for details on which brokerages support complex orders and which types they support. - **OCO** (One Cancels the Other): Two peer orders; when one fills the other is cancelled. - **OTO** (One Triggers the Other): A trigger order that, when filled, activates a conditional order. - **OTOCO** (One Triggers a One Cancels the Other): A trigger order that, when filled, activates an OCO pair of two peer orders.
@@ -7884,7 +6707,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7884
6707
  * @throws {RequiredError}
7885
6708
  */
7886
6709
  placeComplexOrder(requestParameters, options) {
7887
- return localVarFp.placeComplexOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6710
+ return localVarFp.placeComplexOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7888
6711
  },
7889
6712
  /**
7890
6713
  * Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
@@ -7894,7 +6717,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7894
6717
  * @throws {RequiredError}
7895
6718
  */
7896
6719
  placeCryptoOrder(requestParameters, options) {
7897
- return localVarFp.placeCryptoOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6720
+ return localVarFp.placeCryptoOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7898
6721
  },
7899
6722
  /**
7900
6723
  * Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
@@ -7904,7 +6727,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7904
6727
  * @throws {RequiredError}
7905
6728
  */
7906
6729
  placeForceOrder(requestParameters, options) {
7907
- return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6730
+ return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7908
6731
  },
7909
6732
  /**
7910
6733
  * Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
@@ -7914,7 +6737,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7914
6737
  * @throws {RequiredError}
7915
6738
  */
7916
6739
  placeMlegOrder(requestParameters, options) {
7917
- return localVarFp.placeMlegOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6740
+ return localVarFp.placeMlegOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7918
6741
  },
7919
6742
  /**
7920
6743
  * Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
@@ -7924,7 +6747,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7924
6747
  * @throws {RequiredError}
7925
6748
  */
7926
6749
  placeOrder(requestParameters, options) {
7927
- return localVarFp.placeOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6750
+ return localVarFp.placeOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7928
6751
  },
7929
6752
  /**
7930
6753
  * Previews an order using the specified account.
@@ -7934,7 +6757,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7934
6757
  * @throws {RequiredError}
7935
6758
  */
7936
6759
  previewCryptoOrder(requestParameters, options) {
7937
- return localVarFp.previewCryptoOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6760
+ return localVarFp.previewCryptoOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7938
6761
  },
7939
6762
  /**
7940
6763
  * Replaces an existing pending order with a new one. The way this works is brokerage dependent, but usually involves cancelling the existing order and placing a new one. The order\'s brokerage_order_id may or may not change, be sure to use the one returned in the response going forward. Only supported on some brokerages
@@ -7944,7 +6767,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7944
6767
  * @throws {RequiredError}
7945
6768
  */
7946
6769
  replaceOrder(requestParameters, options) {
7947
- return localVarFp.replaceOrder(requestParameters, options).then((request) => request(axios$2, basePath));
6770
+ return localVarFp.replaceOrder(requestParameters, options).then((request) => request(axios$1, basePath));
7948
6771
  },
7949
6772
  /**
7950
6773
  * Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
@@ -7954,7 +6777,7 @@ const TradingApiFactory = function(configuration, basePath, axios$2) {
7954
6777
  * @throws {RequiredError}
7955
6778
  */
7956
6779
  searchCryptocurrencyPairInstruments(requestParameters, options) {
7957
- return localVarFp.searchCryptocurrencyPairInstruments(requestParameters, options).then((request) => request(axios$2, basePath));
6780
+ return localVarFp.searchCryptocurrencyPairInstruments(requestParameters, options).then((request) => request(axios$1, basePath));
7958
6781
  }
7959
6782
  };
7960
6783
  };
@@ -7977,18 +6800,6 @@ var TradingApiGenerated = class extends BaseAPI {
7977
6800
  return TradingApiFp(this.configuration).cancelOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
7978
6801
  }
7979
6802
  /**
7980
- * **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead. Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
7981
- * @summary Cancel equity order
7982
- * @param {TradingApiCancelUserAccountOrderRequest<TAuth>} requestParameters Request parameters.
7983
- * @param {*} [options] Override http request option.
7984
- * @deprecated
7985
- * @throws {RequiredError}
7986
- * @memberof TradingApiGenerated
7987
- */
7988
- cancelUserAccountOrder(requestParameters, options) {
7989
- return TradingApiFp(this.configuration).cancelUserAccountOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
7990
- }
7991
- /**
7992
6803
  * Gets a quote for the specified account.
7993
6804
  * @summary Get crypto pair quote
7994
6805
  * @param {TradingApiGetCryptocurrencyPairQuoteRequest<TAuth>} requestParameters Request parameters.
@@ -8044,18 +6855,6 @@ var TradingApiGenerated = class extends BaseAPI {
8044
6855
  return TradingApiFp(this.configuration).getUserAccountQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
8045
6856
  }
8046
6857
  /**
8047
- * **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead. Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
8048
- * @summary Place bracket order
8049
- * @param {TradingApiPlaceBracketOrderRequest<TAuth>} requestParameters Request parameters.
8050
- * @param {*} [options] Override http request option.
8051
- * @deprecated
8052
- * @throws {RequiredError}
8053
- * @memberof TradingApiGenerated
8054
- */
8055
- placeBracketOrder(requestParameters, options) {
8056
- return TradingApiFp(this.configuration).placeBracketOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
8057
- }
8058
- /**
8059
6858
  * Places a complex conditional order (OCO, OTO, or OTOCO). Only supported on certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for details on which brokerages support complex orders and which types they support. - **OCO** (One Cancels the Other): Two peer orders; when one fills the other is cancelled. - **OTO** (One Triggers the Other): A trigger order that, when filled, activates a conditional order. - **OTOCO** (One Triggers a One Cancels the Other): A trigger order that, when filled, activates an OCO pair of two peer orders.
8060
6859
  * @summary Place complex order
8061
6860
  * @param {TradingApiPlaceComplexOrderRequest<TAuth>} requestParameters Request parameters.
@@ -8148,303 +6947,6 @@ var TradingApiGenerated = class extends BaseAPI {
8148
6947
  //#region api/trading-api.ts
8149
6948
  var TradingApi = class extends TradingApiGenerated {};
8150
6949
  //#endregion
8151
- //#region api/transactions-and-reporting-api-generated.ts
8152
- /**
8153
- * TransactionsAndReportingApi - axios parameter creator
8154
- * @export
8155
- */
8156
- const TransactionsAndReportingApiAxiosParamCreator = function(configuration) {
8157
- return {
8158
- /**
8159
- * **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
8160
- * @summary Get transaction history for a user
8161
- * @param {string | Date} [startDate] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on &#x60;trade_date&#x60;.
8162
- * @param {string | Date} [endDate] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on &#x60;trade_date&#x60;.
8163
- * @param {string} [accounts] Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The &#x60;brokerageAuthorizations&#x60; parameter takes precedence over this parameter.
8164
- * @param {string} [brokerageAuthorizations] Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the &#x60;accounts&#x60; parameter.
8165
- * @param {string} [type] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - &#x60;BUY&#x60; - Asset bought. - &#x60;SELL&#x60; - Asset sold. - &#x60;DIVIDEND&#x60; - Dividend payout. - &#x60;SUBSTITUTE_DIVIDEND&#x60; - Payment in lieu of a dividend. - &#x60;CONTRIBUTION&#x60; - Cash contribution. - &#x60;WITHDRAWAL&#x60; - Cash withdrawal. - &#x60;REI&#x60; - Dividend reinvestment. - &#x60;INTEREST&#x60; - Interest deposited into the account. - &#x60;FEE&#x60; - Fee withdrawn from the account. - &#x60;OPTIONEXPIRATION&#x60; - Option expiration event. - &#x60;OPTIONASSIGNMENT&#x60; - Option assignment event. - &#x60;OPTIONEXERCISE&#x60; - Option exercise event. - &#x60;TRANSFER&#x60; - Transfer of assets from one account to another
8166
- * @param {string} [userId]
8167
- * @param {string} [userSecret]
8168
- * @param {*} [options] Override http request option.
8169
- * @deprecated
8170
- * @throws {RequiredError}
8171
- */
8172
- getActivities: async (startDate, endDate, accounts, brokerageAuthorizations, type, userId, userSecret, options = {}) => {
8173
- const localVarPath = `/activities`;
8174
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8175
- let baseOptions;
8176
- if (configuration) baseOptions = configuration.baseOptions;
8177
- const localVarRequestOptions = {
8178
- method: "GET",
8179
- ...baseOptions,
8180
- ...options
8181
- };
8182
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
8183
- const localVarQueryParameter = {};
8184
- if (configuration?.authMode === "commercialApiKey") {
8185
- await setApiKeyToObject({
8186
- object: localVarQueryParameter,
8187
- key: "clientId",
8188
- keyParamName: "clientId",
8189
- configuration
8190
- });
8191
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
8192
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
8193
- }
8194
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
8195
- object: localVarQueryParameter,
8196
- key: "clientId",
8197
- keyParamName: "clientId",
8198
- configuration
8199
- });
8200
- if (startDate !== void 0) localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString().substr(0, 10) : startDate;
8201
- if (endDate !== void 0) localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString().substr(0, 10) : endDate;
8202
- if (accounts !== void 0) localVarQueryParameter["accounts"] = accounts;
8203
- if (brokerageAuthorizations !== void 0) localVarQueryParameter["brokerageAuthorizations"] = brokerageAuthorizations;
8204
- if (type !== void 0) localVarQueryParameter["type"] = type;
8205
- const localVarOperationAuth = {
8206
- authModes: ["commercialApiKey", "personalApiKey"],
8207
- requestSigningByAuthMode: {
8208
- "commercialApiKey": {
8209
- secretParameter: "consumerKey",
8210
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
8211
- },
8212
- "personalApiKey": {
8213
- secretParameter: "consumerKey",
8214
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
8215
- }
8216
- },
8217
- selectedAuthMode: configuration?.authMode
8218
- };
8219
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8220
- localVarRequestOptions.headers = {
8221
- ...localVarHeaderParameter,
8222
- ...headersFromBaseOptions,
8223
- ...options.headers
8224
- };
8225
- requestBeforeHook({
8226
- queryParameters: localVarQueryParameter,
8227
- requestConfig: localVarRequestOptions,
8228
- path: localVarPath,
8229
- configuration,
8230
- pathTemplate: "/activities",
8231
- httpMethod: "GET",
8232
- operationAuth: localVarOperationAuth
8233
- });
8234
- setSearchParams(localVarUrlObj, localVarQueryParameter);
8235
- return {
8236
- url: toPathString(localVarUrlObj),
8237
- options: localVarRequestOptions
8238
- };
8239
- },
8240
- /**
8241
- * **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
8242
- * @summary Get performance information for a specific timeframe
8243
- * @param {string | Date} startDate
8244
- * @param {string | Date} endDate
8245
- * @param {string} [accounts] Optional comma separated list of account IDs used to filter the request on specific accounts
8246
- * @param {boolean} [detailed] Optional, increases frequency of data points for the total value and contribution charts if set to true
8247
- * @param {string} [frequency] Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
8248
- * @param {string} [userId]
8249
- * @param {string} [userSecret]
8250
- * @param {*} [options] Override http request option.
8251
- * @deprecated
8252
- * @throws {RequiredError}
8253
- */
8254
- getReportingCustomRange: async (startDate, endDate, accounts, detailed, frequency, userId, userSecret, options = {}) => {
8255
- assertParamExists("getReportingCustomRange", "startDate", startDate);
8256
- assertParamExists("getReportingCustomRange", "endDate", endDate);
8257
- const localVarPath = `/performance/custom`;
8258
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8259
- let baseOptions;
8260
- if (configuration) baseOptions = configuration.baseOptions;
8261
- const localVarRequestOptions = {
8262
- method: "GET",
8263
- ...baseOptions,
8264
- ...options
8265
- };
8266
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
8267
- const localVarQueryParameter = {};
8268
- if (configuration?.authMode === "commercialApiKey") {
8269
- await setApiKeyToObject({
8270
- object: localVarQueryParameter,
8271
- key: "clientId",
8272
- keyParamName: "clientId",
8273
- configuration
8274
- });
8275
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
8276
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
8277
- }
8278
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
8279
- object: localVarQueryParameter,
8280
- key: "clientId",
8281
- keyParamName: "clientId",
8282
- configuration
8283
- });
8284
- if (startDate !== void 0) localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString().substr(0, 10) : startDate;
8285
- if (endDate !== void 0) localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString().substr(0, 10) : endDate;
8286
- if (accounts !== void 0) localVarQueryParameter["accounts"] = accounts;
8287
- if (detailed !== void 0) localVarQueryParameter["detailed"] = detailed;
8288
- if (frequency !== void 0) localVarQueryParameter["frequency"] = frequency;
8289
- const localVarOperationAuth = {
8290
- authModes: ["commercialApiKey", "personalApiKey"],
8291
- requestSigningByAuthMode: {
8292
- "commercialApiKey": {
8293
- secretParameter: "consumerKey",
8294
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
8295
- },
8296
- "personalApiKey": {
8297
- secretParameter: "consumerKey",
8298
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
8299
- }
8300
- },
8301
- selectedAuthMode: configuration?.authMode
8302
- };
8303
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8304
- localVarRequestOptions.headers = {
8305
- ...localVarHeaderParameter,
8306
- ...headersFromBaseOptions,
8307
- ...options.headers
8308
- };
8309
- requestBeforeHook({
8310
- queryParameters: localVarQueryParameter,
8311
- requestConfig: localVarRequestOptions,
8312
- path: localVarPath,
8313
- configuration,
8314
- pathTemplate: "/performance/custom",
8315
- httpMethod: "GET",
8316
- operationAuth: localVarOperationAuth
8317
- });
8318
- setSearchParams(localVarUrlObj, localVarQueryParameter);
8319
- return {
8320
- url: toPathString(localVarUrlObj),
8321
- options: localVarRequestOptions
8322
- };
8323
- }
8324
- };
8325
- };
8326
- /**
8327
- * TransactionsAndReportingApi - functional programming interface
8328
- * @export
8329
- */
8330
- const TransactionsAndReportingApiFp = function(configuration) {
8331
- const localVarAxiosParamCreator = TransactionsAndReportingApiAxiosParamCreator(configuration);
8332
- return {
8333
- /**
8334
- * **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
8335
- * @summary Get transaction history for a user
8336
- * @param {TransactionsAndReportingApiGetActivitiesRequest<TAuth>} requestParameters Request parameters.
8337
- * @param {*} [options] Override http request option.
8338
- * @deprecated
8339
- * @throws {RequiredError}
8340
- */
8341
- async getActivities(requestParameters = {}, options) {
8342
- return createRequestFunction(await localVarAxiosParamCreator.getActivities(requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.brokerageAuthorizations, requestParameters.type, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
8343
- authModes: ["commercialApiKey", "personalApiKey"],
8344
- requestSigningByAuthMode: {
8345
- "commercialApiKey": {
8346
- secretParameter: "consumerKey",
8347
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
8348
- },
8349
- "personalApiKey": {
8350
- secretParameter: "consumerKey",
8351
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
8352
- }
8353
- }
8354
- });
8355
- },
8356
- /**
8357
- * **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
8358
- * @summary Get performance information for a specific timeframe
8359
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest<TAuth>} requestParameters Request parameters.
8360
- * @param {*} [options] Override http request option.
8361
- * @deprecated
8362
- * @throws {RequiredError}
8363
- */
8364
- async getReportingCustomRange(requestParameters, options) {
8365
- return createRequestFunction(await localVarAxiosParamCreator.getReportingCustomRange(requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.detailed, requestParameters.frequency, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
8366
- authModes: ["commercialApiKey", "personalApiKey"],
8367
- requestSigningByAuthMode: {
8368
- "commercialApiKey": {
8369
- secretParameter: "consumerKey",
8370
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
8371
- },
8372
- "personalApiKey": {
8373
- secretParameter: "consumerKey",
8374
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
8375
- }
8376
- }
8377
- });
8378
- }
8379
- };
8380
- };
8381
- /**
8382
- * TransactionsAndReportingApi - factory interface
8383
- * @export
8384
- */
8385
- const TransactionsAndReportingApiFactory = function(configuration, basePath, axios$1) {
8386
- const localVarFp = TransactionsAndReportingApiFp(configuration);
8387
- return {
8388
- /**
8389
- * **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
8390
- * @summary Get transaction history for a user
8391
- * @param {TransactionsAndReportingApiGetActivitiesRequest<TAuth>} requestParameters Request parameters.
8392
- * @param {*} [options] Override http request option.
8393
- * @deprecated
8394
- * @throws {RequiredError}
8395
- */
8396
- getActivities(requestParameters = {}, options) {
8397
- return localVarFp.getActivities(requestParameters, options).then((request) => request(axios$1, basePath));
8398
- },
8399
- /**
8400
- * **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
8401
- * @summary Get performance information for a specific timeframe
8402
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest<TAuth>} requestParameters Request parameters.
8403
- * @param {*} [options] Override http request option.
8404
- * @deprecated
8405
- * @throws {RequiredError}
8406
- */
8407
- getReportingCustomRange(requestParameters, options) {
8408
- return localVarFp.getReportingCustomRange(requestParameters, options).then((request) => request(axios$1, basePath));
8409
- }
8410
- };
8411
- };
8412
- /**
8413
- * TransactionsAndReportingApiGenerated - object-oriented interface
8414
- * @export
8415
- * @class TransactionsAndReportingApiGenerated
8416
- * @extends {BaseAPI}
8417
- */
8418
- var TransactionsAndReportingApiGenerated = class extends BaseAPI {
8419
- /**
8420
- * **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
8421
- * @summary Get transaction history for a user
8422
- * @param {TransactionsAndReportingApiGetActivitiesRequest<TAuth>} requestParameters Request parameters.
8423
- * @param {*} [options] Override http request option.
8424
- * @deprecated
8425
- * @throws {RequiredError}
8426
- * @memberof TransactionsAndReportingApiGenerated
8427
- */
8428
- getActivities(requestParameters = {}, options) {
8429
- return TransactionsAndReportingApiFp(this.configuration).getActivities(requestParameters, options).then((request) => request(this.axios, this.basePath));
8430
- }
8431
- /**
8432
- * **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
8433
- * @summary Get performance information for a specific timeframe
8434
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest<TAuth>} requestParameters Request parameters.
8435
- * @param {*} [options] Override http request option.
8436
- * @deprecated
8437
- * @throws {RequiredError}
8438
- * @memberof TransactionsAndReportingApiGenerated
8439
- */
8440
- getReportingCustomRange(requestParameters, options) {
8441
- return TransactionsAndReportingApiFp(this.configuration).getReportingCustomRange(requestParameters, options).then((request) => request(this.axios, this.basePath));
8442
- }
8443
- };
8444
- //#endregion
8445
- //#region api/transactions-and-reporting-api.ts
8446
- var TransactionsAndReportingApi = class extends TransactionsAndReportingApiGenerated {};
8447
- //#endregion
8448
6950
  //#region auth.ts
8449
6951
  var CommercialApiKeyAuth = class CommercialApiKeyAuth {
8450
6952
  constructor(params) {
@@ -8491,7 +6993,7 @@ var Configuration = class {
8491
6993
  }
8492
6994
  this.basePath = param.basePath;
8493
6995
  this.baseOptions = param.baseOptions ?? {};
8494
- this.userAgent = param.userAgent === void 0 ? "Konfig/11.0.4/typescript" : param.userAgent;
6996
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.0.0/typescript" : param.userAgent;
8495
6997
  this.formDataCtor = param.formDataCtor;
8496
6998
  }
8497
6999
  /**
@@ -8524,10 +7026,8 @@ var Snaptrade = class extends SnaptradeCustom {
8524
7026
  this.authentication = new AuthenticationApi(configuration);
8525
7027
  this.connections = new ConnectionsApi(configuration);
8526
7028
  this.experimentalEndpoints = new ExperimentalEndpointsApi(configuration);
8527
- this.options = new OptionsApi(configuration);
8528
7029
  this.referenceData = new ReferenceDataApi(configuration);
8529
7030
  this.trading = new TradingApi(configuration);
8530
- this.transactionsAndReporting = new TransactionsAndReportingApi(configuration);
8531
7031
  }
8532
7032
  };
8533
7033
  //#endregion
@@ -8558,11 +7058,6 @@ exports.ExperimentalEndpointsApiAxiosParamCreator = ExperimentalEndpointsApiAxio
8558
7058
  exports.ExperimentalEndpointsApiFactory = ExperimentalEndpointsApiFactory;
8559
7059
  exports.ExperimentalEndpointsApiFp = ExperimentalEndpointsApiFp;
8560
7060
  exports.ExperimentalEndpointsApiGenerated = ExperimentalEndpointsApiGenerated;
8561
- exports.OptionsApi = OptionsApi;
8562
- exports.OptionsApiAxiosParamCreator = OptionsApiAxiosParamCreator;
8563
- exports.OptionsApiFactory = OptionsApiFactory;
8564
- exports.OptionsApiFp = OptionsApiFp;
8565
- exports.OptionsApiGenerated = OptionsApiGenerated;
8566
7061
  exports.PersonalApiKeyAuth = PersonalApiKeyAuth;
8567
7062
  exports.ReferenceDataApi = ReferenceDataApi;
8568
7063
  exports.ReferenceDataApiAxiosParamCreator = ReferenceDataApiAxiosParamCreator;
@@ -8577,10 +7072,5 @@ exports.TradingApiAxiosParamCreator = TradingApiAxiosParamCreator;
8577
7072
  exports.TradingApiFactory = TradingApiFactory;
8578
7073
  exports.TradingApiFp = TradingApiFp;
8579
7074
  exports.TradingApiGenerated = TradingApiGenerated;
8580
- exports.TransactionsAndReportingApi = TransactionsAndReportingApi;
8581
- exports.TransactionsAndReportingApiAxiosParamCreator = TransactionsAndReportingApiAxiosParamCreator;
8582
- exports.TransactionsAndReportingApiFactory = TransactionsAndReportingApiFactory;
8583
- exports.TransactionsAndReportingApiFp = TransactionsAndReportingApiFp;
8584
- exports.TransactionsAndReportingApiGenerated = TransactionsAndReportingApiGenerated;
8585
7075
  exports.parseIfJson = parseIfJson;
8586
7076
  exports.readableStreamToString = readableStreamToString;