snaptrade-typescript-sdk 12.2.16 → 12.2.18

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
@@ -418,7 +418,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
418
418
  };
419
419
  },
420
420
  /**
421
- * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons)
421
+ * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) The data may contain gaps and is best used for charting account value trends. It should not be relied on as a complete or exact record of historical account values.
422
422
  * @summary List historical account total value
423
423
  * @param {string} accountId
424
424
  * @param {string} [userId]
@@ -1265,7 +1265,7 @@ const AccountInformationApiFp = function(configuration) {
1265
1265
  });
1266
1266
  },
1267
1267
  /**
1268
- * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons)
1268
+ * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) The data may contain gaps and is best used for charting account value trends. It should not be relied on as a complete or exact record of historical account values.
1269
1269
  * @summary List historical account total value
1270
1270
  * @param {AccountInformationApiGetAccountBalanceHistoryRequest<TAuth>} requestParameters Request parameters.
1271
1271
  * @param {*} [options] Override http request option.
@@ -1539,7 +1539,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
1539
1539
  return localVarFp.getAccountActivities(...args).then((request) => request(axios$8, basePath));
1540
1540
  },
1541
1541
  /**
1542
- * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons)
1542
+ * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) The data may contain gaps and is best used for charting account value trends. It should not be relied on as a complete or exact record of historical account values.
1543
1543
  * @summary List historical account total value
1544
1544
  * @param {AccountInformationApiGetAccountBalanceHistoryRequest<TAuth>} requestParameters Request parameters.
1545
1545
  * @param {*} [options] Override http request option.
@@ -1670,7 +1670,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1670
1670
  return AccountInformationApiFp(this.configuration).getAccountActivities(...args).then((request) => request(this.axios, this.basePath));
1671
1671
  }
1672
1672
  /**
1673
- * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons)
1673
+ * 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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) The data may contain gaps and is best used for charting account value trends. It should not be relied on as a complete or exact record of historical account values.
1674
1674
  * @summary List historical account total value
1675
1675
  * @param {AccountInformationApiGetAccountBalanceHistoryRequest<TAuth>} requestParameters Request parameters.
1676
1676
  * @param {*} [options] Override http request option.
@@ -3698,6 +3698,79 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3698
3698
  };
3699
3699
  },
3700
3700
  /**
3701
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
3702
+ * @summary Get account details
3703
+ * @param {string} accountId
3704
+ * @param {string} [userId]
3705
+ * @param {string} [userSecret]
3706
+ * @param {*} [options] Override http request option.
3707
+ * @throws {RequiredError}
3708
+ */
3709
+ getAccountDetails: async (accountId, userId, userSecret, options = {}) => {
3710
+ assertParamExists("getAccountDetails", "accountId", accountId);
3711
+ const localVarPath = `/accounts/{accountId}/details`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
3712
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3713
+ let baseOptions;
3714
+ if (configuration) baseOptions = configuration.baseOptions;
3715
+ const localVarRequestOptions = {
3716
+ method: "GET",
3717
+ ...baseOptions,
3718
+ ...options
3719
+ };
3720
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3721
+ const localVarQueryParameter = {};
3722
+ if (configuration?.authMode === "commercialApiKey") {
3723
+ await setApiKeyToObject({
3724
+ object: localVarQueryParameter,
3725
+ key: "clientId",
3726
+ keyParamName: "clientId",
3727
+ configuration
3728
+ });
3729
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3730
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3731
+ }
3732
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3733
+ object: localVarQueryParameter,
3734
+ key: "clientId",
3735
+ keyParamName: "clientId",
3736
+ configuration
3737
+ });
3738
+ const localVarOperationAuth = {
3739
+ authModes: ["commercialApiKey", "personalApiKey"],
3740
+ requestSigningByAuthMode: {
3741
+ "commercialApiKey": {
3742
+ secretParameter: "consumerKey",
3743
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3744
+ },
3745
+ "personalApiKey": {
3746
+ secretParameter: "consumerKey",
3747
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3748
+ }
3749
+ },
3750
+ selectedAuthMode: configuration?.authMode
3751
+ };
3752
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3753
+ localVarRequestOptions.headers = {
3754
+ ...localVarHeaderParameter,
3755
+ ...headersFromBaseOptions,
3756
+ ...options.headers
3757
+ };
3758
+ requestBeforeHook({
3759
+ queryParameters: localVarQueryParameter,
3760
+ requestConfig: localVarRequestOptions,
3761
+ path: localVarPath,
3762
+ configuration,
3763
+ pathTemplate: "/accounts/{accountId}/details",
3764
+ httpMethod: "GET",
3765
+ operationAuth: localVarOperationAuth
3766
+ });
3767
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3768
+ return {
3769
+ url: toPathString(localVarUrlObj),
3770
+ options: localVarRequestOptions
3771
+ };
3772
+ },
3773
+ /**
3701
3774
  * 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.
3702
3775
  * @summary Get account order detail (V2)
3703
3776
  * @param {string} accountId
@@ -3925,6 +3998,77 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3925
3998
  };
3926
3999
  },
3927
4000
  /**
4001
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4002
+ * @summary List all user accounts
4003
+ * @param {string} [userId]
4004
+ * @param {string} [userSecret]
4005
+ * @param {*} [options] Override http request option.
4006
+ * @throws {RequiredError}
4007
+ */
4008
+ listAllUserAccounts: async (userId, userSecret, options = {}) => {
4009
+ const localVarPath = `/accounts/all`;
4010
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4011
+ let baseOptions;
4012
+ if (configuration) baseOptions = configuration.baseOptions;
4013
+ const localVarRequestOptions = {
4014
+ method: "GET",
4015
+ ...baseOptions,
4016
+ ...options
4017
+ };
4018
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4019
+ const localVarQueryParameter = {};
4020
+ if (configuration?.authMode === "commercialApiKey") {
4021
+ await setApiKeyToObject({
4022
+ object: localVarQueryParameter,
4023
+ key: "clientId",
4024
+ keyParamName: "clientId",
4025
+ configuration
4026
+ });
4027
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4028
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4029
+ }
4030
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4031
+ object: localVarQueryParameter,
4032
+ key: "clientId",
4033
+ keyParamName: "clientId",
4034
+ configuration
4035
+ });
4036
+ const localVarOperationAuth = {
4037
+ authModes: ["commercialApiKey", "personalApiKey"],
4038
+ requestSigningByAuthMode: {
4039
+ "commercialApiKey": {
4040
+ secretParameter: "consumerKey",
4041
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4042
+ },
4043
+ "personalApiKey": {
4044
+ secretParameter: "consumerKey",
4045
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4046
+ }
4047
+ },
4048
+ selectedAuthMode: configuration?.authMode
4049
+ };
4050
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4051
+ localVarRequestOptions.headers = {
4052
+ ...localVarHeaderParameter,
4053
+ ...headersFromBaseOptions,
4054
+ ...options.headers
4055
+ };
4056
+ requestBeforeHook({
4057
+ queryParameters: localVarQueryParameter,
4058
+ requestConfig: localVarRequestOptions,
4059
+ path: localVarPath,
4060
+ configuration,
4061
+ pathTemplate: "/accounts/all",
4062
+ httpMethod: "GET",
4063
+ operationAuth: localVarOperationAuth
4064
+ });
4065
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4066
+ return {
4067
+ url: toPathString(localVarUrlObj),
4068
+ options: localVarRequestOptions
4069
+ };
4070
+ },
4071
+ /**
3928
4072
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
3929
4073
  * @summary List active Trade Detection subscriptions
3930
4074
  * @param {*} [options] Override http request option.
@@ -3988,6 +4132,84 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3988
4132
  url: toPathString(localVarUrlObj),
3989
4133
  options: localVarRequestOptions
3990
4134
  };
4135
+ },
4136
+ /**
4137
+ * **Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase. Equity and equity-option orders use the existing brokerage trading capabilities. Futures and future options are currently supported only on tastytrade. Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages). An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders. All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or the exact tastytrade BrokerageInstrument ticker for futures and future options, including any spaces. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
4138
+ * @summary Place a simple order (beta)
4139
+ * @param {string} accountId The ID of the account to execute the trade on.
4140
+ * @param {SimpleTradeForm} simpleTradeForm
4141
+ * @param {string} [userId]
4142
+ * @param {string} [userSecret]
4143
+ * @param {*} [options] Override http request option.
4144
+ * @throws {RequiredError}
4145
+ */
4146
+ placeSimpleOrder: async (accountId, simpleTradeForm, userId, userSecret, options = {}) => {
4147
+ assertParamExists("placeSimpleOrder", "accountId", accountId);
4148
+ assertParamExists("placeSimpleOrder", "simpleTradeForm", simpleTradeForm);
4149
+ const localVarPath = `/accounts/{accountId}/trading/simple`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4151
+ let baseOptions;
4152
+ if (configuration) baseOptions = configuration.baseOptions;
4153
+ const localVarRequestOptions = {
4154
+ method: "POST",
4155
+ ...baseOptions,
4156
+ ...options
4157
+ };
4158
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4159
+ const localVarQueryParameter = {};
4160
+ if (configuration?.authMode === "commercialApiKey") {
4161
+ await setApiKeyToObject({
4162
+ object: localVarQueryParameter,
4163
+ key: "clientId",
4164
+ keyParamName: "clientId",
4165
+ configuration
4166
+ });
4167
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4168
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4169
+ }
4170
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4171
+ object: localVarQueryParameter,
4172
+ key: "clientId",
4173
+ keyParamName: "clientId",
4174
+ configuration
4175
+ });
4176
+ const localVarOperationAuth = {
4177
+ authModes: ["commercialApiKey", "personalApiKey"],
4178
+ requestSigningByAuthMode: {
4179
+ "commercialApiKey": {
4180
+ secretParameter: "consumerKey",
4181
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4182
+ },
4183
+ "personalApiKey": {
4184
+ secretParameter: "consumerKey",
4185
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4186
+ }
4187
+ },
4188
+ selectedAuthMode: configuration?.authMode
4189
+ };
4190
+ localVarHeaderParameter["Content-Type"] = "application/json";
4191
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4192
+ localVarRequestOptions.headers = {
4193
+ ...localVarHeaderParameter,
4194
+ ...headersFromBaseOptions,
4195
+ ...options.headers
4196
+ };
4197
+ requestBeforeHook({
4198
+ requestBody: simpleTradeForm,
4199
+ queryParameters: localVarQueryParameter,
4200
+ requestConfig: localVarRequestOptions,
4201
+ path: localVarPath,
4202
+ configuration,
4203
+ pathTemplate: "/accounts/{accountId}/trading/simple",
4204
+ httpMethod: "POST",
4205
+ operationAuth: localVarOperationAuth
4206
+ });
4207
+ localVarRequestOptions.data = serializeDataIfNeeded(simpleTradeForm, localVarRequestOptions, configuration);
4208
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4209
+ return {
4210
+ url: toPathString(localVarUrlObj),
4211
+ options: localVarRequestOptions
4212
+ };
3991
4213
  }
