snaptrade-typescript-sdk 13.1.0 → 13.1.2
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 +47 -1
- package/dist/browser.umd.js +7 -7
- package/dist/index.cjs +199 -46
- package/dist/index.d.cts +210 -2
- package/dist/index.d.mts +210 -2
- package/dist/index.d.ts +210 -2
- package/dist/index.mjs +150 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -31,9 +31,9 @@ const BASE_PATH = "https://api.snaptrade.com".replace(/\/+$/, "");
|
|
|
31
31
|
* @class BaseAPI
|
|
32
32
|
*/
|
|
33
33
|
var BaseAPI = class {
|
|
34
|
-
constructor(configuration, basePath = BASE_PATH, axios$
|
|
34
|
+
constructor(configuration, basePath = BASE_PATH, axios$11 = axios.default) {
|
|
35
35
|
this.basePath = basePath;
|
|
36
|
-
this.axios = axios$
|
|
36
|
+
this.axios = axios$11;
|
|
37
37
|
if (configuration) {
|
|
38
38
|
this.configuration = configuration;
|
|
39
39
|
this.basePath = configuration.basePath || this.basePath;
|
|
@@ -297,7 +297,7 @@ async function wrapAxiosRequest(makeRequest) {
|
|
|
297
297
|
* @export
|
|
298
298
|
*/
|
|
299
299
|
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration, operationAuth) {
|
|
300
|
-
return async (axios$
|
|
300
|
+
return async (axios$10 = globalAxios, basePath = BASE_PATH) => {
|
|
301
301
|
const url = (configuration?.basePath || basePath) + axiosArgs.url;
|
|
302
302
|
await requestAfterHook({
|
|
303
303
|
axiosArgs,
|
|
@@ -309,7 +309,7 @@ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, config
|
|
|
309
309
|
selectedAuthMode: configuration?.authMode
|
|
310
310
|
} : void 0
|
|
311
311
|
});
|
|
312
|
-
return wrapAxiosRequest(async () => await axios$
|
|
312
|
+
return wrapAxiosRequest(async () => await axios$10.request({
|
|
313
313
|
...axiosArgs.options,
|
|
314
314
|
url
|
|
315
315
|
}));
|
|
@@ -1719,7 +1719,7 @@ const AccountInformationApiFp = function(configuration) {
|
|
|
1719
1719
|
* AccountInformationApi - factory interface
|
|
1720
1720
|
* @export
|
|
1721
1721
|
*/
|
|
1722
|
-
const AccountInformationApiFactory = function(configuration, basePath, axios$
|
|
1722
|
+
const AccountInformationApiFactory = function(configuration, basePath, axios$9) {
|
|
1723
1723
|
const localVarFp = AccountInformationApiFp(configuration);
|
|
1724
1724
|
return {
|
|
1725
1725
|
/**
|
|
@@ -1730,7 +1730,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1730
1730
|
* @throws {RequiredError}
|
|
1731
1731
|
*/
|
|
1732
1732
|
getAccountActivities(...args) {
|
|
1733
|
-
return localVarFp.getAccountActivities(...args).then((request) => request(axios$
|
|
1733
|
+
return localVarFp.getAccountActivities(...args).then((request) => request(axios$9, basePath));
|
|
1734
1734
|
},
|
|
1735
1735
|
/**
|
|
1736
1736
|
* 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.
|
|
@@ -1740,7 +1740,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1740
1740
|
* @throws {RequiredError}
|
|
1741
1741
|
*/
|
|
1742
1742
|
getAccountBalanceHistory(...args) {
|
|
1743
|
-
return localVarFp.getAccountBalanceHistory(...args).then((request) => request(axios$
|
|
1743
|
+
return localVarFp.getAccountBalanceHistory(...args).then((request) => request(axios$9, basePath));
|
|
1744
1744
|
},
|
|
1745
1745
|
/**
|
|
1746
1746
|
* Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the 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.
|
|
@@ -1750,7 +1750,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1750
1750
|
* @throws {RequiredError}
|
|
1751
1751
|
*/
|
|
1752
1752
|
getAccountDetails(...args) {
|
|
1753
|
-
return localVarFp.getAccountDetails(...args).then((request) => request(axios$
|
|
1753
|
+
return localVarFp.getAccountDetails(...args).then((request) => request(axios$9, basePath));
|
|
1754
1754
|
},
|
|
1755
1755
|
/**
|
|
1756
1756
|
* 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, CFD positions, and tokenized asset 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.
|
|
@@ -1760,7 +1760,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1760
1760
|
* @throws {RequiredError}
|
|
1761
1761
|
*/
|
|
1762
1762
|
getAllAccountPositions(...args) {
|
|
1763
|
-
return localVarFp.getAllAccountPositions(...args).then((request) => request(axios$
|
|
1763
|
+
return localVarFp.getAllAccountPositions(...args).then((request) => request(axios$9, basePath));
|
|
1764
1764
|
},
|
|
1765
1765
|
/**
|
|
1766
1766
|
* Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
@@ -1770,7 +1770,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1770
1770
|
* @throws {RequiredError}
|
|
1771
1771
|
*/
|
|
1772
1772
|
getUserAccountBalance(...args) {
|
|
1773
|
-
return localVarFp.getUserAccountBalance(...args).then((request) => request(axios$
|
|
1773
|
+
return localVarFp.getUserAccountBalance(...args).then((request) => request(axios$9, basePath));
|
|
1774
1774
|
},
|
|
1775
1775
|
/**
|
|
1776
1776
|
* **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
@@ -1781,7 +1781,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1781
1781
|
* @throws {RequiredError}
|
|
1782
1782
|
*/
|
|
1783
1783
|
getUserAccountDetails(...args) {
|
|
1784
|
-
return localVarFp.getUserAccountDetails(...args).then((request) => request(axios$
|
|
1784
|
+
return localVarFp.getUserAccountDetails(...args).then((request) => request(axios$9, basePath));
|
|
1785
1785
|
},
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
@@ -1791,7 +1791,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1791
1791
|
* @throws {RequiredError}
|
|
1792
1792
|
*/
|
|
1793
1793
|
getUserAccountOrderDetail(...args) {
|
|
1794
|
-
return localVarFp.getUserAccountOrderDetail(...args).then((request) => request(axios$
|
|
1794
|
+
return localVarFp.getUserAccountOrderDetail(...args).then((request) => request(axios$9, basePath));
|
|
1795
1795
|
},
|
|
1796
1796
|
/**
|
|
1797
1797
|
* Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
@@ -1801,7 +1801,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1801
1801
|
* @throws {RequiredError}
|
|
1802
1802
|
*/
|
|
1803
1803
|
getUserAccountOrders(...args) {
|
|
1804
|
-
return localVarFp.getUserAccountOrders(...args).then((request) => request(axios$
|
|
1804
|
+
return localVarFp.getUserAccountOrders(...args).then((request) => request(axios$9, basePath));
|
|
1805
1805
|
},
|
|
1806
1806
|
/**
|
|
1807
1807
|
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
@@ -1811,7 +1811,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1811
1811
|
* @throws {RequiredError}
|
|
1812
1812
|
*/
|
|
1813
1813
|
getUserAccountRecentOrders(...args) {
|
|
1814
|
-
return localVarFp.getUserAccountRecentOrders(...args).then((request) => request(axios$
|
|
1814
|
+
return localVarFp.getUserAccountRecentOrders(...args).then((request) => request(axios$9, basePath));
|
|
1815
1815
|
},
|
|
1816
1816
|
/**
|
|
1817
1817
|
* DEPRECATED. Returns a list of rate of return percents for a given account.
|
|
@@ -1821,7 +1821,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1821
1821
|
* @throws {RequiredError}
|
|
1822
1822
|
*/
|
|
1823
1823
|
getUserAccountReturnRates(...args) {
|
|
1824
|
-
return localVarFp.getUserAccountReturnRates(...args).then((request) => request(axios$
|
|
1824
|
+
return localVarFp.getUserAccountReturnRates(...args).then((request) => request(axios$9, basePath));
|
|
1825
1825
|
},
|
|
1826
1826
|
/**
|
|
1827
1827
|
* **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. Concurrent live holdings requests for the same account fail immediately with HTTP 409 and error code `1166`. Wait for the in-flight request to complete before retrying.
|
|
@@ -1832,7 +1832,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1832
1832
|
* @throws {RequiredError}
|
|
1833
1833
|
*/
|
|
1834
1834
|
getUserHoldings(...args) {
|
|
1835
|
-
return localVarFp.getUserHoldings(...args).then((request) => request(axios$
|
|
1835
|
+
return localVarFp.getUserHoldings(...args).then((request) => request(axios$9, basePath));
|
|
1836
1836
|
},
|
|
1837
1837
|
/**
|
|
1838
1838
|
* Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema 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).
|
|
@@ -1842,7 +1842,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1842
1842
|
* @throws {RequiredError}
|
|
1843
1843
|
*/
|
|
1844
1844
|
listAllUserAccounts(...args) {
|
|
1845
|
-
return localVarFp.listAllUserAccounts(...args).then((request) => request(axios$
|
|
1845
|
+
return localVarFp.listAllUserAccounts(...args).then((request) => request(axios$9, basePath));
|
|
1846
1846
|
},
|
|
1847
1847
|
/**
|
|
1848
1848
|
* **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
@@ -1853,7 +1853,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1853
1853
|
* @throws {RequiredError}
|
|
1854
1854
|
*/
|
|
1855
1855
|
listUserAccounts(...args) {
|
|
1856
|
-
return localVarFp.listUserAccounts(...args).then((request) => request(axios$
|
|
1856
|
+
return localVarFp.listUserAccounts(...args).then((request) => request(axios$9, basePath));
|
|
1857
1857
|
},
|
|
1858
1858
|
/**
|
|
1859
1859
|
* Updates various properties of a specified account.
|
|
@@ -1863,7 +1863,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
|
|
|
1863
1863
|
* @throws {RequiredError}
|
|
1864
1864
|
*/
|
|
1865
1865
|
updateUserAccount(...args) {
|
|
1866
|
-
return localVarFp.updateUserAccount(...args).then((request) => request(axios$
|
|
1866
|
+
return localVarFp.updateUserAccount(...args).then((request) => request(axios$9, basePath));
|
|
1867
1867
|
}
|
|
1868
1868
|
};
|
|
1869
1869
|
};
|
|
@@ -2108,7 +2108,7 @@ async check(options) {
|
|
|
2108
2108
|
* ApiStatusApi - factory interface
|
|
2109
2109
|
* @export
|
|
2110
2110
|
*/
|
|
2111
|
-
const ApiStatusApiFactory = function(configuration, basePath, axios$
|
|
2111
|
+
const ApiStatusApiFactory = function(configuration, basePath, axios$8) {
|
|
2112
2112
|
const localVarFp = ApiStatusApiFp(configuration);
|
|
2113
2113
|
return {
|
|
2114
2114
|
/**
|
|
@@ -2118,7 +2118,7 @@ const ApiStatusApiFactory = function(configuration, basePath, axios$7) {
|
|
|
2118
2118
|
* @throws {RequiredError}
|
|
2119
2119
|
*/
|
|
2120
2120
|
check(options) {
|
|
2121
|
-
return localVarFp.check(options).then((request) => request(axios$
|
|
2121
|
+
return localVarFp.check(options).then((request) => request(axios$8, basePath));
|
|
2122
2122
|
} };
|
|
2123
2123
|
};
|
|
2124
2124
|
/**
|
|
@@ -2572,7 +2572,7 @@ const AuthenticationApiFp = function(configuration) {
|
|
|
2572
2572
|
* AuthenticationApi - factory interface
|
|
2573
2573
|
* @export
|
|
2574
2574
|
*/
|
|
2575
|
-
const AuthenticationApiFactory = function(configuration, basePath, axios$
|
|
2575
|
+
const AuthenticationApiFactory = function(configuration, basePath, axios$7) {
|
|
2576
2576
|
const localVarFp = AuthenticationApiFp(configuration);
|
|
2577
2577
|
return {
|
|
2578
2578
|
/**
|
|
@@ -2583,7 +2583,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$6) {
|
|
|
2583
2583
|
* @throws {RequiredError}
|
|
2584
2584
|
*/
|
|
2585
2585
|
deleteSnapTradeUser(...args) {
|
|
2586
|
-
return localVarFp.deleteSnapTradeUser(...args).then((request) => request(axios$
|
|
2586
|
+
return localVarFp.deleteSnapTradeUser(...args).then((request) => request(axios$7, basePath));
|
|
2587
2587
|
},
|
|
2588
2588
|
/**
|
|
2589
2589
|
* Returns a list of all registered user IDs. Please note that the response is not currently paginated.
|
|
@@ -2592,7 +2592,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$6) {
|
|
|
2592
2592
|
* @throws {RequiredError}
|
|
2593
2593
|
*/
|
|
2594
2594
|
listSnapTradeUsers(...args) {
|
|
2595
|
-
return localVarFp.listSnapTradeUsers(...args).then((request) => request(axios$
|
|
2595
|
+
return localVarFp.listSnapTradeUsers(...args).then((request) => request(axios$7, basePath));
|
|
2596
2596
|
},
|
|
2597
2597
|
/**
|
|
2598
2598
|
* Authenticates a SnapTrade user and returns the Connection Portal URL used for connecting brokerage accounts. Please check [this guide](/docs/implement-connection-portal) for how to integrate the Connection Portal into your app. Please note that the returned URL expires in 5 minutes.
|
|
@@ -2602,7 +2602,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$6) {
|
|
|
2602
2602
|
* @throws {RequiredError}
|
|
2603
2603
|
*/
|
|
2604
2604
|
loginSnapTradeUser(...args) {
|
|
2605
|
-
return localVarFp.loginSnapTradeUser(...args).then((request) => request(axios$
|
|
2605
|
+
return localVarFp.loginSnapTradeUser(...args).then((request) => request(axios$7, basePath));
|
|
2606
2606
|
},
|
|
2607
2607
|
/**
|
|
2608
2608
|
* Registers a new SnapTrade user under your Client ID. A user secret will be automatically generated for you and must be properly stored in your system. Most SnapTrade operations require a user ID and user secret to be passed in as parameters.
|
|
@@ -2612,7 +2612,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$6) {
|
|
|
2612
2612
|
* @throws {RequiredError}
|
|
2613
2613
|
*/
|
|
2614
2614
|
registerSnapTradeUser(...args) {
|
|
2615
|
-
return localVarFp.registerSnapTradeUser(...args).then((request) => request(axios$
|
|
2615
|
+
return localVarFp.registerSnapTradeUser(...args).then((request) => request(axios$7, basePath));
|
|
2616
2616
|
},
|
|
2617
2617
|
/**
|
|
2618
2618
|
* Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you\'ll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
|
@@ -2622,7 +2622,7 @@ const AuthenticationApiFactory = function(configuration, basePath, axios$6) {
|
|
|
2622
2622
|
* @throws {RequiredError}
|
|
2623
2623
|
*/
|
|
2624
2624
|
resetSnapTradeUserSecret(...args) {
|
|
2625
|
-
return localVarFp.resetSnapTradeUserSecret(...args).then((request) => request(axios$
|
|
2625
|
+
return localVarFp.resetSnapTradeUserSecret(...args).then((request) => request(axios$7, basePath));
|
|
2626
2626
|
}
|
|
2627
2627
|
};
|
|
2628
2628
|
};
|
|
@@ -3578,7 +3578,7 @@ const ConnectionsApiFp = function(configuration) {
|
|
|
3578
3578
|
* ConnectionsApi - factory interface
|
|
3579
3579
|
* @export
|
|
3580
3580
|
*/
|
|
3581
|
-
const ConnectionsApiFactory = function(configuration, basePath, axios$
|
|
3581
|
+
const ConnectionsApiFactory = function(configuration, basePath, axios$6) {
|
|
3582
3582
|
const localVarFp = ConnectionsApiFp(configuration);
|
|
3583
3583
|
return {
|
|
3584
3584
|
/**
|
|
@@ -3589,7 +3589,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3589
3589
|
* @throws {RequiredError}
|
|
3590
3590
|
*/
|
|
3591
3591
|
deleteConnection(...args) {
|
|
3592
|
-
return localVarFp.deleteConnection(...args).then((request) => request(axios$
|
|
3592
|
+
return localVarFp.deleteConnection(...args).then((request) => request(axios$6, basePath));
|
|
3593
3593
|
},
|
|
3594
3594
|
/**
|
|
3595
3595
|
* Returns a single connection for the specified ID.
|
|
@@ -3599,7 +3599,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3599
3599
|
* @throws {RequiredError}
|
|
3600
3600
|
*/
|
|
3601
3601
|
detailBrokerageAuthorization(...args) {
|
|
3602
|
-
return localVarFp.detailBrokerageAuthorization(...args).then((request) => request(axios$
|
|
3602
|
+
return localVarFp.detailBrokerageAuthorization(...args).then((request) => request(axios$6, basePath));
|
|
3603
3603
|
},
|
|
3604
3604
|
/**
|
|
3605
3605
|
* Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
|
|
@@ -3609,7 +3609,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3609
3609
|
* @throws {RequiredError}
|
|
3610
3610
|
*/
|
|
3611
3611
|
disableBrokerageAuthorization(...args) {
|
|
3612
|
-
return localVarFp.disableBrokerageAuthorization(...args).then((request) => request(axios$
|
|
3612
|
+
return localVarFp.disableBrokerageAuthorization(...args).then((request) => request(axios$6, basePath));
|
|
3613
3613
|
},
|
|
3614
3614
|
/**
|
|
3615
3615
|
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
@@ -3619,7 +3619,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3619
3619
|
* @throws {RequiredError}
|
|
3620
3620
|
*/
|
|
3621
3621
|
listBrokerageAuthorizationAccounts(...args) {
|
|
3622
|
-
return localVarFp.listBrokerageAuthorizationAccounts(...args).then((request) => request(axios$
|
|
3622
|
+
return localVarFp.listBrokerageAuthorizationAccounts(...args).then((request) => request(axios$6, basePath));
|
|
3623
3623
|
},
|
|
3624
3624
|
/**
|
|
3625
3625
|
* Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
|
|
@@ -3629,7 +3629,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3629
3629
|
* @throws {RequiredError}
|
|
3630
3630
|
*/
|
|
3631
3631
|
listBrokerageAuthorizations(...args) {
|
|
3632
|
-
return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios$
|
|
3632
|
+
return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios$6, basePath));
|
|
3633
3633
|
},
|
|
3634
3634
|
/**
|
|
3635
3635
|
* Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. 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.
|
|
@@ -3639,7 +3639,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3639
3639
|
* @throws {RequiredError}
|
|
3640
3640
|
*/
|
|
3641
3641
|
listConnectionAccounts(...args) {
|
|
3642
|
-
return localVarFp.listConnectionAccounts(...args).then((request) => request(axios$
|
|
3642
|
+
return localVarFp.listConnectionAccounts(...args).then((request) => request(axios$6, basePath));
|
|
3643
3643
|
},
|
|
3644
3644
|
/**
|
|
3645
3645
|
* 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.**
|
|
@@ -3649,7 +3649,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3649
3649
|
* @throws {RequiredError}
|
|
3650
3650
|
*/
|
|
3651
3651
|
refreshBrokerageAuthorization(...args) {
|
|
3652
|
-
return localVarFp.refreshBrokerageAuthorization(...args).then((request) => request(axios$
|
|
3652
|
+
return localVarFp.refreshBrokerageAuthorization(...args).then((request) => request(axios$6, basePath));
|
|
3653
3653
|
},
|
|
3654
3654
|
/**
|
|
3655
3655
|
* DEPRECATED. Returns a list of rate of return percents for a given connection.
|
|
@@ -3659,7 +3659,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3659
3659
|
* @throws {RequiredError}
|
|
3660
3660
|
*/
|
|
3661
3661
|
returnRates(...args) {
|
|
3662
|
-
return localVarFp.returnRates(...args).then((request) => request(axios$
|
|
3662
|
+
return localVarFp.returnRates(...args).then((request) => request(axios$6, basePath));
|
|
3663
3663
|
},
|
|
3664
3664
|
/**
|
|
3665
3665
|
* Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
|
|
@@ -3669,7 +3669,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
|
|
|
3669
3669
|
* @throws {RequiredError}
|
|
3670
3670
|
*/
|
|
3671
3671
|
syncBrokerageAuthorizationTransactions(...args) {
|
|
3672
|
-
return localVarFp.syncBrokerageAuthorizationTransactions(...args).then((request) => request(axios$
|
|
3672
|
+
return localVarFp.syncBrokerageAuthorizationTransactions(...args).then((request) => request(axios$6, basePath));
|
|
3673
3673
|
}
|
|
3674
3674
|
};
|
|
3675
3675
|
};
|
|
@@ -4499,7 +4499,7 @@ const ExperimentalEndpointsApiFp = function(configuration) {
|
|
|
4499
4499
|
* ExperimentalEndpointsApi - factory interface
|
|
4500
4500
|
* @export
|
|
4501
4501
|
*/
|
|
4502
|
-
const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
4502
|
+
const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$5) {
|
|
4503
4503
|
const localVarFp = ExperimentalEndpointsApiFp(configuration);
|
|
4504
4504
|
return {
|
|
4505
4505
|
/**
|
|
@@ -4510,7 +4510,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4510
4510
|
* @throws {RequiredError}
|
|
4511
4511
|
*/
|
|
4512
4512
|
addSubscription(...args) {
|
|
4513
|
-
return localVarFp.addSubscription(...args).then((request) => request(axios$
|
|
4513
|
+
return localVarFp.addSubscription(...args).then((request) => request(axios$5, basePath));
|
|
4514
4514
|
},
|
|
4515
4515
|
/**
|
|
4516
4516
|
* Cancels a Trade Detection subscription for a connected brokerage account. This endpoint requires partner signature authentication only and does not require `userId` or `userSecret`.
|
|
@@ -4520,7 +4520,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4520
4520
|
* @throws {RequiredError}
|
|
4521
4521
|
*/
|
|
4522
4522
|
cancelSubscription(...args) {
|
|
4523
|
-
return localVarFp.cancelSubscription(...args).then((request) => request(axios$
|
|
4523
|
+
return localVarFp.cancelSubscription(...args).then((request) => request(axios$5, basePath));
|
|
4524
4524
|
},
|
|
4525
4525
|
/**
|
|
4526
4526
|
* 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.
|
|
@@ -4530,7 +4530,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4530
4530
|
* @throws {RequiredError}
|
|
4531
4531
|
*/
|
|
4532
4532
|
getUserAccountOrderDetailV2(...args) {
|
|
4533
|
-
return localVarFp.getUserAccountOrderDetailV2(...args).then((request) => request(axios$
|
|
4533
|
+
return localVarFp.getUserAccountOrderDetailV2(...args).then((request) => request(axios$5, basePath));
|
|
4534
4534
|
},
|
|
4535
4535
|
/**
|
|
4536
4536
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
@@ -4540,7 +4540,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4540
4540
|
* @throws {RequiredError}
|
|
4541
4541
|
*/
|
|
4542
4542
|
getUserAccountOrdersV2(...args) {
|
|
4543
|
-
return localVarFp.getUserAccountOrdersV2(...args).then((request) => request(axios$
|
|
4543
|
+
return localVarFp.getUserAccountOrdersV2(...args).then((request) => request(axios$5, basePath));
|
|
4544
4544
|
},
|
|
4545
4545
|
/**
|
|
4546
4546
|
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
@@ -4550,7 +4550,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4550
4550
|
* @throws {RequiredError}
|
|
4551
4551
|
*/
|
|
4552
4552
|
getUserAccountRecentOrdersV2(...args) {
|
|
4553
|
-
return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios$
|
|
4553
|
+
return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios$5, basePath));
|
|
4554
4554
|
},
|
|
4555
4555
|
/**
|
|
4556
4556
|
* Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
@@ -4559,7 +4559,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4559
4559
|
* @throws {RequiredError}
|
|
4560
4560
|
*/
|
|
4561
4561
|
listSubscriptions(...args) {
|
|
4562
|
-
return localVarFp.listSubscriptions(...args).then((request) => request(axios$
|
|
4562
|
+
return localVarFp.listSubscriptions(...args).then((request) => request(axios$5, basePath));
|
|
4563
4563
|
},
|
|
4564
4564
|
/**
|
|
4565
4565
|
* **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.
|
|
@@ -4569,7 +4569,7 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
|
|
|
4569
4569
|
* @throws {RequiredError}
|
|
4570
4570
|
*/
|
|
4571
4571
|
placeSimpleOrder(...args) {
|
|
4572
|
-
return localVarFp.placeSimpleOrder(...args).then((request) => request(axios$
|
|
4572
|
+
return localVarFp.placeSimpleOrder(...args).then((request) => request(axios$5, basePath));
|
|
4573
4573
|
}
|
|
4574
4574
|
};
|
|
4575
4575
|
};
|
|
@@ -4661,6 +4661,153 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
|
|
|
4661
4661
|
//#region api/experimental-endpoints-api.ts
|
|
4662
4662
|
var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {};
|
|
4663
4663
|
//#endregion
|
|
4664
|
+
//#region api/management-api-generated.ts
|
|
4665
|
+
/**
|
|
4666
|
+
* ManagementApi - axios parameter creator
|
|
4667
|
+
* @export
|
|
4668
|
+
*/
|
|
4669
|
+
const ManagementApiAxiosParamCreator = function(configuration) {
|
|
4670
|
+
return {
|
|
4671
|
+
/**
|
|
4672
|
+
* Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
4673
|
+
* @summary Get usage stats
|
|
4674
|
+
* @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
4675
|
+
* @param {*} [options] Override http request option.
|
|
4676
|
+
* @throws {RequiredError}
|
|
4677
|
+
*/
|
|
4678
|
+
getStats: async (currency, options = {}) => {
|
|
4679
|
+
const localVarPath = `/snapTrade/stats`;
|
|
4680
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4681
|
+
let baseOptions;
|
|
4682
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
4683
|
+
const localVarRequestOptions = {
|
|
4684
|
+
method: "GET",
|
|
4685
|
+
...baseOptions,
|
|
4686
|
+
...options
|
|
4687
|
+
};
|
|
4688
|
+
const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
|
|
4689
|
+
const localVarQueryParameter = {};
|
|
4690
|
+
if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
|
|
4691
|
+
object: localVarQueryParameter,
|
|
4692
|
+
key: "clientId",
|
|
4693
|
+
keyParamName: "clientId",
|
|
4694
|
+
configuration
|
|
4695
|
+
});
|
|
4696
|
+
if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
|
|
4697
|
+
object: localVarQueryParameter,
|
|
4698
|
+
key: "clientId",
|
|
4699
|
+
keyParamName: "clientId",
|
|
4700
|
+
configuration
|
|
4701
|
+
});
|
|
4702
|
+
if (currency !== void 0) localVarQueryParameter["currency"] = currency;
|
|
4703
|
+
const localVarOperationAuth = {
|
|
4704
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
4705
|
+
requestSigningByAuthMode: {
|
|
4706
|
+
"commercialApiKey": {
|
|
4707
|
+
secretParameter: "consumerKey",
|
|
4708
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
4709
|
+
},
|
|
4710
|
+
"personalApiKey": {
|
|
4711
|
+
secretParameter: "consumerKey",
|
|
4712
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
4713
|
+
}
|
|
4714
|
+
},
|
|
4715
|
+
selectedAuthMode: configuration?.authMode
|
|
4716
|
+
};
|
|
4717
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4718
|
+
localVarRequestOptions.headers = {
|
|
4719
|
+
...localVarHeaderParameter,
|
|
4720
|
+
...headersFromBaseOptions,
|
|
4721
|
+
...options.headers
|
|
4722
|
+
};
|
|
4723
|
+
requestBeforeHook({
|
|
4724
|
+
queryParameters: localVarQueryParameter,
|
|
4725
|
+
requestConfig: localVarRequestOptions,
|
|
4726
|
+
path: localVarPath,
|
|
4727
|
+
configuration,
|
|
4728
|
+
pathTemplate: "/snapTrade/stats",
|
|
4729
|
+
httpMethod: "GET",
|
|
4730
|
+
operationAuth: localVarOperationAuth
|
|
4731
|
+
});
|
|
4732
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4733
|
+
return {
|
|
4734
|
+
url: toPathString(localVarUrlObj),
|
|
4735
|
+
options: localVarRequestOptions
|
|
4736
|
+
};
|
|
4737
|
+
} };
|
|
4738
|
+
};
|
|
4739
|
+
/**
|
|
4740
|
+
* ManagementApi - functional programming interface
|
|
4741
|
+
* @export
|
|
4742
|
+
*/
|
|
4743
|
+
const ManagementApiFp = function(configuration) {
|
|
4744
|
+
const localVarAxiosParamCreator = ManagementApiAxiosParamCreator(configuration);
|
|
4745
|
+
return {
|
|
4746
|
+
/**
|
|
4747
|
+
* Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
4748
|
+
* @summary Get usage stats
|
|
4749
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4750
|
+
* @param {*} [options] Override http request option.
|
|
4751
|
+
* @throws {RequiredError}
|
|
4752
|
+
*/
|
|
4753
|
+
async getStats(...args) {
|
|
4754
|
+
const [requestParameters = {}, options] = args;
|
|
4755
|
+
return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), axios.default, BASE_PATH, configuration, {
|
|
4756
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
4757
|
+
requestSigningByAuthMode: {
|
|
4758
|
+
"commercialApiKey": {
|
|
4759
|
+
secretParameter: "consumerKey",
|
|
4760
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
4761
|
+
},
|
|
4762
|
+
"personalApiKey": {
|
|
4763
|
+
secretParameter: "consumerKey",
|
|
4764
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
4765
|
+
}
|
|
4766
|
+
}
|
|
4767
|
+
});
|
|
4768
|
+
} };
|
|
4769
|
+
};
|
|
4770
|
+
/**
|
|
4771
|
+
* ManagementApi - factory interface
|
|
4772
|
+
* @export
|
|
4773
|
+
*/
|
|
4774
|
+
const ManagementApiFactory = function(configuration, basePath, axios$4) {
|
|
4775
|
+
const localVarFp = ManagementApiFp(configuration);
|
|
4776
|
+
return {
|
|
4777
|
+
/**
|
|
4778
|
+
* Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
4779
|
+
* @summary Get usage stats
|
|
4780
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4781
|
+
* @param {*} [options] Override http request option.
|
|
4782
|
+
* @throws {RequiredError}
|
|
4783
|
+
*/
|
|
4784
|
+
getStats(...args) {
|
|
4785
|
+
return localVarFp.getStats(...args).then((request) => request(axios$4, basePath));
|
|
4786
|
+
} };
|
|
4787
|
+
};
|
|
4788
|
+
/**
|
|
4789
|
+
* ManagementApiGenerated - object-oriented interface
|
|
4790
|
+
* @export
|
|
4791
|
+
* @class ManagementApiGenerated
|
|
4792
|
+
* @extends {BaseAPI}
|
|
4793
|
+
*/
|
|
4794
|
+
var ManagementApiGenerated = class extends BaseAPI {
|
|
4795
|
+
/**
|
|
4796
|
+
* Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
4797
|
+
* @summary Get usage stats
|
|
4798
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4799
|
+
* @param {*} [options] Override http request option.
|
|
4800
|
+
* @throws {RequiredError}
|
|
4801
|
+
* @memberof ManagementApiGenerated
|
|
4802
|
+
*/
|
|
4803
|
+
getStats(...args) {
|
|
4804
|
+
return ManagementApiFp(this.configuration).getStats(...args).then((request) => request(this.axios, this.basePath));
|
|
4805
|
+
}
|
|
4806
|
+
};
|
|
4807
|
+
//#endregion
|
|
4808
|
+
//#region api/management-api.ts
|
|
4809
|
+
var ManagementApi = class extends ManagementApiGenerated {};
|
|
4810
|
+
//#endregion
|
|
4664
4811
|
//#region api/reference-data-api-generated.ts
|
|
4665
4812
|
/**
|
|
4666
4813
|
* ReferenceDataApi - axios parameter creator
|
|
@@ -7525,7 +7672,7 @@ var Configuration = class {
|
|
|
7525
7672
|
}
|
|
7526
7673
|
this.basePath = param.basePath;
|
|
7527
7674
|
this.baseOptions = param.baseOptions ?? {};
|
|
7528
|
-
this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.
|
|
7675
|
+
this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.2/typescript" : param.userAgent;
|
|
7529
7676
|
this.formDataCtor = param.formDataCtor;
|
|
7530
7677
|
}
|
|
7531
7678
|
/**
|
|
@@ -7558,6 +7705,7 @@ var Snaptrade = class extends SnaptradeCustom {
|
|
|
7558
7705
|
this.authentication = new AuthenticationApi(configuration);
|
|
7559
7706
|
this.connections = new ConnectionsApi(configuration);
|
|
7560
7707
|
this.experimentalEndpoints = new ExperimentalEndpointsApi(configuration);
|
|
7708
|
+
this.management = new ManagementApi(configuration);
|
|
7561
7709
|
this.referenceData = new ReferenceDataApi(configuration);
|
|
7562
7710
|
this.trading = new TradingApi(configuration);
|
|
7563
7711
|
}
|
|
@@ -7590,6 +7738,11 @@ exports.ExperimentalEndpointsApiAxiosParamCreator = ExperimentalEndpointsApiAxio
|
|
|
7590
7738
|
exports.ExperimentalEndpointsApiFactory = ExperimentalEndpointsApiFactory;
|
|
7591
7739
|
exports.ExperimentalEndpointsApiFp = ExperimentalEndpointsApiFp;
|
|
7592
7740
|
exports.ExperimentalEndpointsApiGenerated = ExperimentalEndpointsApiGenerated;
|
|
7741
|
+
exports.ManagementApi = ManagementApi;
|
|
7742
|
+
exports.ManagementApiAxiosParamCreator = ManagementApiAxiosParamCreator;
|
|
7743
|
+
exports.ManagementApiFactory = ManagementApiFactory;
|
|
7744
|
+
exports.ManagementApiFp = ManagementApiFp;
|
|
7745
|
+
exports.ManagementApiGenerated = ManagementApiGenerated;
|
|
7593
7746
|
exports.PersonalApiKeyAuth = PersonalApiKeyAuth;
|
|
7594
7747
|
exports.ReferenceDataApi = ReferenceDataApi;
|
|
7595
7748
|
exports.ReferenceDataApiAxiosParamCreator = ReferenceDataApiAxiosParamCreator;
|