snaptrade-typescript-sdk 13.0.1 → 13.1.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 +47 -1
- package/dist/browser.umd.js +7 -7
- package/dist/index.cjs +199 -46
- package/dist/index.d.cts +274 -61
- package/dist/index.d.mts +274 -61
- package/dist/index.d.ts +274 -61
- package/dist/index.mjs +150 -2
- 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/13.1.1)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -114,6 +114,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
114
114
|
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
|
|
115
115
|
* [`snaptrade.experimentalEndpoints.listSubscriptions`](#snaptradeexperimentalendpointslistsubscriptions)
|
|
116
116
|
* [`snaptrade.experimentalEndpoints.placeSimpleOrder`](#snaptradeexperimentalendpointsplacesimpleorder)
|
|
117
|
+
* [`snaptrade.management.getStats`](#snaptrademanagementgetstats)
|
|
117
118
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
118
119
|
* [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
|
|
119
120
|
* [`snaptrade.referenceData.getSymbols`](#snaptradereferencedatagetsymbols)
|
|
@@ -2419,6 +2420,51 @@ extended uses existing single-leg equity/option brokerage support and requires e
|
|
|
2419
2420
|
---
|
|
2420
2421
|
|
|
2421
2422
|
|
|
2423
|
+
### `snaptrade.management.getStats`<a id="snaptrademanagementgetstats"></a>
|
|
2424
|
+
|
|
2425
|
+
Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
2426
|
+
|
|
2427
|
+
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2431
|
+
|
|
2432
|
+
##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
|
|
2433
|
+
|
|
2434
|
+
```typescript
|
|
2435
|
+
const getStatsResponse = await commercialApiKeyClient.management.getStats({
|
|
2436
|
+
currency: "USD",
|
|
2437
|
+
});
|
|
2438
|
+
```
|
|
2439
|
+
|
|
2440
|
+
##### Personal API Key Auth<a id="personal-api-key-auth"></a>
|
|
2441
|
+
|
|
2442
|
+
```typescript
|
|
2443
|
+
const getStatsResponse = await personalApiKeyClient.management.getStats({
|
|
2444
|
+
currency: "USD",
|
|
2445
|
+
});
|
|
2446
|
+
```
|
|
2447
|
+
|
|
2448
|
+
|
|
2449
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2450
|
+
|
|
2451
|
+
##### currency: `string`<a id="currency-string"></a>
|
|
2452
|
+
|
|
2453
|
+
ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
2454
|
+
|
|
2455
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
2456
|
+
|
|
2457
|
+
[PartnerStats](./models/partner-stats.ts)
|
|
2458
|
+
|
|
2459
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2460
|
+
|
|
2461
|
+
`/snapTrade/stats` `GET`
|
|
2462
|
+
|
|
2463
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2464
|
+
|
|
2465
|
+
---
|
|
2466
|
+
|
|
2467
|
+
|
|
2422
2468
|
### `snaptrade.referenceData.getPartnerInfo`<a id="snaptradereferencedatagetpartnerinfo"></a>
|
|
2423
2469
|
|
|
2424
2470
|
Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|