3992
4214
  };
3993
4215
  };
@@ -4050,6 +4272,29 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4050
4272
  });
4051
4273
  },
4052
4274
  /**
4275
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
4276
+ * @summary Get account details
4277
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4278
+ * @param {*} [options] Override http request option.
4279
+ * @throws {RequiredError}
4280
+ */
4281
+ async getAccountDetails(...args) {
4282
+ const [requestParameters = {}, options] = args;
4283
+ return createRequestFunction(await localVarAxiosParamCreator.getAccountDetails(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4284
+ authModes: ["commercialApiKey", "personalApiKey"],
4285
+ requestSigningByAuthMode: {
4286
+ "commercialApiKey": {
4287
+ secretParameter: "consumerKey",
4288
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4289
+ },
4290
+ "personalApiKey": {
4291
+ secretParameter: "consumerKey",
4292
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4293
+ }
4294
+ }
4295
+ });
4296
+ },
4297
+ /**
4053
4298
  * 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.
4054
4299
  * @summary Get account order detail (V2)
4055
4300
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4119,6 +4364,29 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4119
4364
  });
4120
4365
  },
4121
4366
  /**
4367
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4368
+ * @summary List all user accounts
4369
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4370
+ * @param {*} [options] Override http request option.
4371
+ * @throws {RequiredError}
4372
+ */
4373
+ async listAllUserAccounts(...args) {
4374
+ const [requestParameters = {}, options] = args;
4375
+ return createRequestFunction(await localVarAxiosParamCreator.listAllUserAccounts(requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4376
+ authModes: ["commercialApiKey", "personalApiKey"],
4377
+ requestSigningByAuthMode: {
4378
+ "commercialApiKey": {
4379
+ secretParameter: "consumerKey",
4380
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4381
+ },
4382
+ "personalApiKey": {
4383
+ secretParameter: "consumerKey",
4384
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4385
+ }
4386
+ }
4387
+ });
4388
+ },
4389
+ /**
4122
4390
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4123
4391
  * @summary List active Trade Detection subscriptions
4124
4392
  * @param {*} [options] Override http request option.
@@ -4139,6 +4407,41 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4139
4407
  }
4140
4408
  }
4141
4409
  });
4410
+ },
4411
+ /**
4412
+ * **Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase. Equity and equity-option orders use the existing brokerage trading capabilities. Futures and future options are currently supported only on tastytrade. Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages). An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders. All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or the exact tastytrade BrokerageInstrument ticker for futures and future options, including any spaces. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
4413
+ * @summary Place a simple order (beta)
4414
+ * @param {ExperimentalEndpointsApiPlaceSimpleOrderRequest<TAuth>} requestParameters Request parameters.
4415
+ * @param {*} [options] Override http request option.
4416
+ * @throws {RequiredError}
4417
+ */
4418
+ async placeSimpleOrder(...args) {
4419
+ const [requestParameters = {}, options] = args;
4420
+ const simpleTradeForm = {
4421
+ order_type: requestParameters.order_type,
4422
+ time_in_force: requestParameters.time_in_force,
4423
+ legs: requestParameters.legs,
4424
+ limit_price: requestParameters.limit_price,
4425
+ stop_price: requestParameters.stop_price,
4426
+ price_effect: requestParameters.price_effect,
4427
+ client_order_id: requestParameters.client_order_id,
4428
+ expiry_date: requestParameters.expiry_date,
4429
+ notional_value: requestParameters.notional_value,
4430
+ trading_session: requestParameters.trading_session
4431
+ };
4432
+ return createRequestFunction(await localVarAxiosParamCreator.placeSimpleOrder(requestParameters.accountId, simpleTradeForm, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4433
+ authModes: ["commercialApiKey", "personalApiKey"],
4434
+ requestSigningByAuthMode: {
4435
+ "commercialApiKey": {
4436
+ secretParameter: "consumerKey",
4437
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4438
+ },
4439
+ "personalApiKey": {
4440
+ secretParameter: "consumerKey",
4441
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4442
+ }
4443
+ }
4444
+ });
4142
4445
  }
