snaptrade-typescript-sdk 13.1.4 → 13.1.6
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 +55 -2
- package/dist/browser.umd.js +1 -1
- package/dist/index.cjs +222 -104
- package/dist/index.d.cts +165 -13
- package/dist/index.d.mts +165 -13
- package/dist/index.d.ts +165 -13
- package/dist/index.mjs +222 -104
- package/package.json +2 -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.6)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -116,6 +116,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
116
116
|
* [`snaptrade.experimentalEndpoints.listSubscriptions`](#snaptradeexperimentalendpointslistsubscriptions)
|
|
117
117
|
* [`snaptrade.experimentalEndpoints.placeSimpleOrder`](#snaptradeexperimentalendpointsplacesimpleorder)
|
|
118
118
|
* [`snaptrade.management.getStats`](#snaptrademanagementgetstats)
|
|
119
|
+
* [`snaptrade.management.getStatsLegacy`](#snaptrademanagementgetstatslegacy)
|
|
119
120
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
120
121
|
* [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
|
|
121
122
|
* [`snaptrade.referenceData.getSymbols`](#snaptradereferencedatagetsymbols)
|
|
@@ -2486,9 +2487,11 @@ extended uses existing single-leg equity/option brokerage support and requires e
|
|
|
2486
2487
|
|
|
2487
2488
|
### `snaptrade.management.getStats`<a id="snaptrademanagementgetstats"></a>
|
|
2488
2489
|
|
|
2490
|
+
**Beta.** This endpoint and its response schema may change.
|
|
2491
|
+
|
|
2489
2492
|
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.
|
|
2490
2493
|
|
|
2491
|
-
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
2494
|
+
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
2492
2495
|
|
|
2493
2496
|
|
|
2494
2497
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -2510,6 +2513,56 @@ const getStatsResponse = await personalApiKeyClient.management.getStats({
|
|
|
2510
2513
|
```
|
|
2511
2514
|
|
|
2512
2515
|
|
|
2516
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2517
|
+
|
|
2518
|
+
##### currency: `string`<a id="currency-string"></a>
|
|
2519
|
+
|
|
2520
|
+
ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
2521
|
+
|
|
2522
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
2523
|
+
|
|
2524
|
+
[ConnectedAssetPartnerStats](./models/connected-asset-partner-stats.ts)
|
|
2525
|
+
|
|
2526
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2527
|
+
|
|
2528
|
+
`/management/stats` `GET`
|
|
2529
|
+
|
|
2530
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2531
|
+
|
|
2532
|
+
---
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
### `snaptrade.management.getStatsLegacy`<a id="snaptrademanagementgetstatslegacy"></a>
|
|
2536
|
+

|
|
2537
|
+
|
|
2538
|
+
**Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names.
|
|
2539
|
+
|
|
2540
|
+
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.
|
|
2541
|
+
|
|
2542
|
+
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.
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2546
|
+
|
|
2547
|
+
##### Commercial API Key Auth<a id="commercial-api-key-auth"></a>
|
|
2548
|
+
|
|
2549
|
+
```typescript
|
|
2550
|
+
const getStatsLegacyResponse =
|
|
2551
|
+
await commercialApiKeyClient.management.getStatsLegacy({
|
|
2552
|
+
currency: "USD",
|
|
2553
|
+
});
|
|
2554
|
+
```
|
|
2555
|
+
|
|
2556
|
+
##### Personal API Key Auth<a id="personal-api-key-auth"></a>
|
|
2557
|
+
|
|
2558
|
+
```typescript
|
|
2559
|
+
const getStatsLegacyResponse =
|
|
2560
|
+
await personalApiKeyClient.management.getStatsLegacy({
|
|
2561
|
+
currency: "USD",
|
|
2562
|
+
});
|
|
2563
|
+
```
|
|
2564
|
+
|
|
2565
|
+
|
|
2513
2566
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
2514
2567
|
|
|
2515
2568
|
##### currency: `string`<a id="currency-string"></a>
|