snaptrade-typescript-sdk 12.2.15 → 12.2.17

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 CHANGED
@@ -63,7 +63,7 @@ backoff with jitter rather than from the headers.
63
63
  See https://docs.snaptrade.com/docs/ratelimiting.
64
64
 
65
65
 
66
- [![npm](https://img.shields.io/badge/npm-v12.2.15-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/12.2.15)
66
+ [![npm](https://img.shields.io/badge/npm-v12.2.17-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/12.2.17)
67
67
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
68
68
 
69
69
  </div>
@@ -107,9 +107,11 @@ See https://docs.snaptrade.com/docs/ratelimiting.
107
107
  * [`snaptrade.connections.syncBrokerageAuthorizationTransactions`](#snaptradeconnectionssyncbrokerageauthorizationtransactions)
108
108
  * [`snaptrade.experimentalEndpoints.addSubscription`](#snaptradeexperimentalendpointsaddsubscription)
109
109
  * [`snaptrade.experimentalEndpoints.cancelSubscription`](#snaptradeexperimentalendpointscancelsubscription)
110
+ * [`snaptrade.experimentalEndpoints.getAccountDetails`](#snaptradeexperimentalendpointsgetaccountdetails)
110
111
  * [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
111
112
  * [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
112
113
  * [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
114
+ * [`snaptrade.experimentalEndpoints.listAllUserAccounts`](#snaptradeexperimentalendpointslistalluseraccounts)
113
115
  * [`snaptrade.experimentalEndpoints.listSubscriptions`](#snaptradeexperimentalendpointslistsubscriptions)
114
116
  * [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
115
117
  * [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
@@ -1920,6 +1922,69 @@ Unique identifier for the connected brokerage account. This is the UUID used to
1920
1922
  ---
1921
1923
 
1922
1924
 
1925
+ ### `snaptrade.experimentalEndpoints.getAccountDetails`<a id="snaptradeexperimentalendpointsgetaccountdetails"></a>
1926
+
1927
+ Experimental and subject to change without notice.
1928
+
1929
+ 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.
1930
+
1931
+ 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.
1932
+
1933
+ 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).
1934
+
1935
+ 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.
1936
+
1937
+ 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.
1938
+
1939
+
1940
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1941
+
1942
+ ##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
1943
+
1944
+ ```typescript
1945
+ const getAccountDetailsResponse =
1946
+ await commercialApiKeyClient.experimentalEndpoints.getAccountDetails({
1947
+ accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1948
+ userId: "snaptrade-user-123",
1949
+ userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1950
+ });
1951
+ ```
1952
+
1953
+ Required credentials for this mode:
1954
+
1955
+ - `userId` (string, required): SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
1956
+
1957
+ - `userSecret` (string, required): SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret).
1958
+
1959
+ ##### Personal API Key Auth<a id="personal-api-key-auth"></a>
1960
+
1961
+ ```typescript
1962
+ const getAccountDetailsResponse =
1963
+ await personalApiKeyClient.experimentalEndpoints.getAccountDetails({
1964
+ accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1965
+ });
1966
+ ```
1967
+
1968
+ The client identifies the user in this mode. Do not pass `userId` `userSecret` to this method.
1969
+
1970
+
1971
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1972
+
1973
+ ##### accountId: `string`<a id="accountid-string"></a>
1974
+
1975
+ #### 🔄 Return<a id="🔄-return"></a>
1976
+
1977
+ [ConnectionAccount](./models/connection-account.ts)
1978
+
1979
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1980
+
1981
+ `/accounts/{accountId}/details` `GET`
1982
+
1983
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1984
+
1985
+ ---
1986
+
1987
+
1923
1988
  ### `snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`<a id="snaptradeexperimentalendpointsgetuseraccountorderdetailv2"></a>
1924
1989
 
1925
1990
  Returns the detail of a single order using the brokerage order ID provided as a path parameter.
@@ -2122,6 +2187,58 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
2122
2187
  ---
2123
2188
 
2124
2189
 
2190
+ ### `snaptrade.experimentalEndpoints.listAllUserAccounts`<a id="snaptradeexperimentalendpointslistalluseraccounts"></a>
2191
+
2192
+ Experimental and subject to change without notice.
2193
+
2194
+ Returns all accounts across all connections known to SnapTrade for the authenticated user.
2195
+
2196
+ 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.
2197
+
2198
+ 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).
2199
+
2200
+
2201
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2202
+
2203
+ ##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
2204
+
2205
+ ```typescript
2206
+ const listAllUserAccountsResponse =
2207
+ await commercialApiKeyClient.experimentalEndpoints.listAllUserAccounts({
2208
+ userId: "snaptrade-user-123",
2209
+ userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2210
+ });
2211
+ ```
2212
+
2213
+ Required credentials for this mode:
2214
+
2215
+ - `userId` (string, required): SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
2216
+
2217
+ - `userSecret` (string, required): SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret).
2218
+
2219
+ ##### Personal API Key Auth<a id="personal-api-key-auth"></a>
2220
+
2221
+ ```typescript
2222
+ const listAllUserAccountsResponse =
2223
+ await personalApiKeyClient.experimentalEndpoints.listAllUserAccounts();
2224
+ ```
2225
+
2226
+ The client identifies the user in this mode. Do not pass `userId` `userSecret` to this method.
2227
+
2228
+
2229
+ #### 🔄 Return<a id="🔄-return"></a>
2230
+
2231
+ [AllUserAccountsResponse](./models/all-user-accounts-response.ts)
2232
+
2233
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2234
+
2235
+ `/accounts/all` `GET`
2236
+
2237
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2238
+
2239
+ ---
2240
+
2241
+
2125
2242
  ### `snaptrade.experimentalEndpoints.listSubscriptions`<a id="snaptradeexperimentalendpointslistsubscriptions"></a>
2126
2243
 
2127
2244
  Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
@@ -2844,11 +2961,11 @@ Number of shares for the order. This can be a decimal for fractional orders. Mus
2844
2961
  ### `snaptrade.trading.getUserAccountOptionQuotes`<a id="snaptradetradinggetuseraccountoptionquotes"></a>
2845
2962
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2846
2963
 
2964
+ **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`.
2965
+
2847
2966
  Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format)
2848
2967
  **Note:** These are derived values and are not suitable for trading purposes.
2849
2968
 
2850
- **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
2851
-
2852
2969
 
2853
2970
  #### 🛠️ Usage<a id="🛠️-usage"></a>
2854
2971