4143
4446
  };
4144
4447
  };
@@ -4170,6 +4473,16 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4170
4473
  return localVarFp.cancelSubscription(...args).then((request) => request(axios$4, basePath));
4171
4474
  },
4172
4475
  /**
4476
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
4477
+ * @summary Get account details
4478
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4479
+ * @param {*} [options] Override http request option.
4480
+ * @throws {RequiredError}
4481
+ */
4482
+ getAccountDetails(...args) {
4483
+ return localVarFp.getAccountDetails(...args).then((request) => request(axios$4, basePath));
4484
+ },
4485
+ /**
4173
4486
  * 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.
4174
4487
  * @summary Get account order detail (V2)
4175
4488
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4200,6 +4513,16 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4200
4513
  return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios$4, basePath));
4201
4514
  },
4202
4515
  /**
4516
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4517
+ * @summary List all user accounts
4518
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4519
+ * @param {*} [options] Override http request option.
4520
+ * @throws {RequiredError}
4521
+ */
4522
+ listAllUserAccounts(...args) {
4523
+ return localVarFp.listAllUserAccounts(...args).then((request) => request(axios$4, basePath));
4524
+ },
4525
+ /**
4203
4526
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4204
4527
  * @summary List active Trade Detection subscriptions
4205
4528
  * @param {*} [options] Override http request option.
@@ -4207,6 +4530,16 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4207
4530
  */
