snaptrade-typescript-sdk 12.2.5 → 12.2.7
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/README.md +66 -66
- package/dist/browser.umd.js +1 -1
- package/dist/index.cjs +122 -122
- package/dist/index.d.cts +147 -67
- package/dist/index.d.mts +147 -67
- package/dist/index.d.ts +147 -67
- package/dist/index.mjs +122 -122
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -467,7 +467,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
|
|
|
467
467
|
};
|
|
468
468
|
},
|
|
469
469
|
/**
|
|
470
|
-
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
470
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
471
471
|
* @summary List all account positions
|
|
472
472
|
* @param {string} accountId
|
|
473
473
|
* @param {string} [userId]
|
|
@@ -1264,7 +1264,7 @@ const AccountInformationApiFp = function(configuration) {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
},
|
|
1266
1266
|
/**
|
|
1267
|
-
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1267
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1268
1268
|
* @summary List all account positions
|
|
1269
1269
|
* @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
|
|
1270
1270
|
* @param {*} [options] Override http request option.
|
|
@@ -1525,7 +1525,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
|
|
|
1525
1525
|
return localVarFp.getAccountBalanceHistory(...args).then((request) => request(axios, basePath));
|
|
1526
1526
|
},
|
|
1527
1527
|
/**
|
|
1528
|
-
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1528
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1529
1529
|
* @summary List all account positions
|
|
1530
1530
|
* @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
|
|
1531
1531
|
* @param {*} [options] Override http request option.
|
|
@@ -1657,7 +1657,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
|
|
|
1657
1657
|
return AccountInformationApiFp(this.configuration).getAccountBalanceHistory(...args).then((request) => request(this.axios, this.basePath));
|
|
1658
1658
|
}
|
|
1659
1659
|
/**
|
|
1660
|
-
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1660
|
+
* Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
1661
1661
|
* @summary List all account positions
|
|
1662
1662
|
* @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
|
|
1663
1663
|
* @param {*} [options] Override http request option.
|
|
@@ -2799,6 +2799,79 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
|
|
|
2799
2799
|
};
|
|
2800
2800
|
},
|
|
2801
2801
|
/**
|
|
2802
|
+
* 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.
|
|
2803
|
+
* @summary List accounts for a connection (discriminated union)
|
|
2804
|
+
* @param {string} connectionId
|
|
2805
|
+
* @param {string} [userId]
|
|
2806
|
+
* @param {string} [userSecret]
|
|
2807
|
+
* @param {*} [options] Override http request option.
|
|
2808
|
+
* @throws {RequiredError}
|
|
2809
|
+
*/
|
|
2810
|
+
listConnectionAccounts: async (connectionId, userId, userSecret, options = {}) => {
|
|
2811
|
+
assertParamExists("listConnectionAccounts", "connectionId", connectionId);
|
|
2812
|
+
const localVarPath = `/connections/{connectionId}/accounts`.replace(`{connectionId}`, encodeURIComponent(String(connectionId !== void 0 ? connectionId : `-connectionId-`)));
|
|
2813
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2814
|
+
let baseOptions;
|
|
2815
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
2816
|
+
const localVarRequestOptions = {
|
|
2817
|
+
method: "GET",
|
|
2818
|
+
...baseOptions,
|
|
2819
|
+
...options
|
|
2820
|
+
};
|
|
2821
|
+
const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
|
|
2822
|
+
const localVarQueryParameter = {};
|
|
2823
|
+
if (configuration?.authMode === "commercialApiKey") {
|
|
2824
|
+
await setApiKeyToObject({
|
|
2825
|
+
object: localVarQueryParameter,
|
|
2826
|
+
key: "clientId",
|
|
2827
|
+
keyParamName: "clientId",
|
|
2828
|
+
configuration
|
|
2829
|
+
});
|
|
2830
|
+
if (userId !== void 0) localVarQueryParameter["userId"] = userId;
|
|
2831
|
+
if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
|
|
2832
|
+
}
|
|
2833
|
+
if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
|
|
2834
|
+
object: localVarQueryParameter,
|
|
2835
|
+
key: "clientId",
|
|
2836
|
+
keyParamName: "clientId",
|
|
2837
|
+
configuration
|
|
2838
|
+
});
|
|
2839
|
+
const localVarOperationAuth = {
|
|
2840
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
2841
|
+
requestSigningByAuthMode: {
|
|
2842
|
+
"commercialApiKey": {
|
|
2843
|
+
secretParameter: "consumerKey",
|
|
2844
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
2845
|
+
},
|
|
2846
|
+
"personalApiKey": {
|
|
2847
|
+
secretParameter: "consumerKey",
|
|
2848
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
selectedAuthMode: configuration?.authMode
|
|
2852
|
+
};
|
|
2853
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2854
|
+
localVarRequestOptions.headers = {
|
|
2855
|
+
...localVarHeaderParameter,
|
|
2856
|
+
...headersFromBaseOptions,
|
|
2857
|
+
...options.headers
|
|
2858
|
+
};
|
|
2859
|
+
requestBeforeHook({
|
|
2860
|
+
queryParameters: localVarQueryParameter,
|
|
2861
|
+
requestConfig: localVarRequestOptions,
|
|
2862
|
+
path: localVarPath,
|
|
2863
|
+
configuration,
|
|
2864
|
+
pathTemplate: "/connections/{connectionId}/accounts",
|
|
2865
|
+
httpMethod: "GET",
|
|
2866
|
+
operationAuth: localVarOperationAuth
|
|
2867
|
+
});
|
|
2868
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2869
|
+
return {
|
|
2870
|
+
url: toPathString(localVarUrlObj),
|
|
2871
|
+
options: localVarRequestOptions
|
|
2872
|
+
};
|
|
2873
|
+
},
|
|
2874
|
+
/**
|
|
2802
2875
|
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
|
|
2803
2876
|
* @summary Refresh holdings for a connection
|
|
2804
2877
|
* @param {string} authorizationId
|
|
@@ -3144,6 +3217,29 @@ const ConnectionsApiFp = function(configuration) {
|
|
|
3144
3217
|
});
|
|
3145
3218
|
},
|
|
3146
3219
|
/**
|
|
3220
|
+
* 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.
|
|
3221
|
+
* @summary List accounts for a connection (discriminated union)
|
|
3222
|
+
* @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
3223
|
+
* @param {*} [options] Override http request option.
|
|
3224
|
+
* @throws {RequiredError}
|
|
3225
|
+
*/
|
|
3226
|
+
async listConnectionAccounts(...args) {
|
|
3227
|
+
const [requestParameters = {}, options] = args;
|
|
3228
|
+
return createRequestFunction(await localVarAxiosParamCreator.listConnectionAccounts(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
|
|
3229
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
3230
|
+
requestSigningByAuthMode: {
|
|
3231
|
+
"commercialApiKey": {
|
|
3232
|
+
secretParameter: "consumerKey",
|
|
3233
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
3234
|
+
},
|
|
3235
|
+
"personalApiKey": {
|
|
3236
|
+
secretParameter: "consumerKey",
|
|
3237
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
});
|
|
3241
|
+
},
|
|
3242
|
+
/**
|
|
3147
3243
|
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
|
|
3148
3244
|
* @summary Refresh holdings for a connection
|
|
3149
3245
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
|
|
@@ -3272,6 +3368,16 @@ const ConnectionsApiFactory = function(configuration, basePath, axios) {
|
|
|
3272
3368
|
return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios, basePath));
|
|
3273
3369
|
},
|
|
3274
3370
|
/**
|
|
3371
|
+
* 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.
|
|
3372
|
+
* @summary List accounts for a connection (discriminated union)
|
|
3373
|
+
* @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
3374
|
+
* @param {*} [options] Override http request option.
|
|
3375
|
+
* @throws {RequiredError}
|
|
3376
|
+
*/
|
|
3377
|
+
listConnectionAccounts(...args) {
|
|
3378
|
+
return localVarFp.listConnectionAccounts(...args).then((request) => request(axios, basePath));
|
|
3379
|
+
},
|
|
3380
|
+
/**
|
|
3275
3381
|
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
|
|
3276
3382
|
* @summary Refresh holdings for a connection
|
|
3277
3383
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
|
|
@@ -3366,6 +3472,17 @@ var ConnectionsApiGenerated = class extends BaseAPI {
|
|
|
3366
3472
|
return ConnectionsApiFp(this.configuration).listBrokerageAuthorizations(...args).then((request) => request(this.axios, this.basePath));
|
|
3367
3473
|
}
|
|
3368
3474
|
/**
|
|
3475
|
+
* 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.
|
|
3476
|
+
* @summary List accounts for a connection (discriminated union)
|
|
3477
|
+
* @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
3478
|
+
* @param {*} [options] Override http request option.
|
|
3479
|
+
* @throws {RequiredError}
|
|
3480
|
+
* @memberof ConnectionsApiGenerated
|
|
3481
|
+
*/
|
|
3482
|
+
listConnectionAccounts(...args) {
|
|
3483
|
+
return ConnectionsApiFp(this.configuration).listConnectionAccounts(...args).then((request) => request(this.axios, this.basePath));
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3369
3486
|
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
|
|
3370
3487
|
* @summary Refresh holdings for a connection
|
|
3371
3488
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
|
|
@@ -3784,79 +3901,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
|
|
|
3784
3901
|
};
|
|
3785
3902
|
},
|
|
3786
3903
|
/**
|
|
3787
|
-
* 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.
|
|
3788
|
-
* @summary List accounts for a connection (discriminated union)
|
|
3789
|
-
* @param {string} connectionId
|
|
3790
|
-
* @param {string} [userId]
|
|
3791
|
-
* @param {string} [userSecret]
|
|
3792
|
-
* @param {*} [options] Override http request option.
|
|
3793
|
-
* @throws {RequiredError}
|
|
3794
|
-
*/
|
|
3795
|
-
listConnectionAccounts: async (connectionId, userId, userSecret, options = {}) => {
|
|
3796
|
-
assertParamExists("listConnectionAccounts", "connectionId", connectionId);
|
|
3797
|
-
const localVarPath = `/connections/{connectionId}/accounts`.replace(`{connectionId}`, encodeURIComponent(String(connectionId !== void 0 ? connectionId : `-connectionId-`)));
|
|
3798
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3799
|
-
let baseOptions;
|
|
3800
|
-
if (configuration) baseOptions = configuration.baseOptions;
|
|
3801
|
-
const localVarRequestOptions = {
|
|
3802
|
-
method: "GET",
|
|
3803
|
-
...baseOptions,
|
|
3804
|
-
...options
|
|
3805
|
-
};
|
|
3806
|
-
const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
|
|
3807
|
-
const localVarQueryParameter = {};
|
|
3808
|
-
if (configuration?.authMode === "commercialApiKey") {
|
|
3809
|
-
await setApiKeyToObject({
|
|
3810
|
-
object: localVarQueryParameter,
|
|
3811
|
-
key: "clientId",
|
|
3812
|
-
keyParamName: "clientId",
|
|
3813
|
-
configuration
|
|
3814
|
-
});
|
|
3815
|
-
if (userId !== void 0) localVarQueryParameter["userId"] = userId;
|
|
3816
|
-
if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
|
|
3817
|
-
}
|
|
3818
|
-
if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
|
|
3819
|
-
object: localVarQueryParameter,
|
|
3820
|
-
key: "clientId",
|
|
3821
|
-
keyParamName: "clientId",
|
|
3822
|
-
configuration
|
|
3823
|
-
});
|
|
3824
|
-
const localVarOperationAuth = {
|
|
3825
|
-
authModes: ["commercialApiKey", "personalApiKey"],
|
|
3826
|
-
requestSigningByAuthMode: {
|
|
3827
|
-
"commercialApiKey": {
|
|
3828
|
-
secretParameter: "consumerKey",
|
|
3829
|
-
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
3830
|
-
},
|
|
3831
|
-
"personalApiKey": {
|
|
3832
|
-
secretParameter: "consumerKey",
|
|
3833
|
-
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
3834
|
-
}
|
|
3835
|
-
},
|
|
3836
|
-
selectedAuthMode: configuration?.authMode
|
|
3837
|
-
};
|
|
3838
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3839
|
-
localVarRequestOptions.headers = {
|
|
3840
|
-
...localVarHeaderParameter,
|
|
3841
|
-
...headersFromBaseOptions,
|
|
3842
|
-
...options.headers
|
|
3843
|
-
};
|
|
3844
|
-
requestBeforeHook({
|
|
3845
|
-
queryParameters: localVarQueryParameter,
|
|
3846
|
-
requestConfig: localVarRequestOptions,
|
|
3847
|
-
path: localVarPath,
|
|
3848
|
-
configuration,
|
|
3849
|
-
pathTemplate: "/connections/{connectionId}/accounts",
|
|
3850
|
-
httpMethod: "GET",
|
|
3851
|
-
operationAuth: localVarOperationAuth
|
|
3852
|
-
});
|
|
3853
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3854
|
-
return {
|
|
3855
|
-
url: toPathString(localVarUrlObj),
|
|
3856
|
-
options: localVarRequestOptions
|
|
3857
|
-
};
|
|
3858
|
-
},
|
|
3859
|
-
/**
|
|
3860
3904
|
* Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
3861
3905
|
* @summary List active Trade Detection subscriptions
|
|
3862
3906
|
* @param {*} [options] Override http request option.
|
|
@@ -4051,29 +4095,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
|
|
|
4051
4095
|
});
|
|
4052
4096
|
},
|
|
4053
4097
|
/**
|
|
4054
|
-
* 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.
|
|
4055
|
-
* @summary List accounts for a connection (discriminated union)
|
|
4056
|
-
* @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
4057
|
-
* @param {*} [options] Override http request option.
|
|
4058
|
-
* @throws {RequiredError}
|
|
4059
|
-
*/
|
|
4060
|
-
async listConnectionAccounts(...args) {
|
|
4061
|
-
const [requestParameters = {}, options] = args;
|
|
4062
|
-
return createRequestFunction(await localVarAxiosParamCreator.listConnectionAccounts(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
|
|
4063
|
-
authModes: ["commercialApiKey", "personalApiKey"],
|
|
4064
|
-
requestSigningByAuthMode: {
|
|
4065
|
-
"commercialApiKey": {
|
|
4066
|
-
secretParameter: "consumerKey",
|
|
4067
|
-
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
4068
|
-
},
|
|
4069
|
-
"personalApiKey": {
|
|
4070
|
-
secretParameter: "consumerKey",
|
|
4071
|
-
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
4072
|
-
}
|
|
4073
|
-
}
|
|
4074
|
-
});
|
|
4075
|
-
},
|
|
4076
|
-
/**
|
|
4077
4098
|
* Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
4078
4099
|
* @summary List active Trade Detection subscriptions
|
|
4079
4100
|
* @param {*} [options] Override http request option.
|
|
@@ -4155,16 +4176,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
|
|
|
4155
4176
|
return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios, basePath));
|
|
4156
4177
|
},
|
|
4157
4178
|
/**
|
|
4158
|
-
* 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.
|
|
4159
|
-
* @summary List accounts for a connection (discriminated union)
|
|
4160
|
-
* @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
4161
|
-
* @param {*} [options] Override http request option.
|
|
4162
|
-
* @throws {RequiredError}
|
|
4163
|
-
*/
|
|
4164
|
-
listConnectionAccounts(...args) {
|
|
4165
|
-
return localVarFp.listConnectionAccounts(...args).then((request) => request(axios, basePath));
|
|
4166
|
-
},
|
|
4167
|
-
/**
|
|
4168
4179
|
* Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
4169
4180
|
* @summary List active Trade Detection subscriptions
|
|
4170
4181
|
* @param {*} [options] Override http request option.
|
|
@@ -4238,17 +4249,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
|
|
|
4238
4249
|
return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(...args).then((request) => request(this.axios, this.basePath));
|
|
4239
4250
|
}
|
|
4240
4251
|
/**
|
|
4241
|
-
* 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.
|
|
4242
|
-
* @summary List accounts for a connection (discriminated union)
|
|
4243
|
-
* @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
|
|
4244
|
-
* @param {*} [options] Override http request option.
|
|
4245
|
-
* @throws {RequiredError}
|
|
4246
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
4247
|
-
*/
|
|
4248
|
-
listConnectionAccounts(...args) {
|
|
4249
|
-
return ExperimentalEndpointsApiFp(this.configuration).listConnectionAccounts(...args).then((request) => request(this.axios, this.basePath));
|
|
4250
|
-
}
|
|
4251
|
-
/**
|
|
4252
4252
|
* Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
4253
4253
|
* @summary List active Trade Detection subscriptions
|
|
4254
4254
|
* @param {*} [options] Override http request option.
|
|
@@ -7056,7 +7056,7 @@ var Configuration = class {
|
|
|
7056
7056
|
}
|
|
7057
7057
|
this.basePath = param.basePath;
|
|
7058
7058
|
this.baseOptions = param.baseOptions ?? {};
|
|
7059
|
-
this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.
|
|
7059
|
+
this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.7/typescript" : param.userAgent;
|
|
7060
7060
|
this.formDataCtor = param.formDataCtor;
|
|
7061
7061
|
}
|
|
7062
7062
|
/**
|