snaptrade-typescript-sdk 11.0.4 → 12.0.0

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.4-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/11.0.4)
9
+ [![npm](https://img.shields.io/badge/npm-v12.0.0-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/12.0.0)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -21,12 +21,10 @@ Connect brokerage accounts to your app for live positions and trading
21
21
  * [`snaptrade.accountInformation.getAccountActivities`](#snaptradeaccountinformationgetaccountactivities)
22
22
  * [`snaptrade.accountInformation.getAccountBalanceHistory`](#snaptradeaccountinformationgetaccountbalancehistory)
23
23
  * [`snaptrade.accountInformation.getAllAccountPositions`](#snaptradeaccountinformationgetallaccountpositions)
24
- * [`snaptrade.accountInformation.getAllUserHoldings`](#snaptradeaccountinformationgetalluserholdings)
25
24
  * [`snaptrade.accountInformation.getUserAccountBalance`](#snaptradeaccountinformationgetuseraccountbalance)
26
25
  * [`snaptrade.accountInformation.getUserAccountDetails`](#snaptradeaccountinformationgetuseraccountdetails)
27
26
  * [`snaptrade.accountInformation.getUserAccountOrderDetail`](#snaptradeaccountinformationgetuseraccountorderdetail)
28
27
  * [`snaptrade.accountInformation.getUserAccountOrders`](#snaptradeaccountinformationgetuseraccountorders)
29
- * [`snaptrade.accountInformation.getUserAccountPositions`](#snaptradeaccountinformationgetuseraccountpositions)
30
28
  * [`snaptrade.accountInformation.getUserAccountRecentOrders`](#snaptradeaccountinformationgetuseraccountrecentorders)
31
29
  * [`snaptrade.accountInformation.getUserAccountReturnRates`](#snaptradeaccountinformationgetuseraccountreturnrates)
32
30
  * [`snaptrade.accountInformation.getUserHoldings`](#snaptradeaccountinformationgetuserholdings)
@@ -44,37 +42,29 @@ Connect brokerage accounts to your app for live positions and trading
44
42
  * [`snaptrade.connections.listBrokerageAuthorizationAccounts`](#snaptradeconnectionslistbrokerageauthorizationaccounts)
45
43
  * [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
46
44
  * [`snaptrade.connections.refreshBrokerageAuthorization`](#snaptradeconnectionsrefreshbrokerageauthorization)
47
- * [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
48
45
  * [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
49
- * [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
50
46
  * [`snaptrade.connections.syncBrokerageAuthorizationTransactions`](#snaptradeconnectionssyncbrokerageauthorizationtransactions)
51
47
  * [`snaptrade.experimentalEndpoints.addSubscription`](#snaptradeexperimentalendpointsaddsubscription)
52
48
  * [`snaptrade.experimentalEndpoints.cancelSubscription`](#snaptradeexperimentalendpointscancelsubscription)
53
49
  * [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
54
50
  * [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
55
51
  * [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
52
+ * [`snaptrade.experimentalEndpoints.listConnectionAccounts`](#snaptradeexperimentalendpointslistconnectionaccounts)
56
53
  * [`snaptrade.experimentalEndpoints.listSubscriptions`](#snaptradeexperimentalendpointslistsubscriptions)
57
- * [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
58
- * [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
59
54
  * [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
60
- * [`snaptrade.referenceData.getSecurityTypes`](#snaptradereferencedatagetsecuritytypes)
61
55
  * [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
62
56
  * [`snaptrade.referenceData.getSymbols`](#snaptradereferencedatagetsymbols)
63
57
  * [`snaptrade.referenceData.getSymbolsByTicker`](#snaptradereferencedatagetsymbolsbyticker)
64
58
  * [`snaptrade.referenceData.listAllBrokerageAuthorizationType`](#snaptradereferencedatalistallbrokerageauthorizationtype)
65
59
  * [`snaptrade.referenceData.listAllBrokerageInstruments`](#snaptradereferencedatalistallbrokerageinstruments)
66
60
  * [`snaptrade.referenceData.listAllBrokerages`](#snaptradereferencedatalistallbrokerages)
67
- * [`snaptrade.referenceData.listAllCurrencies`](#snaptradereferencedatalistallcurrencies)
68
- * [`snaptrade.referenceData.listAllCurrenciesRates`](#snaptradereferencedatalistallcurrenciesrates)
69
61
  * [`snaptrade.referenceData.symbolSearchUserAccount`](#snaptradereferencedatasymbolsearchuseraccount)
70
62
  * [`snaptrade.trading.cancelOrder`](#snaptradetradingcancelorder)
71
- * [`snaptrade.trading.cancelUserAccountOrder`](#snaptradetradingcanceluseraccountorder)
72
63
  * [`snaptrade.trading.getCryptocurrencyPairQuote`](#snaptradetradinggetcryptocurrencypairquote)
73
64
  * [`snaptrade.trading.getOptionImpact`](#snaptradetradinggetoptionimpact)
74
65
  * [`snaptrade.trading.getOrderImpact`](#snaptradetradinggetorderimpact)
75
66
  * [`snaptrade.trading.getUserAccountOptionQuotes`](#snaptradetradinggetuseraccountoptionquotes)
76
67
  * [`snaptrade.trading.getUserAccountQuotes`](#snaptradetradinggetuseraccountquotes)
77
- * [`snaptrade.trading.placeBracketOrder`](#snaptradetradingplacebracketorder)
78
68
  * [`snaptrade.trading.placeComplexOrder`](#snaptradetradingplacecomplexorder)
79
69
  * [`snaptrade.trading.placeCryptoOrder`](#snaptradetradingplacecryptoorder)
80
70
  * [`snaptrade.trading.placeForceOrder`](#snaptradetradingplaceforceorder)
@@ -83,8 +73,6 @@ Connect brokerage accounts to your app for live positions and trading
83
73
  * [`snaptrade.trading.previewCryptoOrder`](#snaptradetradingpreviewcryptoorder)
84
74
  * [`snaptrade.trading.replaceOrder`](#snaptradetradingreplaceorder)
85
75
  * [`snaptrade.trading.searchCryptocurrencyPairInstruments`](#snaptradetradingsearchcryptocurrencypairinstruments)
86
- * [`snaptrade.transactionsAndReporting.getActivities`](#snaptradetransactionsandreportinggetactivities)
87
- * [`snaptrade.transactionsAndReporting.getReportingCustomRange`](#snaptradetransactionsandreportinggetreportingcustomrange)
88
76
 
89
77
  <!-- tocstop -->
90
78
 
@@ -348,45 +336,6 @@ const getAllAccountPositionsResponse =
348
336
  ---
349
337
 
350
338
 
351
- ### `snaptrade.accountInformation.getAllUserHoldings`<a id="snaptradeaccountinformationgetalluserholdings"></a>
352
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
353
-
354
- **Deprecated.** Use the account-specific holdings endpoint instead.
355
-
356
- This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
357
-
358
- List all accounts for the user, plus balances, positions, and orders for each
359
- account.
360
-
361
-
362
- #### 🛠️ Usage<a id="🛠️-usage"></a>
363
-
364
- ```typescript
365
- const getAllUserHoldingsResponse =
366
- await snaptrade.accountInformation.getAllUserHoldings({
367
- brokerageAuthorizations: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
368
- });
369
- ```
370
-
371
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
372
-
373
- ##### brokerageAuthorizations: `string`<a id="brokerageauthorizations-string"></a>
374
-
375
- Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
376
-
377
- #### 🔄 Return<a id="🔄-return"></a>
378
-
379
- [AccountHoldings](./models/account-holdings.ts)
380
-
381
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
382
-
383
- `/holdings` `GET`
384
-
385
- [🔙 **Back to Table of Contents**](#table-of-contents)
386
-
387
- ---
388
-
389
-
390
339
  ### `snaptrade.accountInformation.getUserAccountBalance`<a id="snaptradeaccountinformationgetuseraccountbalance"></a>
391
340
 
392
341
  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).
@@ -550,46 +499,6 @@ Number of days in the past to fetch the most recent orders. Defaults to the last
550
499
  ---
551
500
 
552
501
 
553
- ### `snaptrade.accountInformation.getUserAccountPositions`<a id="snaptradeaccountinformationgetuseraccountpositions"></a>
554
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
555
-
556
- **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.
557
-
558
- 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).
559
-
560
- 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:
561
- - If you do, this endpoint returns real-time data.
562
- - 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.
563
-
564
- 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.
565
-
566
-
567
- #### 🛠️ Usage<a id="🛠️-usage"></a>
568
-
569
- ```typescript
570
- const getUserAccountPositionsResponse =
571
- await snaptrade.accountInformation.getUserAccountPositions({
572
- accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
573
- });
574
- ```
575
-
576
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
577
-
578
- ##### accountId: `string`<a id="accountid-string"></a>
579
-
580
- #### 🔄 Return<a id="🔄-return"></a>
581
-
582
- [Position](./models/position.ts)
583
-
584
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
585
-
586
- `/accounts/{accountId}/positions` `GET`
587
-
588
- [🔙 **Back to Table of Contents**](#table-of-contents)
589
-
590
- ---
591
-
592
-
593
502
  ### `snaptrade.accountInformation.getUserAccountRecentOrders`<a id="snaptradeaccountinformationgetuseraccountrecentorders"></a>
594
503
 
595
504
  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.
@@ -1168,32 +1077,6 @@ const refreshBrokerageAuthorizationResponse =
1168
1077
  ---
1169
1078
 
1170
1079
 
1171
- ### `snaptrade.connections.removeBrokerageAuthorization`<a id="snaptradeconnectionsremovebrokerageauthorization"></a>
1172
-
1173
- Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
1174
-
1175
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1176
-
1177
- ```typescript
1178
- const removeBrokerageAuthorizationResponse =
1179
- await snaptrade.connections.removeBrokerageAuthorization({
1180
- authorizationId: "87b24961-b51e-4db8-9226-f198f6518a89",
1181
- });
1182
- ```
1183
-
1184
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1185
-
1186
- ##### authorizationId: `string`<a id="authorizationid-string"></a>
1187
-
1188
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1189
-
1190
- `/authorizations/{authorizationId}` `DELETE`
1191
-
1192
- [🔙 **Back to Table of Contents**](#table-of-contents)
1193
-
1194
- ---
1195
-
1196
-
1197
1080
  ### `snaptrade.connections.returnRates`<a id="snaptradeconnectionsreturnrates"></a>
1198
1081
 
1199
1082
  Returns a list of rate of return percents for a given connection.
@@ -1229,47 +1112,6 @@ Optional comma separated list of rate-of-return timeframes to return. Supported
1229
1112
  ---
1230
1113
 
1231
1114
 
1232
- ### `snaptrade.connections.sessionEvents`<a id="snaptradeconnectionssessionevents"></a>
1233
-
1234
- Returns a list of session events associated with a user.
1235
-
1236
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1237
-
1238
- ```typescript
1239
- const sessionEventsResponse = await snaptrade.connections.sessionEvents({
1240
- partnerClientId: "SNAPTRADETEST",
1241
- userId:
1242
- "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1243
- sessionId:
1244
- "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1245
- });
1246
- ```
1247
-
1248
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1249
-
1250
- ##### partnerClientId: `string`<a id="partnerclientid-string"></a>
1251
-
1252
- ##### userId: `string`<a id="userid-string"></a>
1253
-
1254
- Optional comma separated list of user IDs used to filter the request on specific users
1255
-
1256
- ##### sessionId: `string`<a id="sessionid-string"></a>
1257
-
1258
- Optional comma separated list of session IDs used to filter the request on specific users
1259
-
1260
- #### 🔄 Return<a id="🔄-return"></a>
1261
-
1262
- [ConnectionsSessionEvents200ResponseInner](./models/connections-session-events200-response-inner.ts)
1263
-
1264
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1265
-
1266
- `/sessionEvents` `GET`
1267
-
1268
- [🔙 **Back to Table of Contents**](#table-of-contents)
1269
-
1270
- ---
1271
-
1272
-
1273
1115
  ### `snaptrade.connections.syncBrokerageAuthorizationTransactions`<a id="snaptradeconnectionssyncbrokerageauthorizationtransactions"></a>
1274
1116
 
1275
1117
  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
@@ -1499,93 +1341,65 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
1499
1341
  ---
1500
1342
 
1501
1343
 
1502
- ### `snaptrade.experimentalEndpoints.listSubscriptions`<a id="snaptradeexperimentalendpointslistsubscriptions"></a>
1503
-
1504
- Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
1505
-
1506
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1507
-
1508
- ```typescript
1509
- const listSubscriptionsResponse =
1510
- await snaptrade.experimentalEndpoints.listSubscriptions();
1511
- ```
1512
-
1513
- #### 🔄 Return<a id="🔄-return"></a>
1514
-
1515
- [TradeDetectionSubscription](./models/trade-detection-subscription.ts)
1516
-
1517
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1518
-
1519
- `/snapTrade/tradeDetection/subscriptions` `GET`
1520
-
1521
- [🔙 **Back to Table of Contents**](#table-of-contents)
1344
+ ### `snaptrade.experimentalEndpoints.listConnectionAccounts`<a id="snaptradeexperimentalendpointslistconnectionaccounts"></a>
1522
1345
 
1523
- ---
1346
+ Experimental and subject to change without notice.
1524
1347
 
1348
+ Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
1525
1349
 
1526
- ### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
1527
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
1350
+ Each item in the response carries a `kind` field (currently only `investment` is implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
1528
1351
 
1529
- **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.
1352
+ On Pay as you Go / Real-time, this endpoint refreshes each account's opening date, funding date, and market value live from the brokerage on each call.
1530
1353
 
1531
- 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).
1354
+ 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).
1532
1355
 
1533
- 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:
1534
- - If you do, this endpoint returns real-time data.
1535
- - 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.
1356
+ 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.
1536
1357
 
1537
1358
 
1538
1359
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1539
1360
 
1540
1361
  ```typescript
1541
- const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
1542
- accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1543
- });
1362
+ const listConnectionAccountsResponse =
1363
+ await snaptrade.experimentalEndpoints.listConnectionAccounts({
1364
+ authorizationId: "87b24961-b51e-4db8-9226-f198f6518a89",
1365
+ });
1544
1366
  ```
1545
1367
 
1546
1368
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1547
1369
 
1548
- ##### accountId: `string`<a id="accountid-string"></a>
1370
+ ##### authorizationId: `string`<a id="authorizationid-string"></a>
1549
1371
 
1550
1372
  #### 🔄 Return<a id="🔄-return"></a>
1551
1373
 
1552
- [OptionsPosition](./models/options-position.ts)
1374
+ [ConnectionAccount](./models/connection-account.ts)
1553
1375
 
1554
1376
  #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1555
1377
 
1556
- `/accounts/{accountId}/options` `GET`
1378
+ `/connections/{authorizationId}/accounts` `GET`
1557
1379
 
1558
1380
  [🔙 **Back to Table of Contents**](#table-of-contents)
1559
1381
 
1560
1382
  ---
1561
1383
 
1562
1384
 
1563
- ### `snaptrade.referenceData.getCurrencyExchangeRatePair`<a id="snaptradereferencedatagetcurrencyexchangeratepair"></a>
1385
+ ### `snaptrade.experimentalEndpoints.listSubscriptions`<a id="snaptradeexperimentalendpointslistsubscriptions"></a>
1564
1386
 
1565
- Returns an Exchange Rate Pair object for the specified Currency Pair.
1387
+ Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
1566
1388
 
1567
1389
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1568
1390
 
1569
1391
  ```typescript
1570
- const getCurrencyExchangeRatePairResponse =
1571
- await snaptrade.referenceData.getCurrencyExchangeRatePair({
1572
- currencyPair: "currencyPair_example",
1573
- });
1392
+ const listSubscriptionsResponse =
1393
+ await snaptrade.experimentalEndpoints.listSubscriptions();
1574
1394
  ```
1575
1395
 
1576
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1577
-
1578
- ##### currencyPair: `string`<a id="currencypair-string"></a>
1579
-
1580
- A currency pair based on currency code for example, {CAD-USD}
1581
-
1582
1396
  #### 🔄 Return<a id="🔄-return"></a>
1583
1397
 
1584
- [ExchangeRatePairs](./models/exchange-rate-pairs.ts)
1398
+ [TradeDetectionSubscription](./models/trade-detection-subscription.ts)
1585
1399
 
1586
1400
  #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1587
1401
 
1588
- `/currencies/rates/{currencyPair}` `GET`
1402
+ `/snapTrade/tradeDetection/subscriptions` `GET`
1589
1403
 
1590
1404
  [🔙 **Back to Table of Contents**](#table-of-contents)
1591
1405
 
@@ -1615,30 +1429,6 @@ const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo();
1615
1429
  ---
1616
1430
 
1617
1431
 
1618
- ### `snaptrade.referenceData.getSecurityTypes`<a id="snaptradereferencedatagetsecuritytypes"></a>
1619
-
1620
- Return all available security types supported by SnapTrade.
1621
-
1622
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1623
-
1624
- ```typescript
1625
- const getSecurityTypesResponse =
1626
- await snaptrade.referenceData.getSecurityTypes();
1627
- ```
1628
-
1629
- #### 🔄 Return<a id="🔄-return"></a>
1630
-
1631
- [SecurityType](./models/security-type.ts)
1632
-
1633
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1634
-
1635
- `/securityTypes` `GET`
1636
-
1637
- [🔙 **Back to Table of Contents**](#table-of-contents)
1638
-
1639
- ---
1640
-
1641
-
1642
1432
  ### `snaptrade.referenceData.getStockExchanges`<a id="snaptradereferencedatagetstockexchanges"></a>
1643
1433
 
1644
1434
  Returns a list of all supported Exchanges.
@@ -1816,54 +1606,6 @@ const listAllBrokeragesResponse =
1816
1606
  ---
1817
1607
 
1818
1608
 
1819
- ### `snaptrade.referenceData.listAllCurrencies`<a id="snaptradereferencedatalistallcurrencies"></a>
1820
-
1821
- Returns a list of all defined Currency objects.
1822
-
1823
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1824
-
1825
- ```typescript
1826
- const listAllCurrenciesResponse =
1827
- await snaptrade.referenceData.listAllCurrencies();
1828
- ```
1829
-
1830
- #### 🔄 Return<a id="🔄-return"></a>
1831
-
1832
- [Currency](./models/currency.ts)
1833
-
1834
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1835
-
1836
- `/currencies` `GET`
1837
-
1838
- [🔙 **Back to Table of Contents**](#table-of-contents)
1839
-
1840
- ---
1841
-
1842
-
1843
- ### `snaptrade.referenceData.listAllCurrenciesRates`<a id="snaptradereferencedatalistallcurrenciesrates"></a>
1844
-
1845
- Returns a list of all Exchange Rate Pairs for all supported Currencies.
1846
-
1847
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1848
-
1849
- ```typescript
1850
- const listAllCurrenciesRatesResponse =
1851
- await snaptrade.referenceData.listAllCurrenciesRates();
1852
- ```
1853
-
1854
- #### 🔄 Return<a id="🔄-return"></a>
1855
-
1856
- [ExchangeRatePairs](./models/exchange-rate-pairs.ts)
1857
-
1858
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1859
-
1860
- `/currencies/rates` `GET`
1861
-
1862
- [🔙 **Back to Table of Contents**](#table-of-contents)
1863
-
1864
- ---
1865
-
1866
-
1867
1609
  ### `snaptrade.referenceData.symbolSearchUserAccount`<a id="snaptradereferencedatasymbolsearchuseraccount"></a>
1868
1610
 
1869
1611
  Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
@@ -1937,45 +1679,6 @@ Order ID returned by brokerage. This is the unique identifier for the order in t
1937
1679
  ---
1938
1680
 
1939
1681
 
1940
- ### `snaptrade.trading.cancelUserAccountOrder`<a id="snaptradetradingcanceluseraccountorder"></a>
1941
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
1942
-
1943
- **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead.
1944
-
1945
- Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
1946
-
1947
-
1948
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1949
-
1950
- ```typescript
1951
- const cancelUserAccountOrderResponse =
1952
- await snaptrade.trading.cancelUserAccountOrder({
1953
- accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1954
- brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1955
- });
1956
- ```
1957
-
1958
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1959
-
1960
- ##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
1961
-
1962
- Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
1963
-
1964
- ##### accountId: `string`<a id="accountid-string"></a>
1965
-
1966
- #### 🔄 Return<a id="🔄-return"></a>
1967
-
1968
- [AccountOrderRecord](./models/account-order-record.ts)
1969
-
1970
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1971
-
1972
- `/accounts/{accountId}/orders/cancel` `POST`
1973
-
1974
- [🔙 **Back to Table of Contents**](#table-of-contents)
1975
-
1976
- ---
1977
-
1978
-
1979
1682
  ### `snaptrade.trading.getCryptocurrencyPairQuote`<a id="snaptradetradinggetcryptocurrencypairquote"></a>
1980
1683
 
1981
1684
  Gets a quote for the specified account.
@@ -2225,89 +1928,6 @@ Should be set to `True` if `symbols` are comprised of tickers. Defaults to `Fals
2225
1928
  ---
2226
1929
 
2227
1930
 
2228
- ### `snaptrade.trading.placeBracketOrder`<a id="snaptradetradingplacebracketorder"></a>
2229
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2230
-
2231
- **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead.
2232
-
2233
- Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for
2234
- use. Only supported on certain brokerages
2235
-
2236
-
2237
- #### 🛠️ Usage<a id="🛠️-usage"></a>
2238
-
2239
- ```typescript
2240
- const placeBracketOrderResponse = await snaptrade.trading.placeBracketOrder({
2241
- accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2242
- action: "BUY",
2243
- instrument: {
2244
- symbol: "AAPL",
2245
- type: "EQUITY",
2246
- },
2247
- order_type: "Market",
2248
- time_in_force: "Day",
2249
- price: 31.33,
2250
- stop: 31.33,
2251
- units: 10.5,
2252
- stop_loss: {
2253
- stop_price: "48.55",
2254
- limit_price: "48.50",
2255
- },
2256
- take_profit: {
2257
- limit_price: "49.95",
2258
- },
2259
- });
2260
- ```
2261
-
2262
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2263
-
2264
- ##### action: [`ActionStrictWithOptions`](./models/action-strict-with-options.ts)<a id="action-actionstrictwithoptionsmodelsaction-strict-with-optionsts"></a>
2265
-
2266
- The action describes the intent or side of a trade. This is either `BUY` or `SELL` for Equity symbols or `BUY_TO_OPEN`, `BUY_TO_CLOSE`, `SELL_TO_OPEN` or `SELL_TO_CLOSE` for Options.
2267
-
2268
- ##### instrument: [`TradingInstrument`](./models/trading-instrument.ts)<a id="instrument-tradinginstrumentmodelstrading-instrumentts"></a>
2269
-
2270
- ##### order_type: [`OrderTypeStrict`](./models/order-type-strict.ts)<a id="order_type-ordertypestrictmodelsorder-type-strictts"></a>
2271
-
2272
- 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.
2273
-
2274
- ##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
2275
-
2276
- 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.
2277
-
2278
- ##### stop_loss: [`StopLoss`](./models/stop-loss.ts)<a id="stop_loss-stoplossmodelsstop-lossts"></a>
2279
-
2280
- ##### take_profit: [`TakeProfit`](./models/take-profit.ts)<a id="take_profit-takeprofitmodelstake-profitts"></a>
2281
-
2282
- ##### accountId: `string`<a id="accountid-string"></a>
2283
-
2284
- The ID of the account to execute the trade on.
2285
-
2286
- ##### price: `number`<a id="price-number"></a>
2287
-
2288
- The limit price for `Limit` and `StopLimit` orders.
2289
-
2290
- ##### stop: `number`<a id="stop-number"></a>
2291
-
2292
- The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2293
-
2294
- ##### units: `number`<a id="units-number"></a>
2295
-
2296
- Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
2297
-
2298
- #### 🔄 Return<a id="🔄-return"></a>
2299
-
2300
- [AccountOrderRecord](./models/account-order-record.ts)
2301
-
2302
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2303
-
2304
- `/accounts/{accountId}/trading/bracket` `POST`
2305
-
2306
- [🔙 **Back to Table of Contents**](#table-of-contents)
2307
-
2308
- ---
2309
-
2310
-
2311
1931
  ### `snaptrade.trading.placeComplexOrder`<a id="snaptradetradingplacecomplexorder"></a>
2312
1932
 
2313
1933
  Places a complex conditional order (OCO, OTO, or OTOCO).
@@ -2830,120 +2450,5 @@ const searchCryptocurrencyPairInstrumentsResponse =
2830
2450
  ---
2831
2451
 
2832
2452
 
2833
- ### `snaptrade.transactionsAndReporting.getActivities`<a id="snaptradetransactionsandreportinggetactivities"></a>
2834
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2835
-
2836
- **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible.
2837
-
2838
- This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
2839
-
2840
- 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.
2841
-
2842
- There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order.
2843
-
2844
- This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
2845
-
2846
-
2847
- #### 🛠️ Usage<a id="🛠️-usage"></a>
2848
-
2849
- ```typescript
2850
- const getActivitiesResponse =
2851
- await snaptrade.transactionsAndReporting.getActivities({
2852
- startDate: "2022-01-24T00:00:00.000Z",
2853
- endDate: "2022-01-24T00:00:00.000Z",
2854
- accounts:
2855
- "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
2856
- brokerageAuthorizations:
2857
- "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
2858
- type: "BUY,SELL,DIVIDEND",
2859
- });
2860
- ```
2861
-
2862
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2863
-
2864
- ##### startDate: `string | Date`<a id="startdate-string--date"></a>
2865
-
2866
- The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
2867
-
2868
- ##### endDate: `string | Date`<a id="enddate-string--date"></a>
2869
-
2870
- The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
2871
-
2872
- ##### accounts: `string`<a id="accounts-string"></a>
2873
-
2874
- Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
2875
-
2876
- ##### brokerageAuthorizations: `string`<a id="brokerageauthorizations-string"></a>
2877
-
2878
- Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
2879
-
2880
- ##### type: `string`<a id="type-string"></a>
2881
-
2882
- 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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
2883
-
2884
- #### 🔄 Return<a id="🔄-return"></a>
2885
-
2886
- [UniversalActivity](./models/universal-activity.ts)
2887
-
2888
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2889
-
2890
- `/activities` `GET`
2891
-
2892
- [🔙 **Back to Table of Contents**](#table-of-contents)
2893
-
2894
- ---
2895
-
2896
-
2897
- ### `snaptrade.transactionsAndReporting.getReportingCustomRange`<a id="snaptradetransactionsandreportinggetreportingcustomrange"></a>
2898
- ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2899
-
2900
- **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.
2901
-
2902
-
2903
- #### 🛠️ Usage<a id="🛠️-usage"></a>
2904
-
2905
- ```typescript
2906
- const getReportingCustomRangeResponse =
2907
- await snaptrade.transactionsAndReporting.getReportingCustomRange({
2908
- startDate: "2022-01-24T00:00:00.000Z",
2909
- endDate: "2022-01-24T00:00:00.000Z",
2910
- accounts:
2911
- "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
2912
- detailed: true,
2913
- frequency: "monthly",
2914
- });
2915
- ```
2916
-
2917
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2918
-
2919
- ##### startDate: `string | Date`<a id="startdate-string--date"></a>
2920
-
2921
- ##### endDate: `string | Date`<a id="enddate-string--date"></a>
2922
-
2923
- ##### accounts: `string`<a id="accounts-string"></a>
2924
-
2925
- Optional comma separated list of account IDs used to filter the request on specific accounts
2926
-
2927
- ##### detailed: `boolean`<a id="detailed-boolean"></a>
2928
-
2929
- Optional, increases frequency of data points for the total value and contribution charts if set to true
2930
-
2931
- ##### frequency: `string`<a id="frequency-string"></a>
2932
-
2933
- Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
2934
-
2935
- #### 🔄 Return<a id="🔄-return"></a>
2936
-
2937
- [PerformanceCustom](./models/performance-custom.ts)
2938
-
2939
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2940
-
2941
- `/performance/custom` `GET`
2942
-
2943
- [🔙 **Back to Table of Contents**](#table-of-contents)
2944
-
2945
- ---
2946
-
2947
-
2948
2453
  ## Author<a id="author"></a>
2949
2454
  This TypeScript package is automatically generated by [Konfig](https://konfigthis.com)