4208
4531
  listSubscriptions(...args) {
4209
4532
  return localVarFp.listSubscriptions(...args).then((request) => request(axios$4, basePath));
4533
+ },
4534
+ /**
4535
+ * **Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase. Equity and equity-option orders use the existing brokerage trading capabilities. Futures and future options are currently supported only on tastytrade. Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages). An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders. All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or the exact tastytrade BrokerageInstrument ticker for futures and future options, including any spaces. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
4536
+ * @summary Place a simple order (beta)
4537
+ * @param {ExperimentalEndpointsApiPlaceSimpleOrderRequest<TAuth>} requestParameters Request parameters.
4538
+ * @param {*} [options] Override http request option.
4539
+ * @throws {RequiredError}
4540
+ */
4541
+ placeSimpleOrder(...args) {
4542
+ return localVarFp.placeSimpleOrder(...args).then((request) => request(axios$4, basePath));
4210
4543
  }
4211
4544
  };
4212
4545
  };
@@ -4240,6 +4573,17 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4240
4573
  return ExperimentalEndpointsApiFp(this.configuration).cancelSubscription(...args).then((request) => request(this.axios, this.basePath));
4241
4574
  }
4242
4575
  /**
4576
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
4577
+ * @summary Get account details
4578
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4579
+ * @param {*} [options] Override http request option.
4580
+ * @throws {RequiredError}
4581
+ * @memberof ExperimentalEndpointsApiGenerated
4582
+ */
4583
+ getAccountDetails(...args) {
4584
+ return ExperimentalEndpointsApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
4585
+ }
4586
+ /**
4243
4587
  * 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.
4244
4588
  * @summary Get account order detail (V2)
4245
4589
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4273,6 +4617,17 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4273
4617
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(...args).then((request) => request(this.axios, this.basePath));
4274
4618
  }
4275
4619
  /**
4620
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4621
+ * @summary List all user accounts
4622
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4623
+ * @param {*} [options] Override http request option.
4624
+ * @throws {RequiredError}
4625
+ * @memberof ExperimentalEndpointsApiGenerated
4626
+ */
4627
+ listAllUserAccounts(...args) {
4628
+ return ExperimentalEndpointsApiFp(this.configuration).listAllUserAccounts(...args).then((request) => request(this.axios, this.basePath));
4629
+ }
4630
+ /**
4276
4631
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4277
4632
  * @summary List active Trade Detection subscriptions
4278
4633
  * @param {*} [options] Override http request option.
@@ -4282,6 +4637,17 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4282
4637
  listSubscriptions(...args) {
4283
4638
  return ExperimentalEndpointsApiFp(this.configuration).listSubscriptions(...args).then((request) => request(this.axios, this.basePath));
4284
4639
  }
4640
+ /**
4641
+ * **Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase. Equity and equity-option orders use the existing brokerage trading capabilities. Futures and future options are currently supported only on tastytrade. Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages). An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders. All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or the exact tastytrade BrokerageInstrument ticker for futures and future options, including any spaces. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
4642
+ * @summary Place a simple order (beta)
4643
+ * @param {ExperimentalEndpointsApiPlaceSimpleOrderRequest<TAuth>} requestParameters Request parameters.
4644
+ * @param {*} [options] Override http request option.
4645
+ * @throws {RequiredError}
4646
+ * @memberof ExperimentalEndpointsApiGenerated
4647
+ */
4648
+ placeSimpleOrder(...args) {
4649
+ return ExperimentalEndpointsApiFp(this.configuration).placeSimpleOrder(...args).then((request) => request(this.axios, this.basePath));
4650
+ }
4285
4651
  };
4286
4652
  //#endregion
4287
4653
  //#region api/experimental-endpoints-api.ts
@@ -7151,7 +7517,7 @@ var Configuration = class {
7151
7517
  }
7152
7518
  this.basePath = param.basePath;
7153
7519
  this.baseOptions = param.baseOptions ?? {};
7154
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.16/typescript" : param.userAgent;
7520
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.18/typescript" : param.userAgent;
7155
7521
  this.formDataCtor = param.formDataCtor;
7156
7522
  }
7157
7523
  /**