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.cjs CHANGED
@@ -981,77 +981,6 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
981
981
  };
982
982
  },
983
983
  /**
984
- * 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.
985
- * @summary Get the user\'s AUM percentile
986
- * @param {string} [userId]
987
- * @param {string} [userSecret]
988
- * @param {*} [options] Override http request option.
989
- * @throws {RequiredError}
990
- */
991
- getUserAumPercentile: async (userId, userSecret, options = {}) => {
992
- const localVarPath = `/aumPercentile`;
993
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
994
- let baseOptions;
995
- if (configuration) baseOptions = configuration.baseOptions;
996
- const localVarRequestOptions = {
997
- method: "GET",
998
- ...baseOptions,
999
- ...options
1000
- };
1001
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
1002
- const localVarQueryParameter = {};
1003
- if (configuration?.authMode === "commercialApiKey") {
1004
- await setApiKeyToObject({
1005
- object: localVarQueryParameter,
1006
- key: "clientId",
1007
- keyParamName: "clientId",
1008
- configuration
1009
- });
1010
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
1011
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
1012
- }
1013
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
1014
- object: localVarQueryParameter,
1015
- key: "clientId",
1016
- keyParamName: "clientId",
1017
- configuration
1018
- });
1019
- const localVarOperationAuth = {
1020
- authModes: ["commercialApiKey", "personalApiKey"],
1021
- requestSigningByAuthMode: {
1022
- "commercialApiKey": {
1023
- secretParameter: "consumerKey",
1024
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1025
- },
1026
- "personalApiKey": {
1027
- secretParameter: "consumerKey",
1028
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1029
- }
1030
- },
1031
- selectedAuthMode: configuration?.authMode
1032
- };
1033
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1034
- localVarRequestOptions.headers = {
1035
- ...localVarHeaderParameter,
1036
- ...headersFromBaseOptions,
1037
- ...options.headers
1038
- };
1039
- requestBeforeHook({
1040
- queryParameters: localVarQueryParameter,
1041
- requestConfig: localVarRequestOptions,
1042
- path: localVarPath,
1043
- configuration,
1044
- pathTemplate: "/aumPercentile",
1045
- httpMethod: "GET",
1046
- operationAuth: localVarOperationAuth
1047
- });
1048
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1049
- return {
1050
- url: toPathString(localVarUrlObj),
1051
- options: localVarRequestOptions
1052
- };
1053
- },
1054
- /**
1055
984
  * **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.
1056
985
  * @summary List account holdings
1057
986
  * @param {string} accountId
@@ -1478,28 +1407,6 @@ const AccountInformationApiFp = function(configuration) {
1478
1407
  });
1479
1408
  },
1480
1409
  /**
1481
- * 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.
1482
- * @summary Get the user\'s AUM percentile
1483
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1484
- * @param {*} [options] Override http request option.
1485
- * @throws {RequiredError}
1486
- */
1487
- async getUserAumPercentile(requestParameters = {}, options) {
1488
- return createRequestFunction(await localVarAxiosParamCreator.getUserAumPercentile(requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1489
- authModes: ["commercialApiKey", "personalApiKey"],
1490
- requestSigningByAuthMode: {
1491
- "commercialApiKey": {
1492
- secretParameter: "consumerKey",
1493
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1494
- },
1495
- "personalApiKey": {
1496
- secretParameter: "consumerKey",
1497
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1498
- }
1499
- }
1500
- });
1501
- },
1502
- /**
1503
1410
  * **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.
1504
1411
  * @summary List account holdings
1505
1412
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -1666,16 +1573,6 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$7)
1666
1573
  return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios$7, basePath));
1667
1574
  },
1668
1575
  /**
1669
- * 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.
1670
- * @summary Get the user\'s AUM percentile
1671
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1672
- * @param {*} [options] Override http request option.
1673
- * @throws {RequiredError}
1674
- */
1675
- getUserAumPercentile(requestParameters = {}, options) {
1676
- return localVarFp.getUserAumPercentile(requestParameters, options).then((request) => request(axios$7, basePath));
1677
- },
1678
- /**
1679
1576
  * **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.
1680
1577
  * @summary List account holdings
1681
1578
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -1815,17 +1712,6 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1815
1712
  return AccountInformationApiFp(this.configuration).getUserAccountReturnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
1816
1713
  }
1817
1714
  /**
1818
- * 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.
1819
- * @summary Get the user\'s AUM percentile
1820
- * @param {AccountInformationApiGetUserAumPercentileRequest<TAuth>} requestParameters Request parameters.
1821
- * @param {*} [options] Override http request option.
1822
- * @throws {RequiredError}
1823
- * @memberof AccountInformationApiGenerated
1824
- */
1825
- getUserAumPercentile(requestParameters = {}, options) {
1826
- return AccountInformationApiFp(this.configuration).getUserAumPercentile(requestParameters, options).then((request) => request(this.axios, this.basePath));
1827
- }
1828
- /**
1829
1715
  * **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.
1830
1716
  * @summary List account holdings
1831
1717
  * @param {AccountInformationApiGetUserHoldingsRequest<TAuth>} requestParameters Request parameters.
@@ -3864,7 +3750,7 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3864
3750
  };
3865
3751
  },
3866
3752
  /**
3867
- * 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.
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 (`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.
3868
3754
  * @summary List accounts for a connection (discriminated union)
3869
3755
  * @param {string} connectionId
3870
3756
  * @param {string} [userId]
@@ -4126,7 +4012,7 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4126
4012
  });
4127
4013
  },
4128
4014
  /**
4129
- * 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.
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 (`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.
4130
4016
  * @summary List accounts for a connection (discriminated union)
4131
4017
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4132
4018
  * @param {*} [options] Override http request option.
@@ -4229,7 +4115,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4229
4115
  return localVarFp.getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(axios$3, basePath));
4230
4116
  },
4231
4117
  /**
4232
- * 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.
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 (`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.
4233
4119
  * @summary List accounts for a connection (discriminated union)
4234
4120
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4235
4121
  * @param {*} [options] Override http request option.
@@ -4312,7 +4198,7 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4312
4198
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
4313
4199
  }
4314
4200
  /**
4315
- * 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.
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 (`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.
4316
4202
  * @summary List accounts for a connection (discriminated union)
4317
4203
  * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4318
4204
  * @param {*} [options] Override http request option.
@@ -7111,7 +6997,7 @@ var Configuration = class {
7111
6997
  }
7112
6998
  this.basePath = param.basePath;
7113
6999
  this.baseOptions = param.baseOptions ?? {};
7114
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.1.7/typescript" : param.userAgent;
7000
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.1.9/typescript" : param.userAgent;
7115
7001
  this.formDataCtor = param.formDataCtor;
7116
7002
  }
7117
7003
  /**