snaptrade-typescript-sdk 13.2.0 → 13.2.2
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 +9 -7
- package/dist/browser.umd.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +134 -17
- package/dist/index.d.mts +134 -17
- package/dist/index.d.ts +134 -17
- package/dist/index.mjs +9 -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/13.2.2)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -632,11 +632,11 @@ The client identifies the user in this mode. Do not pass `userId` `userSecret` t
|
|
|
632
632
|
|
|
633
633
|
Returns a list of all positions in the specified account.
|
|
634
634
|
|
|
635
|
-
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
635
|
+
The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
636
636
|
|
|
637
637
|
**Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
638
638
|
|
|
639
|
-
Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages).
|
|
639
|
+
Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages).
|
|
640
640
|
|
|
641
641
|
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.
|
|
642
642
|
|
|
@@ -2718,13 +2718,15 @@ const listSubscriptionsResponse =
|
|
|
2718
2718
|
|
|
2719
2719
|
**Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase.
|
|
2720
2720
|
|
|
2721
|
-
Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
2721
|
+
Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade, Webull US, and TradeStation (live and SIM); future options are supported on tastytrade and TradeStation (live and SIM). Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages).
|
|
2722
2722
|
|
|
2723
2723
|
An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders.
|
|
2724
2724
|
|
|
2725
2725
|
Webull US supports single-leg futures orders with buy or sell actions and positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day or gtc duration. Futures options, multi-leg futures, trailing stops, and Webull Canada futures trading are not supported. Webull determines contract availability, margin requirements, and valid price increments.
|
|
2726
2726
|
|
|
2727
|
-
|
|
2727
|
+
TradeStation and TradeStation SIM support single-leg futures and futures-option orders in Futures accounts, with positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day, gtc, ioc, or fok duration, subject to the contract and route's supported combinations. Futures use buy/sell; futures options use the open/close option actions. Multi-leg futures-family strategies are not supported. Prices are forwarded without rounding; TradeStation determines contract availability, permissions, margin requirements, and valid price increments.
|
|
2728
|
+
|
|
2729
|
+
All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or brokerage-native futures symbols. For tastytrade, use the exact BrokerageInstrument ticker, including any spaces. For Webull US, use a specific unprefixed futures contract symbol such as ESZ6; slash-prefixed aliases, continuous/root-only symbols, and whitespace are not accepted. For TradeStation, use a specific two-digit-year contract such as ESZ26 or @ESZ26, or a futures-option symbol such as `ESZ26 C6000`, preserving the space and any session alias. The optional @ prefix is supported for dated futures contracts and is forwarded unchanged. Slash-prefixed aliases and root-only continuous symbols such as @ES are not accepted. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
|
|
2728
2730
|
|
|
2729
2731
|
A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
2730
2732
|
|
|
@@ -2834,7 +2836,7 @@ The client identifies the user in this mode. Do not pass `userId` `userSecret` t
|
|
|
2834
2836
|
|
|
2835
2837
|
##### time_in_force: `string`<a id="time_in_force-string"></a>
|
|
2836
2838
|
|
|
2837
|
-
Order duration, subject to brokerage and execution-path support. gtd requires expiry_date and a non-market single-leg equity/option order. Existing single-leg option routing does not support ioc. Futures and multi-leg orders do not support gtd through this endpoint. Webull US futures only support day and gtc.
|
|
2839
|
+
Order duration, subject to brokerage and execution-path support. gtd requires expiry_date and a non-market single-leg equity/option order. Existing single-leg option routing does not support ioc. Futures and multi-leg orders do not support gtd through this endpoint. Webull US futures only support day and gtc. TradeStation futures and futures options accept day, gtc, ioc, and fok, subject to the contract and route\\\'s supported combinations.
|
|
2838
2840
|
|
|
2839
2841
|
##### legs: [`SimpleTradeLeg`](./models/simple-trade-leg.ts)[]<a id="legs-simpletradelegmodelssimple-trade-legts"></a>
|
|
2840
2842
|
|
|
@@ -2858,7 +2860,7 @@ Only applicable to multi-leg limit and stop_limit orders. Requirements and suppo
|
|
|
2858
2860
|
|
|
2859
2861
|
##### client_order_id: [`string`](./models/model-string.ts)<a id="client_order_id-stringmodelsmodel-stringts"></a>
|
|
2860
2862
|
|
|
2861
|
-
Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade
|
|
2863
|
+
Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade, Webull US, and TradeStation futures-family orders. Requires the existing client-order-ID enablement; when disabled the value is ignored. Brokerage behavior on duplicates varies. SnapTrade does not enforce uniqueness, except for requests authenticated with an OAuth access token, where a client_order_id the user has already used returns 409. Tastytrade uses this as external-identifier for correlation and does not deduplicate submissions. For Webull US futures, SnapTrade converts the supplied UUID (or its generated order UUID) to lowercase 32-character hexadecimal without hyphens. The original supplied UUID remains in SnapTrade\\\'s trade audit; the converted value is returned as brokerage_order_id for subsequent order reads. For TradeStation live and SIM, SnapTrade encodes the supplied UUID (or its generated order UUID) as 22-character URL-safe base64 without padding and sends it as OrderConfirmID for brokerage duplicate prevention; the response contains TradeStation\\\'s separate order ID.
|
|
2862
2864
|
|
|
2863
2865
|
##### expiry_date: `string`<a id="expiry_date-string"></a>
|
|
2864
2866
|
|