snaptrade-typescript-sdk 12.2.6 → 12.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -65
- package/dist/browser.umd.js +1 -1
- package/dist/index.cjs +118 -118
- package/dist/index.d.cts +63 -63
- package/dist/index.d.mts +63 -63
- package/dist/index.d.ts +63 -63
- package/dist/index.mjs +118 -118
- package/package.json +1 -1
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
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/12.2.7)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -101,6 +101,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
101
101
|
* [`snaptrade.connections.disableBrokerageAuthorization`](#snaptradeconnectionsdisablebrokerageauthorization)
|
|
102
102
|
* [`snaptrade.connections.listBrokerageAuthorizationAccounts`](#snaptradeconnectionslistbrokerageauthorizationaccounts)
|
|
103
103
|
* [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
|
|
104
|
+
* [`snaptrade.connections.listConnectionAccounts`](#snaptradeconnectionslistconnectionaccounts)
|
|
104
105
|
* [`snaptrade.connections.refreshBrokerageAuthorization`](#snaptradeconnectionsrefreshbrokerageauthorization)
|
|
105
106
|
* [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
|
|
106
107
|
* [`snaptrade.connections.syncBrokerageAuthorizationTransactions`](#snaptradeconnectionssyncbrokerageauthorizationtransactions)
|
|
@@ -109,7 +110,6 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
109
110
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
|
|
110
111
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
|
|
111
112
|
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
|
|
112
|
-
* [`snaptrade.experimentalEndpoints.listConnectionAccounts`](#snaptradeexperimentalendpointslistconnectionaccounts)
|
|
113
113
|
* [`snaptrade.experimentalEndpoints.listSubscriptions`](#snaptradeexperimentalendpointslistsubscriptions)
|
|
114
114
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
115
115
|
* [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
|
|
@@ -1578,6 +1578,67 @@ The client identifies the user in this mode. Do not pass `userId` `userSecret` t
|
|
|
1578
1578
|
---
|
|
1579
1579
|
|
|
1580
1580
|
|
|
1581
|
+
### `snaptrade.connections.listConnectionAccounts`<a id="snaptradeconnectionslistconnectionaccounts"></a>
|
|
1582
|
+
|
|
1583
|
+
Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
1584
|
+
|
|
1585
|
+
Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
1586
|
+
|
|
1587
|
+
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.
|
|
1588
|
+
|
|
1589
|
+
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).
|
|
1590
|
+
|
|
1591
|
+
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.
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1595
|
+
|
|
1596
|
+
##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
|
|
1597
|
+
|
|
1598
|
+
```typescript
|
|
1599
|
+
const listConnectionAccountsResponse =
|
|
1600
|
+
await commercialApiKeyClient.connections.listConnectionAccounts({
|
|
1601
|
+
connectionId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
1602
|
+
userId: "snaptrade-user-123",
|
|
1603
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1604
|
+
});
|
|
1605
|
+
```
|
|
1606
|
+
|
|
1607
|
+
Required credentials for this mode:
|
|
1608
|
+
|
|
1609
|
+
- `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.
|
|
1610
|
+
|
|
1611
|
+
- `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).
|
|
1612
|
+
|
|
1613
|
+
##### Personal API Key Auth<a id="personal-api-key-auth"></a>
|
|
1614
|
+
|
|
1615
|
+
```typescript
|
|
1616
|
+
const listConnectionAccountsResponse =
|
|
1617
|
+
await personalApiKeyClient.connections.listConnectionAccounts({
|
|
1618
|
+
connectionId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
1619
|
+
});
|
|
1620
|
+
```
|
|
1621
|
+
|
|
1622
|
+
The client identifies the user in this mode. Do not pass `userId` `userSecret` to this method.
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1626
|
+
|
|
1627
|
+
##### connectionId: `string`<a id="connectionid-string"></a>
|
|
1628
|
+
|
|
1629
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1630
|
+
|
|
1631
|
+
[ConnectionAccount](./models/connection-account.ts)
|
|
1632
|
+
|
|
1633
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1634
|
+
|
|
1635
|
+
`/connections/{connectionId}/accounts` `GET`
|
|
1636
|
+
|
|
1637
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1638
|
+
|
|
1639
|
+
---
|
|
1640
|
+
|
|
1641
|
+
|
|
1581
1642
|
### `snaptrade.connections.refreshBrokerageAuthorization`<a id="snaptradeconnectionsrefreshbrokerageauthorization"></a>
|
|
1582
1643
|
|
|
1583
1644
|
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.
|
|
@@ -2060,69 +2121,6 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
|
|
|
2060
2121
|
---
|
|
2061
2122
|
|
|
2062
2123
|
|
|
2063
|
-
### `snaptrade.experimentalEndpoints.listConnectionAccounts`<a id="snaptradeexperimentalendpointslistconnectionaccounts"></a>
|
|
2064
|
-
|
|
2065
|
-
Experimental and subject to change without notice.
|
|
2066
|
-
|
|
2067
|
-
Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
2068
|
-
|
|
2069
|
-
Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
2070
|
-
|
|
2071
|
-
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.
|
|
2072
|
-
|
|
2073
|
-
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).
|
|
2074
|
-
|
|
2075
|
-
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.
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2079
|
-
|
|
2080
|
-
##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
|
|
2081
|
-
|
|
2082
|
-
```typescript
|
|
2083
|
-
const listConnectionAccountsResponse =
|
|
2084
|
-
await commercialApiKeyClient.experimentalEndpoints.listConnectionAccounts({
|
|
2085
|
-
connectionId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
2086
|
-
userId: "snaptrade-user-123",
|
|
2087
|
-
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
2088
|
-
});
|
|
2089
|
-
```
|
|
2090
|
-
|
|
2091
|
-
Required credentials for this mode:
|
|
2092
|
-
|
|
2093
|
-
- `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.
|
|
2094
|
-
|
|
2095
|
-
- `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).
|
|
2096
|
-
|
|
2097
|
-
##### Personal API Key Auth<a id="personal-api-key-auth"></a>
|
|
2098
|
-
|
|
2099
|
-
```typescript
|
|
2100
|
-
const listConnectionAccountsResponse =
|
|
2101
|
-
await personalApiKeyClient.experimentalEndpoints.listConnectionAccounts({
|
|
2102
|
-
connectionId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
2103
|
-
});
|
|
2104
|
-
```
|
|
2105
|
-
|
|
2106
|
-
The client identifies the user in this mode. Do not pass `userId` `userSecret` to this method.
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2110
|
-
|
|
2111
|
-
##### connectionId: `string`<a id="connectionid-string"></a>
|
|
2112
|
-
|
|
2113
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
2114
|
-
|
|
2115
|
-
[ConnectionAccount](./models/connection-account.ts)
|
|
2116
|
-
|
|
2117
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2118
|
-
|
|
2119
|
-
`/connections/{connectionId}/accounts` `GET`
|
|
2120
|
-
|
|
2121
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2122
|
-
|
|
2123
|
-
---
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
2124
|
### `snaptrade.experimentalEndpoints.listSubscriptions`<a id="snaptradeexperimentalendpointslistsubscriptions"></a>
|
|
2127
2125
|
|
|
2128
2126
|
Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|