snaptrade-typescript-sdk 12.1.7 → 12.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -957,77 +957,6 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
957
957
  };
958
958
  },
959
959
  /**
960
- * Returns where the user\'s total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile. The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and `as_of` reports which month\'s distribution the placement came from. `data` is `null` — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user\'s own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user\'s assets would understate them, so none is returned.
961
- * @summary Get the user\'s AUM percentile
962
- * @param {string} [userId]
963
- * @param {string} [userSecret]
964
- * @param {*} [options] Override http request option.
965
- * @throws {RequiredError}
966
- */
967
- getUserAumPercentile: async (userId, userSecret, options = {}) => {
968
- const localVarPath = `/aumPercentile`;
969
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
970
- let baseOptions;
971
- if (configuration) baseOptions = configuration.baseOptions;
972
- const localVarRequestOptions = {
973
- method: "GET",
974
- ...baseOptions,
975
- ...options
976
- };
977
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
978
- const localVarQueryParameter = {};
979
- if (configuration?.authMode === "commercialApiKey") {
980
- await setApiKeyToObject({
981
- object: localVarQueryParameter,
982
- key: "clientId",
983
- keyParamName: "clientId",
984
- configuration
985
- });
986
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
987
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
988
- }
989
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
990
- object: localVarQueryParameter,
991
- key: "clientId",
992
- keyParamName: "clientId",
993
- configuration
994
- });
995
- const localVarOperationAuth = {
996
- authModes: ["commercialApiKey", "personalApiKey"],
997
- requestSigningByAuthMode: {
998
- "commercialApiKey": {
999
- secretParameter: "consumerKey",
1000
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1001
- },
1002
- "personalApiKey": {
1003
- secretParameter: "consumerKey",
1004
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1005
- }
1006
- },
1007
- selectedAuthMode: configuration?.authMode
1008
- };
1009
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1010
- localVarRequestOptions.headers = {
1011
- ...localVarHeaderParameter,
1012
- ...headersFromBaseOptions,
1013
- ...options.headers
1014
- };
1015
- requestBeforeHook({
1016
- queryParameters: localVarQueryParameter,
1017
- requestConfig: localVarRequestOptions,
1018
- path: localVarPath,
1019
- configuration,
1020
- pathTemplate: "/aumPercentile",
1021
- httpMethod: "GET",
1022
- operationAuth: localVarOperationAuth
1023
- });
1024
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1025
- return {
1026
- url: toPathString(localVarUrlObj),
1027
- options: localVarRequestOptions
1028
- };
1029
- },
1030
- /**
1031
960
  * **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.
1032
961
  * @summary List account holdings
1033
962
  * @param {string} accountId
@@ -1454,28 +1383,6 @@ const AccountInformationApiFp = function(configuration) {
1454
1383
  });
1455
1384
  },
1456
1385
  /**
1457
- * Returns where the user\'s total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile. The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and `as_of` reports which month\'s distribution the placement came from. `data` is `null` — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user\'s own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user\'s assets would understate them, so none is returned.
1458
- * @summary Get the user\'s AUM percentile
1459
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1460
- * @param {*} [options] Override http request option.
1461
- * @throws {RequiredError}
1462
- */
1463
- async getUserAumPercentile(requestParameters = {}, options) {
1464
- return createRequestFunction(await localVarAxiosParamCreator.getUserAumPercentile(requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
1465
- authModes: ["commercialApiKey", "personalApiKey"],
1466
- requestSigningByAuthMode: {
1467
- "commercialApiKey": {
1468
- secretParameter: "consumerKey",
1469
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1470
- },
1471
- "personalApiKey": {
1472
- secretParameter: "consumerKey",
1473
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1474
- }
1475
- }
1476
- });
1477
- },
1478
- /**
1479
1386
  * **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.
1480
1387
  * @summary List account holdings
1481
1388
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -1642,16 +1549,6 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1642
1549
  return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios, basePath));
1643
1550
  },
1644
1551
  /**
1645
- * Returns where the user\'s total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile. The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and `as_of` reports which month\'s distribution the placement came from. `data` is `null` — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user\'s own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user\'s assets would understate them, so none is returned.
1646
- * @summary Get the user\'s AUM percentile
1647
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1648
- * @param {*} [options] Override http request option.
1649
- * @throws {RequiredError}
1650
- */
1651
- getUserAumPercentile(requestParameters = {}, options) {
1652
- return localVarFp.getUserAumPercentile(requestParameters, options).then((request) => request(axios, basePath));
1653
- },
1654
- /**
1655
1552
  * **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.
1656
1553
  * @summary List account holdings
1657
1554
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -1791,17 +1688,6 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1791
1688
  return AccountInformationApiFp(this.configuration).getUserAccountReturnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
1792
1689
  }
1793
1690
  /**
1794
- * Returns where the user\'s total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile. The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and `as_of` reports which month\'s distribution the placement came from. `data` is `null` — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user\'s own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user\'s assets would understate them, so none is returned.
1795
- * @summary Get the user\'s AUM percentile
1796
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1797
- * @param {*} [options] Override http request option.
1798
- * @throws {RequiredError}
1799
- * @memberof AccountInformationApiGenerated
1800
- */
1801
- getUserAumPercentile(requestParameters = {}, options) {
1802
- return AccountInformationApiFp(this.configuration).getUserAumPercentile(requestParameters, options).then((request) => request(this.axios, this.basePath));
1803
- }
1804
- /**
1805
1691
  * **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.
1806
1692
  * @summary List account holdings
1807
1693
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -3840,7 +3726,7 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3840
3726
  };
3841
3727
  },
3842
3728
  /**
3843
- * 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 `investment` and `deposit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3729
+ * 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 (`investment`, `deposit`, and `line_of_credit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3844
3730
  * @summary List accounts for a connection (discriminated union)
3845
3731
  * @param {string} connectionId
3846
3732
  * @param {string} [userId]
@@ -4102,7 +3988,7 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4102
3988
  });
4103
3989
  },
4104
3990
  /**
4105
- * 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 `investment` and `deposit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3991
+ * 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 (`investment`, `deposit`, and `line_of_credit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4106
3992
  * @summary List accounts for a connection (discriminated union)
4107
3993
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4108
3994
  * @param {*} [options] Override http request option.
@@ -4205,7 +4091,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
4205
4091
  return localVarFp.getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(axios, basePath));
4206
4092
  },
4207
4093
  /**
4208
- * 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 `investment` and `deposit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4094
+ * 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 (`investment`, `deposit`, and `line_of_credit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4209
4095
  * @summary List accounts for a connection (discriminated union)
4210
4096
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4211
4097
  * @param {*} [options] Override http request option.
@@ -4288,7 +4174,7 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4288
4174
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4289
4175
  }
4290
4176
  /**
4291
- * 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 `investment` and `deposit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4177
+ * 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 (`investment`, `deposit`, and `line_of_credit` are 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 and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4292
4178
  * @summary List accounts for a connection (discriminated union)
4293
4179
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4294
4180
  * @param {*} [options] Override http request option.
@@ -7087,7 +6973,7 @@ var Configuration = class {
7087
6973
  }
7088
6974
  this.basePath = param.basePath;
7089
6975
  this.baseOptions = param.baseOptions ?? {};
7090
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.1.7/typescript" : param.userAgent;
6976
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.1.9/typescript" : param.userAgent;
7091
6977
  this.formDataCtor = param.formDataCtor;
7092
6978
  }
7093
6979
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "12.1.7",
3
+ "version": "12.1.9",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {