snaptrade-typescript-sdk 12.2.12 → 12.2.13
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 +51 -15
- package/dist/browser.umd.js +1 -1
- package/dist/index.cjs +80 -9
- package/dist/index.d.cts +576 -634
- package/dist/index.d.mts +576 -634
- package/dist/index.d.ts +576 -634
- package/dist/index.mjs +80 -9
- 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.13)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -118,6 +118,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
118
118
|
* [`snaptrade.referenceData.listAllBrokerageAuthorizationType`](#snaptradereferencedatalistallbrokerageauthorizationtype)
|
|
119
119
|
* [`snaptrade.referenceData.listAllBrokerageInstruments`](#snaptradereferencedatalistallbrokerageinstruments)
|
|
120
120
|
* [`snaptrade.referenceData.listAllBrokerages`](#snaptradereferencedatalistallbrokerages)
|
|
121
|
+
* [`snaptrade.referenceData.listInstitutions`](#snaptradereferencedatalistinstitutions)
|
|
121
122
|
* [`snaptrade.referenceData.symbolSearchUserAccount`](#snaptradereferencedatasymbolsearchuseraccount)
|
|
122
123
|
* [`snaptrade.trading.cancelOrder`](#snaptradetradingcancelorder)
|
|
123
124
|
* [`snaptrade.trading.getCryptocurrencyPairQuote`](#snaptradetradinggetcryptocurrencypairquote)
|
|
@@ -820,7 +821,7 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
|
|
|
820
821
|
|
|
821
822
|
### `snaptrade.accountInformation.getUserAccountReturnRates`<a id="snaptradeaccountinformationgetuseraccountreturnrates"></a>
|
|
822
823
|
|
|
823
|
-
Returns a list of rate of return percents for a given account.
|
|
824
|
+
DEPRECATED. Returns a list of rate of return percents for a given account.
|
|
824
825
|
|
|
825
826
|
|
|
826
827
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1698,7 +1699,7 @@ The client identifies the user in this mode. Do not pass `userId` `userSecret` t
|
|
|
1698
1699
|
|
|
1699
1700
|
### `snaptrade.connections.returnRates`<a id="snaptradeconnectionsreturnrates"></a>
|
|
1700
1701
|
|
|
1701
|
-
Returns a list of rate of return percents for a given connection.
|
|
1702
|
+
DEPRECATED. Returns a list of rate of return percents for a given connection.
|
|
1702
1703
|
|
|
1703
1704
|
|
|
1704
1705
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -2434,6 +2435,33 @@ const listAllBrokeragesResponse =
|
|
|
2434
2435
|
---
|
|
2435
2436
|
|
|
2436
2437
|
|
|
2438
|
+
### `snaptrade.referenceData.listInstitutions`<a id="snaptradereferencedatalistinstitutions"></a>
|
|
2439
|
+
|
|
2440
|
+
Returns the public catalog of institutions SnapTrade supports and what each one supports. The response is the same for every caller and needs no authentication. To list the brokerages a specific Client ID can connect to right now, use `GET /brokerages` instead.
|
|
2441
|
+
|
|
2442
|
+
A `null` field means the information is not documented yet, never that the institution lacks it. New fields and new enum values may be added over time, so ignore any you don't recognize.
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2446
|
+
|
|
2447
|
+
```typescript
|
|
2448
|
+
const listInstitutionsResponse =
|
|
2449
|
+
await snaptrade.referenceData.listInstitutions();
|
|
2450
|
+
```
|
|
2451
|
+
|
|
2452
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
2453
|
+
|
|
2454
|
+
[Institution](./models/institution.ts)
|
|
2455
|
+
|
|
2456
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2457
|
+
|
|
2458
|
+
`/institutions` `GET`
|
|
2459
|
+
|
|
2460
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2461
|
+
|
|
2462
|
+
---
|
|
2463
|
+
|
|
2464
|
+
|
|
2437
2465
|
### `snaptrade.referenceData.symbolSearchUserAccount`<a id="snaptradereferencedatasymbolsearchuseraccount"></a>
|
|
2438
2466
|
|
|
2439
2467
|
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.
|
|
@@ -2698,7 +2726,7 @@ The limit price. Required if the order type is `LIMIT`, `STOP_LOSS_LIMIT`, unles
|
|
|
2698
2726
|
|
|
2699
2727
|
The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIMIT`.
|
|
2700
2728
|
|
|
2701
|
-
##### price_effect
|
|
2729
|
+
##### price_effect:<a id="price_effect"></a>
|
|
2702
2730
|
|
|
2703
2731
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
2704
2732
|
|
|
@@ -2794,9 +2822,11 @@ The limit price for `Limit` and `StopLimit` orders.
|
|
|
2794
2822
|
|
|
2795
2823
|
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
2796
2824
|
|
|
2797
|
-
##### units:
|
|
2825
|
+
##### units: `number`<a id="units-number"></a>
|
|
2798
2826
|
|
|
2799
|
-
|
|
2827
|
+
Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
|
2828
|
+
|
|
2829
|
+
##### notional_value: [`NotionalValueNullable`](./models/notional-value-nullable.ts)<a id="notional_value-notionalvaluenullablemodelsnotional-value-nullablets"></a>
|
|
2800
2830
|
|
|
2801
2831
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
2802
2832
|
|
|
@@ -3051,7 +3081,9 @@ The orders that make up the complex order. Required counts and roles per type: -
|
|
|
3051
3081
|
|
|
3052
3082
|
The ID of the account to execute the trade on.
|
|
3053
3083
|
|
|
3054
|
-
##### client_order_id:
|
|
3084
|
+
##### client_order_id: `string`<a id="client_order_id-string"></a>
|
|
3085
|
+
|
|
3086
|
+
Optional caller-supplied identifier passed through to the brokerage for idempotent order placement. Must be a canonical 36-character UUID. Idempotency enforcement is brokerage-specific - SnapTrade forwards this value to the broker but does not enforce uniqueness server-side. Refer to per-brokerage documentation for behavior on duplicate submission.
|
|
3055
3087
|
|
|
3056
3088
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
3057
3089
|
|
|
@@ -3260,9 +3292,9 @@ The type of order to place. - For `Limit` and `StopLimit` orders, the `price` f
|
|
|
3260
3292
|
|
|
3261
3293
|
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.
|
|
3262
3294
|
|
|
3263
|
-
##### universal_symbol_id:
|
|
3295
|
+
##### universal_symbol_id: `string`<a id="universal_symbol_id-string"></a>
|
|
3264
3296
|
|
|
3265
|
-
|
|
3297
|
+
Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
3266
3298
|
|
|
3267
3299
|
##### symbol: `string`<a id="symbol-string"></a>
|
|
3268
3300
|
|
|
@@ -3284,13 +3316,15 @@ The limit price for `Limit` and `StopLimit` orders.
|
|
|
3284
3316
|
|
|
3285
3317
|
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
3286
3318
|
|
|
3287
|
-
##### units:
|
|
3319
|
+
##### units: `number`<a id="units-number"></a>
|
|
3320
|
+
|
|
3321
|
+
Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
|
3288
3322
|
|
|
3289
|
-
|
|
3323
|
+
##### notional_value: [`NotionalValueNullable`](./models/notional-value-nullable.ts)<a id="notional_value-notionalvaluenullablemodelsnotional-value-nullablets"></a>
|
|
3290
3324
|
|
|
3291
|
-
#####
|
|
3325
|
+
##### client_order_id: `string`<a id="client_order_id-string"></a>
|
|
3292
3326
|
|
|
3293
|
-
|
|
3327
|
+
Optional caller-supplied identifier passed through to the brokerage for idempotent order placement. Must be a canonical 36-character UUID. Idempotency enforcement is brokerage-specific - SnapTrade forwards this value to the broker but does not enforce uniqueness server-side. Refer to per-brokerage documentation for behavior on duplicate submission.
|
|
3294
3328
|
|
|
3295
3329
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
3296
3330
|
|
|
@@ -3393,7 +3427,7 @@ The limit price. Required if the order type is `LIMIT`, `STOP_LOSS_LIMIT`, unles
|
|
|
3393
3427
|
|
|
3394
3428
|
The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIMIT`.
|
|
3395
3429
|
|
|
3396
|
-
##### price_effect
|
|
3430
|
+
##### price_effect:<a id="price_effect"></a>
|
|
3397
3431
|
|
|
3398
3432
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
3399
3433
|
|
|
@@ -3666,7 +3700,9 @@ The security\\\'s trading ticker symbol. Use the OCC symbol to replace an option
|
|
|
3666
3700
|
|
|
3667
3701
|
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
3668
3702
|
|
|
3669
|
-
##### units:
|
|
3703
|
+
##### units: `number`<a id="units-number"></a>
|
|
3704
|
+
|
|
3705
|
+
Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
|
3670
3706
|
|
|
3671
3707
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
3672
3708
|
|