snaptrade-typescript-sdk 11.0.0-canary.1 → 11.0.1

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
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect brokerage accounts to your app for live positions and trading
8
8
 
9
- [![npm](https://img.shields.io/badge/npm-v11.0.0canary.1-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/11.0.0-canary.1)
9
+ [![npm](https://img.shields.io/badge/npm-v11.0.1-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/11.0.1)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -124,7 +124,10 @@ yarn add snaptrade-typescript-sdk
124
124
  ## Getting Started<a id="getting-started"></a>
125
125
 
126
126
  ```typescript
127
+ // Commercial API key example: registers a SnapTrade user and uses userId/userSecret.
127
128
  const { Snaptrade, SnaptradeAuth } = require("snaptrade-typescript-sdk");
129
+ const { randomUUID } = require("crypto");
130
+ const readline = require("readline");
128
131
 
129
132
  async function main() {
130
133
  // 1) Initialize a client with your clientID and consumerKey.
@@ -140,32 +143,51 @@ async function main() {
140
143
  console.log("status:", status.data);
141
144
 
142
145
  // 3) Create a new user on SnapTrade
143
- const userId = uuid();
144
- const { userSecret } = (
146
+ const userId = randomUUID();
147
+ const registerResponse = (
145
148
  await snaptrade.authentication.registerSnapTradeUser({
146
149
  userId,
147
150
  })
148
151
  ).data;
152
+ console.log("registerResponse:", registerResponse);
149
153
 
150
154
  // Note: A user secret is only generated once. It's required to access
151
155
  // resources for certain endpoints.
152
- console.log("userSecret:", userSecret);
156
+ const userSecret = registerResponse.userSecret;
153
157
 
154
158
  // 4) Get a redirect URI. Users will need this to connect
155
- const data = (
159
+ // their brokerage to the SnapTrade server.
160
+ const redirectURI = (
156
161
  await snaptrade.authentication.loginSnapTradeUser({ userId, userSecret })
157
162
  ).data;
158
- if (!("redirectURI" in data)) throw Error("Should have gotten redirect URI");
159
- console.log("redirectURI:", data.redirectURI);
163
+ console.log("redirectURI:", redirectURI);
160
164
 
161
- // 5) Obtaining account holdings data
162
- const holdings = (
163
- await snaptrade.accountInformation.getAllUserHoldings({
165
+ await waitForEnter(
166
+ "Open the link in your browser. When done logging in, press Enter to continue..."
167
+ );
168
+
169
+ // 5) Get a list of connections
170
+ const connections = (
171
+ await snaptrade.connections.listBrokerageAuthorizations({
164
172
  userId,
165
173
  userSecret,
166
174
  })
167
175
  ).data;
168
- console.log("holdings:", holdings);
176
+ console.log("connections:", connections);
177
+
178
+ // 6) Get a list of accounts for the first connection, if available
179
+ if (!Array.isArray(connections) || connections.length === 0) {
180
+ console.log("No brokerage connections found for the user.");
181
+ } else {
182
+ const accounts = (
183
+ await snaptrade.connections.listBrokerageAuthorizationAccounts({
184
+ authorizationId: connections[0].id,
185
+ userId,
186
+ userSecret,
187
+ })
188
+ ).data;
189
+ console.log("accounts:", accounts);
190
+ }
169
191
 
170
192
  // 6) Deleting a user
171
193
  const deleteResponse = (
@@ -174,26 +196,17 @@ async function main() {
174
196
  console.log("deleteResponse:", deleteResponse);
175
197
  }
176
198
 
177
- // Should be replaced with function to get user ID
178
- function getUserId() {
179
- var d = new Date().getTime(); //Timestamp
180
- var d2 =
181
- (typeof performance !== "undefined" &&
182
- performance.now &&
183
- performance.now() * 1000) ||
184
- 0; //Time in microseconds since page-load or 0 if unsupported
185
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
186
- var r = Math.random() * 16; //random number between 0 and 16
187
- if (d > 0) {
188
- //Use timestamp until depleted
189
- r = (d + r) % 16 | 0;
190
- d = Math.floor(d / 16);
191
- } else {
192
- //Use microseconds since page-load if supported
193
- r = (d2 + r) % 16 | 0;
194
- d2 = Math.floor(d2 / 16);
195
- }
196
- return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
199
+ function waitForEnter(prompt) {
200
+ const rl = readline.createInterface({
201
+ input: process.stdin,
202
+ output: process.stdout,
203
+ });
204
+
205
+ return new Promise((resolve) => {
206
+ rl.question(prompt, () => {
207
+ rl.close();
208
+ resolve();
209
+ });
197
210
  });
198
211
  }
199
212
 
@@ -250,7 +263,7 @@ An integer that specifies the maximum number of transactions to return. Default
250
263
 
251
264
  ##### type: `string`<a id="type-string"></a>
252
265
 
253
- Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
266
+ Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
254
267
 
255
268
  #### 🔄 Return<a id="🔄-return"></a>
256
269
 
@@ -336,13 +349,13 @@ const getAllAccountPositionsResponse =
336
349
  ### `snaptrade.accountInformation.getAllUserHoldings`<a id="snaptradeaccountinformationgetalluserholdings"></a>
337
350
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
338
351
 
339
- **Deprecated, please use the account-specific holdings endpoint instead.**
352
+ **Deprecated.** Use the account-specific holdings endpoint instead.
353
+
354
+ This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
340
355
 
341
356
  List all accounts for the user, plus balances, positions, and orders for each
342
357
  account.
343
358
 
344
- **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
345
-
346
359
 
347
360
  #### 🛠️ Usage<a id="🛠️-usage"></a>
348
361
 
@@ -538,9 +551,9 @@ Number of days in the past to fetch the most recent orders. Defaults to the last
538
551
  ### `snaptrade.accountInformation.getUserAccountPositions`<a id="snaptradeaccountinformationgetuseraccountpositions"></a>
539
552
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
540
553
 
541
- Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
554
+ **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
542
555
 
543
- This endpoint is deprecated. Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
556
+ Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
544
557
 
545
558
  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:
546
559
  - If you do, this endpoint returns real-time data.
@@ -653,6 +666,9 @@ Optional comma separated list of rate-of-return timeframes to return. Supported
653
666
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
654
667
 
655
668
  **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).
669
+
670
+ This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026.
671
+
656
672
  Returns a list of balances, positions, and recent orders for the specified account.
657
673
 
658
674
  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:
@@ -857,7 +873,7 @@ The UUID of the brokerage connection to be reconnected. This parameter should be
857
873
 
858
874
  ##### connectionType: `string`<a id="connectiontype-string"></a>
859
875
 
860
- Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
876
+ Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
861
877
 
862
878
  ##### showCloseButton: `boolean`<a id="showclosebutton-boolean"></a>
863
879
 
@@ -1220,6 +1236,8 @@ Returns a list of session events associated with a user.
1220
1236
  ```typescript
1221
1237
  const sessionEventsResponse = await snaptrade.connections.sessionEvents({
1222
1238
  partnerClientId: "SNAPTRADETEST",
1239
+ userId:
1240
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1223
1241
  sessionId:
1224
1242
  "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1225
1243
  });
@@ -1229,6 +1247,10 @@ const sessionEventsResponse = await snaptrade.connections.sessionEvents({
1229
1247
 
1230
1248
  ##### partnerClientId: `string`<a id="partnerclientid-string"></a>
1231
1249
 
1250
+ ##### userId: `string`<a id="userid-string"></a>
1251
+
1252
+ Optional comma separated list of user IDs used to filter the request on specific users
1253
+
1232
1254
  ##### sessionId: `string`<a id="sessionid-string"></a>
1233
1255
 
1234
1256
  Optional comma separated list of session IDs used to filter the request on specific users
@@ -1502,9 +1524,9 @@ const listSubscriptionsResponse =
1502
1524
  ### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
1503
1525
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
1504
1526
 
1505
- Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
1527
+ **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
1506
1528
 
1507
- This endpoint is deprecatd. Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
1529
+ Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
1508
1530
 
1509
1531
  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:
1510
1532
  - If you do, this endpoint returns real-time data.
@@ -1916,7 +1938,8 @@ Order ID returned by brokerage. This is the unique identifier for the order in t
1916
1938
  ### `snaptrade.trading.cancelUserAccountOrder`<a id="snaptradetradingcanceluseraccountorder"></a>
1917
1939
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
1918
1940
 
1919
- **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) **
1941
+ **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead.
1942
+
1920
1943
  Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
1921
1944
 
1922
1945
 
@@ -2022,7 +2045,7 @@ The type of order to place.
2022
2045
 
2023
2046
  ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2024
2047
 
2025
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2048
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2026
2049
 
2027
2050
  ##### legs: [`MlegLeg`](./models/mleg-leg.ts)[]<a id="legs-mleglegmodelsmleg-legts"></a>
2028
2051
 
@@ -2086,11 +2109,11 @@ Unique identifier for the symbol within SnapTrade. This is the ID used to refere
2086
2109
 
2087
2110
  ##### order_type: [`OrderTypeStrict`](./models/order-type-strict.ts)<a id="order_type-ordertypestrictmodelsorder-type-strictts"></a>
2088
2111
 
2089
- The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2112
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2090
2113
 
2091
2114
  ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2092
2115
 
2093
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2116
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2094
2117
 
2095
2118
  ##### price: `number`<a id="price-number"></a>
2096
2119
 
@@ -2164,8 +2187,6 @@ The quotes returned can be delayed depending on the brokerage the account belong
2164
2187
 
2165
2188
  This endpoint does not work for options quotes.
2166
2189
 
2167
- This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
2168
-
2169
2190
 
2170
2191
  #### 🛠️ Usage<a id="🛠️-usage"></a>
2171
2192
 
@@ -2205,7 +2226,8 @@ Should be set to `True` if `symbols` are comprised of tickers. Defaults to `Fals
2205
2226
  ### `snaptrade.trading.placeBracketOrder`<a id="snaptradetradingplacebracketorder"></a>
2206
2227
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2207
2228
 
2208
- **This endpoint is deprecated. Please switch to [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) **
2229
+ **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead.
2230
+
2209
2231
  Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for
2210
2232
  use. Only supported on certain brokerages
2211
2233
 
@@ -2245,11 +2267,11 @@ The action describes the intent or side of a trade. This is either `BUY` or `SEL
2245
2267
 
2246
2268
  ##### order_type: [`OrderTypeStrict`](./models/order-type-strict.ts)<a id="order_type-ordertypestrictmodelsorder-type-strictts"></a>
2247
2269
 
2248
- The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2270
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2249
2271
 
2250
2272
  ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2251
2273
 
2252
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2274
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2253
2275
 
2254
2276
  ##### stop_loss: [`StopLoss`](./models/stop-loss.ts)<a id="stop_loss-stoplossmodelsstop-lossts"></a>
2255
2277
 
@@ -2324,11 +2346,11 @@ const placeComplexOrderResponse = await snaptrade.trading.placeComplexOrder({
2324
2346
 
2325
2347
  ##### type: `string`<a id="type-string"></a>
2326
2348
 
2327
- The complex order type. - `OCO`: One Cancels the Other — two peer orders. - `OTO`: One Triggers the Other — a trigger order and a conditional order. - `OTOCO`: One Triggers a One Cancels the Other — a trigger order and two peer orders.
2349
+ The complex order type. - `OCO`: One Cancels the Other — two peer orders. - `OTO`: One Triggers the Other — a trigger order and a conditional order. - `OTOCO`: One Triggers a One Cancels the Other — a trigger order and two peer orders.
2328
2350
 
2329
2351
  ##### orders: [`ComplexOrderLeg`](./models/complex-order-leg.ts)[]<a id="orders-complexorderlegmodelscomplex-order-legts"></a>
2330
2352
 
2331
- The orders that make up the complex order. Required counts and roles per type: - `OCO`: exactly 2 orders, both `PEER` - `OTO`: exactly 2 orders, one `TRIGGER` and one `CONDITIONAL` - `OTOCO`: exactly 3 orders, one `TRIGGER` and two `PEER`
2353
+ The orders that make up the complex order. Required counts and roles per type: - `OCO`: exactly 2 orders, both `PEER` - `OTO`: exactly 2 orders, one `TRIGGER` and one `CONDITIONAL` - `OTOCO`: exactly 3 orders, one `TRIGGER` and two `PEER`
2332
2354
 
2333
2355
  ##### accountId: `string`<a id="accountid-string"></a>
2334
2356
 
@@ -2389,7 +2411,7 @@ The type of order to place.
2389
2411
 
2390
2412
  ##### time_in_force: `string`<a id="time_in_force-string"></a>
2391
2413
 
2392
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2414
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2393
2415
 
2394
2416
  ##### amount: `string`<a id="amount-string"></a>
2395
2417
 
@@ -2407,7 +2429,7 @@ The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIM
2407
2429
 
2408
2430
  ##### post_only: `boolean`<a id="post_only-boolean"></a>
2409
2431
 
2410
- Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
2432
+ Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
2411
2433
 
2412
2434
  ##### expiration_date: `string`<a id="expiration_date-string"></a>
2413
2435
 
@@ -2466,11 +2488,11 @@ The action describes the intent or side of a trade. This is either `BUY` or `SEL
2466
2488
 
2467
2489
  ##### order_type: [`OrderTypeStrict`](./models/order-type-strict.ts)<a id="order_type-ordertypestrictmodelsorder-type-strictts"></a>
2468
2490
 
2469
- The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2491
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2470
2492
 
2471
2493
  ##### time_in_force: [`ManualTradePlaceTimeInForceStrict`](./models/manual-trade-place-time-in-force-strict.ts)<a id="time_in_force-manualtradeplacetimeinforcestrictmodelsmanual-trade-place-time-in-force-strictts"></a>
2472
2494
 
2473
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until `expiry_date`, which is required. Not available for market orders. GTD orders are only available on certain brokerages. Visit https://support.snaptrade.com/brokerages for brokerage support.
2495
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until `expiry_date`, which is required. Not available for market orders. GTD orders are only available on certain brokerages. Visit https://support.snaptrade.com/brokerages for brokerage support.
2474
2496
 
2475
2497
  ##### universal_symbol_id: [`string`](./models/model-string.ts)<a id="universal_symbol_id-stringmodelsmodel-stringts"></a>
2476
2498
 
@@ -2482,7 +2504,7 @@ The security\\\'s trading ticker symbol. If \\\'symbol\\\' is provided, then \\\
2482
2504
 
2483
2505
  ##### trading_session: [`TradingSession`](./models/trading-session.ts)<a id="trading_session-tradingsessionmodelstrading-sessionts"></a>
2484
2506
 
2485
- The trading session for the order. This field indicates which market session the order will be placed in. This is only available for certain brokerages. Defaults to REGULAR. Here are the supported values: - `REGULAR` - Regular trading hours. - `EXTENDED` - Extended trading hours.
2507
+ The trading session for the order. This field indicates which market session the order will be placed in. This is only available for certain brokerages. Defaults to REGULAR. Here are the supported values: - `REGULAR` - Regular trading hours. - `EXTENDED` - Extended trading hours.
2486
2508
 
2487
2509
  ##### expiry_date: `string`<a id="expiry_date-string"></a>
2488
2510
 
@@ -2553,7 +2575,7 @@ The type of order to place.
2553
2575
 
2554
2576
  ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2555
2577
 
2556
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2578
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2557
2579
 
2558
2580
  ##### legs: [`MlegLeg`](./models/mleg-leg.ts)[]<a id="legs-mleglegmodelsmleg-legts"></a>
2559
2581
 
@@ -2660,7 +2682,7 @@ The type of order to place.
2660
2682
 
2661
2683
  ##### time_in_force: `string`<a id="time_in_force-string"></a>
2662
2684
 
2663
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2685
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2664
2686
 
2665
2687
  ##### amount: `string`<a id="amount-string"></a>
2666
2688
 
@@ -2678,7 +2700,7 @@ The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIM
2678
2700
 
2679
2701
  ##### post_only: `boolean`<a id="post_only-boolean"></a>
2680
2702
 
2681
- Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
2703
+ Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees.
2682
2704
 
2683
2705
  ##### expiration_date: `string`<a id="expiration_date-string"></a>
2684
2706
 
@@ -2732,11 +2754,11 @@ The action describes the intent or side of a trade. This is either `BUY` or `SEL
2732
2754
 
2733
2755
  ##### order_type: [`OrderTypeStrict`](./models/order-type-strict.ts)<a id="order_type-ordertypestrictmodelsorder-type-strictts"></a>
2734
2756
 
2735
- The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2757
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
2736
2758
 
2737
2759
  ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2738
2760
 
2739
- The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2761
+ The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
2740
2762
 
2741
2763
  ##### accountId: `string`<a id="accountid-string"></a>
2742
2764
 
@@ -2809,7 +2831,9 @@ const searchCryptocurrencyPairInstrumentsResponse =
2809
2831
  ### `snaptrade.transactionsAndReporting.getActivities`<a id="snaptradetransactionsandreportinggetactivities"></a>
2810
2832
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2811
2833
 
2812
- This endpoint is being deprecated but will continue to be available for use via SDKs, please use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) if possible
2834
+ **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible.
2835
+
2836
+ This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
2813
2837
 
2814
2838
  Returns all historical transactions for the specified user and filtering criteria. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request.
2815
2839
 
@@ -2817,8 +2841,6 @@ There is no guarantee to the ordering of the transactions returned. Please sort
2817
2841
 
2818
2842
  This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
2819
2843
 
2820
- **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
2821
-
2822
2844
 
2823
2845
  #### 🛠️ Usage<a id="🛠️-usage"></a>
2824
2846
 
@@ -2855,7 +2877,7 @@ Optional comma separated list of SnapTrade Connection (Brokerage Authorization)
2855
2877
 
2856
2878
  ##### type: `string`<a id="type-string"></a>
2857
2879
 
2858
- Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
2880
+ Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
2859
2881
 
2860
2882
  #### 🔄 Return<a id="🔄-return"></a>
2861
2883
 
@@ -2873,7 +2895,8 @@ Optional comma separated list of transaction types to filter by. SnapTrade does
2873
2895
  ### `snaptrade.transactionsAndReporting.getReportingCustomRange`<a id="snaptradetransactionsandreportinggetreportingcustomrange"></a>
2874
2896
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2875
2897
 
2876
- Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
2898
+ **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
2899
+
2877
2900
 
2878
2901
  #### 🛠️ Usage<a id="🛠️-usage"></a>
2879
2902