snaptrade 3.0.52 → 3.0.54
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.
- checksums.yaml +4 -4
- data/README.md +26 -16
- data/lib/snaptrade/api/account_information_api.rb +6 -6
- data/lib/snaptrade/api/experimental_endpoints_api.rb +14 -10
- data/lib/snaptrade/api/trading_api.rb +4 -4
- data/lib/snaptrade/models/account_order.rb +8 -9
- data/lib/snaptrade/models/account_position.rb +1 -1
- data/lib/snaptrade/models/cash_instrument.rb +1 -1
- data/lib/snaptrade/models/instrument.rb +2 -0
- data/lib/snaptrade/models/manual_trade_form.rb +1 -1
- data/lib/snaptrade/models/manual_trade_form_with_options.rb +1 -1
- data/lib/snaptrade/models/preferred_stock_instrument.rb +311 -0
- data/lib/snaptrade/models/preferred_stock_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/priced_in_instrument.rb +53 -0
- data/lib/snaptrade/models/simple_trade_form.rb +2 -2
- data/lib/snaptrade/models/simple_trade_instrument.rb +1 -1
- data/lib/snaptrade/models/{manual_trade_form_notional_value.rb → trading_place_simple_order409_response.rb} +32 -12
- data/lib/snaptrade/models/underlying_cfd_instrument.rb +2 -0
- data/lib/snaptrade/models/underlying_option_instrument.rb +2 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +4 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/api/experimental_endpoints_api_spec.rb +1 -1
- data/spec/models/account_order_spec.rb +1 -1
- data/spec/models/{manual_trade_form_notional_value_spec.rb → preferred_stock_instrument_kind_spec.rb} +6 -6
- data/spec/models/preferred_stock_instrument_spec.rb +71 -0
- data/spec/models/priced_in_instrument_spec.rb +38 -0
- data/spec/models/trading_place_simple_order409_response_spec.rb +41 -0
- metadata +291 -282
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b3a3742502a8df2558260e29af1647b33e0f873f723f13da27eee4a55939982
|
|
4
|
+
data.tar.gz: 7c1790c3f6cd9e61240fee672b8a4fffdd6e7a6b4466b6bae98c3a1a3feae137
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a51be49443ba26b24dba10b86b420b341b93455c1502d592f906f9d270f5cb4b5a7a8f6be4c03293363270701d5eba410e63e3f1ba7a89808a9e95b450df302
|
|
7
|
+
data.tar.gz: aa8b494471ff63f3120547109fec1dfb0ecf61e15e162057eadf202eadce39e3be19769a7418899c7917d05e264a27d16bed36b399dd8d21bb810a3d4d517321
|
data/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://rubygems.org/gems/snaptrade/versions/3.0.54)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -147,7 +147,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
147
147
|
Add to Gemfile:
|
|
148
148
|
|
|
149
149
|
```ruby
|
|
150
|
-
gem 'snaptrade', '~> 3.0.
|
|
150
|
+
gem 'snaptrade', '~> 3.0.54'
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -403,11 +403,11 @@ p result
|
|
|
403
403
|
|
|
404
404
|
Returns a list of all positions in the specified account.
|
|
405
405
|
|
|
406
|
-
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`.
|
|
406
|
+
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`.
|
|
407
407
|
|
|
408
408
|
**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.
|
|
409
409
|
|
|
410
|
-
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).
|
|
410
|
+
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).
|
|
411
411
|
|
|
412
412
|
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.
|
|
413
413
|
|
|
@@ -1720,13 +1720,15 @@ p result
|
|
|
1720
1720
|
|
|
1721
1721
|
**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.
|
|
1722
1722
|
|
|
1723
|
-
Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
1723
|
+
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).
|
|
1724
1724
|
|
|
1725
1725
|
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.
|
|
1726
1726
|
|
|
1727
1727
|
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.
|
|
1728
1728
|
|
|
1729
|
-
|
|
1729
|
+
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.
|
|
1730
|
+
|
|
1731
|
+
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.
|
|
1730
1732
|
|
|
1731
1733
|
A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
1732
1734
|
|
|
@@ -1769,6 +1771,8 @@ Order duration, subject to brokerage and execution-path support. gtd requires
|
|
|
1769
1771
|
expiry_date and a non-market single-leg equity/option order. Existing single-leg
|
|
1770
1772
|
option routing does not support ioc. Futures and multi-leg orders do not support
|
|
1771
1773
|
gtd through this endpoint. Webull US futures only support day and gtc.
|
|
1774
|
+
TradeStation futures and futures options accept day, gtc, ioc, and fok, subject
|
|
1775
|
+
to the contract and route's supported combinations.
|
|
1772
1776
|
|
|
1773
1777
|
##### legs: Array<[`SimpleTradeLeg`](./lib/snaptrade/models/simple_trade_leg.rb)><a id="legs-array"></a>
|
|
1774
1778
|
Legs of one brokerage order. Use equity/option legs or future/future_option
|
|
@@ -1799,14 +1803,20 @@ supplied. Single-leg price effects are derived from the action.
|
|
|
1799
1803
|
|
|
1800
1804
|
##### client_order_id: [`String`](./lib/snaptrade/models/string.rb)<a id="client_order_id-stringlibsnaptrademodelsstringrb"></a>
|
|
1801
1805
|
Optional canonical UUID, forwarded where the existing execution path supports it
|
|
1802
|
-
and for tastytrade
|
|
1803
|
-
client-order-ID enablement; when disabled the value is ignored.
|
|
1804
|
-
behavior on duplicates varies
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1806
|
+
and for tastytrade, Webull US, and TradeStation futures-family orders. Requires
|
|
1807
|
+
the existing client-order-ID enablement; when disabled the value is ignored.
|
|
1808
|
+
Brokerage behavior on duplicates varies. SnapTrade does not enforce uniqueness,
|
|
1809
|
+
except for requests authenticated with an OAuth access token, where a
|
|
1810
|
+
client_order_id the user has already used returns 409. Tastytrade uses this as
|
|
1811
|
+
external-identifier for correlation and does not deduplicate submissions. For
|
|
1812
|
+
Webull US futures, SnapTrade converts the supplied UUID (or its generated order
|
|
1813
|
+
UUID) to lowercase 32-character hexadecimal without hyphens. The original
|
|
1814
|
+
supplied UUID remains in SnapTrade's trade audit; the converted value is
|
|
1815
|
+
returned as brokerage_order_id for subsequent order reads. For TradeStation live
|
|
1816
|
+
and SIM, SnapTrade encodes the supplied UUID (or its generated order UUID) as
|
|
1817
|
+
22-character URL-safe base64 without padding and sends it as OrderConfirmID for
|
|
1818
|
+
brokerage duplicate prevention; the response contains TradeStation's separate
|
|
1819
|
+
order ID.
|
|
1810
1820
|
|
|
1811
1821
|
##### expiry_date: `Time`<a id="expiry_date-time"></a>
|
|
1812
1822
|
ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A
|
|
@@ -2384,7 +2394,7 @@ The limit price for `Limit` and `StopLimit` orders.
|
|
|
2384
2394
|
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
2385
2395
|
|
|
2386
2396
|
##### units: [`Float`](./lib/snaptrade/models/float.rb)<a id="units-floatlibsnaptrademodelsfloatrb"></a>
|
|
2387
|
-
##### notional_value: [`
|
|
2397
|
+
##### notional_value: [`NotionalValue`](./lib/snaptrade/models/notional_value.rb)<a id="notional_value-notionalvaluelibsnaptrademodelsnotional_valuerb"></a>
|
|
2388
2398
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
2389
2399
|
|
|
2390
2400
|
[ManualTradeAndImpact](./lib/snaptrade/models/manual_trade_and_impact.rb)
|
|
@@ -2755,7 +2765,7 @@ be a decimal for fractional orders. Must be `null` if `notional_value` is
|
|
|
2755
2765
|
provided. If placing an Option order, this field represents the number of
|
|
2756
2766
|
contracts to buy or sell. (e.g., 1 contract = 100 shares).
|
|
2757
2767
|
|
|
2758
|
-
##### notional_value: [`
|
|
2768
|
+
##### notional_value: [`NotionalValue`](./lib/snaptrade/models/notional_value.rb)<a id="notional_value-notionalvaluelibsnaptrademodelsnotional_valuerb"></a>
|
|
2759
2769
|
##### client_order_id: [`String`](./lib/snaptrade/models/string.rb)<a id="client_order_id-stringlibsnaptrademodelsstringrb"></a>
|
|
2760
2770
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
2761
2771
|
|
|
@@ -536,11 +536,11 @@ module SnapTrade
|
|
|
536
536
|
#
|
|
537
537
|
# Returns a list of all positions in the specified account.
|
|
538
538
|
#
|
|
539
|
-
# 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`.
|
|
539
|
+
# 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`.
|
|
540
540
|
#
|
|
541
541
|
# **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.
|
|
542
542
|
#
|
|
543
|
-
# 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).
|
|
543
|
+
# 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).
|
|
544
544
|
#
|
|
545
545
|
# 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.
|
|
546
546
|
#
|
|
@@ -557,11 +557,11 @@ module SnapTrade
|
|
|
557
557
|
#
|
|
558
558
|
# Returns a list of all positions in the specified account.
|
|
559
559
|
#
|
|
560
|
-
# 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`.
|
|
560
|
+
# 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`.
|
|
561
561
|
#
|
|
562
562
|
# **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.
|
|
563
563
|
#
|
|
564
|
-
# 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).
|
|
564
|
+
# 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).
|
|
565
565
|
#
|
|
566
566
|
# 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.
|
|
567
567
|
#
|
|
@@ -574,7 +574,7 @@ module SnapTrade
|
|
|
574
574
|
end
|
|
575
575
|
|
|
576
576
|
# List all account positions
|
|
577
|
-
# Returns a list of all positions in the specified account. 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`. **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. 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). 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.
|
|
577
|
+
# Returns a list of all positions in the specified account. 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`. **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. 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). 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.
|
|
578
578
|
# @param user_id [String]
|
|
579
579
|
# @param user_secret [String]
|
|
580
580
|
# @param account_id [String]
|
|
@@ -586,7 +586,7 @@ module SnapTrade
|
|
|
586
586
|
end
|
|
587
587
|
|
|
588
588
|
# List all account positions
|
|
589
|
-
# Returns a list of all positions in the specified account. 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`. **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. 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). 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.
|
|
589
|
+
# Returns a list of all positions in the specified account. 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`. **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. 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). 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.
|
|
590
590
|
# @param user_id [String]
|
|
591
591
|
# @param user_secret [String]
|
|
592
592
|
# @param account_id [String]
|
|
@@ -845,18 +845,20 @@ module SnapTrade
|
|
|
845
845
|
#
|
|
846
846
|
# **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.
|
|
847
847
|
#
|
|
848
|
-
# Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
848
|
+
# 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).
|
|
849
849
|
#
|
|
850
850
|
# 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.
|
|
851
851
|
#
|
|
852
852
|
# 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.
|
|
853
853
|
#
|
|
854
|
-
#
|
|
854
|
+
# 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.
|
|
855
|
+
#
|
|
856
|
+
# 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.
|
|
855
857
|
#
|
|
856
858
|
# A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
857
859
|
#
|
|
858
860
|
# @param order_type [SimpleTradeFormOrderType]
|
|
859
|
-
# @param time_in_force [SimpleTradeFormTimeInForce] 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.
|
|
861
|
+
# @param time_in_force [SimpleTradeFormTimeInForce] 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.
|
|
860
862
|
# @param legs [Array<SimpleTradeLeg>] Legs of one brokerage order. Use equity/option legs or future/future_option legs, without mixing the two families. Brokerage strategy and leg-count limits apply.
|
|
861
863
|
# @param account_id [String] The ID of the account to execute the trade on.
|
|
862
864
|
# @param user_id [String]
|
|
@@ -864,7 +866,7 @@ module SnapTrade
|
|
|
864
866
|
# @param limit_price [Float] Required for limit and stop_limit orders, except that multi-leg price_effect even implies zero. Must be omitted or null for market and stop orders. For multi-leg orders this is the net strategy price. Negative prices are accepted only for futures-family orders, subject to brokerage support.
|
|
865
867
|
# @param stop_price [Float] Required for stop and stop_limit orders. Must be omitted or null for market and limit orders. Must be positive for equity/option orders; futures-family trigger prices are subject to brokerage support.
|
|
866
868
|
# @param price_effect [SimpleTradeFormPriceEffect] Only applicable to multi-leg limit and stop_limit orders. Requirements and supported values depend on the brokerage; tastytrade requires credit or debit. even implies a zero limit_price, which may be omitted and must be zero if supplied. Single-leg price effects are derived from the action.
|
|
867
|
-
# @param client_order_id [String] Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade
|
|
869
|
+
# @param client_order_id [String] 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.
|
|
868
870
|
# @param expiry_date [Time] ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A missing timezone is treated as UTC. Supported only through existing single-leg Public and Sandbox execution paths.
|
|
869
871
|
# @param notional_value [Float] Positive order value, supported only for a single-equity market order on eligible brokerages and partners. Mutually exclusive with leg units. Omit or set units to null when supplied.
|
|
870
872
|
# @param trading_session [SimpleTradeFormTradingSession] extended uses existing single-leg equity/option brokerage support and requires extended-hours enablement. Futures and multi-leg orders only accept regular.
|
|
@@ -891,18 +893,20 @@ module SnapTrade
|
|
|
891
893
|
#
|
|
892
894
|
# **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.
|
|
893
895
|
#
|
|
894
|
-
# Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
896
|
+
# 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).
|
|
895
897
|
#
|
|
896
898
|
# 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.
|
|
897
899
|
#
|
|
898
900
|
# 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.
|
|
899
901
|
#
|
|
900
|
-
#
|
|
902
|
+
# 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.
|
|
903
|
+
#
|
|
904
|
+
# 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.
|
|
901
905
|
#
|
|
902
906
|
# A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
903
907
|
#
|
|
904
908
|
# @param order_type [SimpleTradeFormOrderType]
|
|
905
|
-
# @param time_in_force [SimpleTradeFormTimeInForce] 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.
|
|
909
|
+
# @param time_in_force [SimpleTradeFormTimeInForce] 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.
|
|
906
910
|
# @param legs [Array<SimpleTradeLeg>] Legs of one brokerage order. Use equity/option legs or future/future_option legs, without mixing the two families. Brokerage strategy and leg-count limits apply.
|
|
907
911
|
# @param account_id [String] The ID of the account to execute the trade on.
|
|
908
912
|
# @param user_id [String]
|
|
@@ -910,7 +914,7 @@ module SnapTrade
|
|
|
910
914
|
# @param limit_price [Float] Required for limit and stop_limit orders, except that multi-leg price_effect even implies zero. Must be omitted or null for market and stop orders. For multi-leg orders this is the net strategy price. Negative prices are accepted only for futures-family orders, subject to brokerage support.
|
|
911
915
|
# @param stop_price [Float] Required for stop and stop_limit orders. Must be omitted or null for market and limit orders. Must be positive for equity/option orders; futures-family trigger prices are subject to brokerage support.
|
|
912
916
|
# @param price_effect [SimpleTradeFormPriceEffect] Only applicable to multi-leg limit and stop_limit orders. Requirements and supported values depend on the brokerage; tastytrade requires credit or debit. even implies a zero limit_price, which may be omitted and must be zero if supplied. Single-leg price effects are derived from the action.
|
|
913
|
-
# @param client_order_id [String] Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade
|
|
917
|
+
# @param client_order_id [String] 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.
|
|
914
918
|
# @param expiry_date [Time] ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A missing timezone is treated as UTC. Supported only through existing single-leg Public and Sandbox execution paths.
|
|
915
919
|
# @param notional_value [Float] Positive order value, supported only for a single-equity market order on eligible brokerages and partners. Mutually exclusive with leg units. Omit or set units to null when supplied.
|
|
916
920
|
# @param trading_session [SimpleTradeFormTradingSession] extended uses existing single-leg equity/option brokerage support and requires extended-hours enablement. Futures and multi-leg orders only accept regular.
|
|
@@ -933,7 +937,7 @@ module SnapTrade
|
|
|
933
937
|
end
|
|
934
938
|
|
|
935
939
|
# Place a simple order (beta)
|
|
936
|
-
# **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. Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
940
|
+
# **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. 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). 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. 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. 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. 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. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
937
941
|
# @param account_id [String] The ID of the account to execute the trade on.
|
|
938
942
|
# @param user_id [String]
|
|
939
943
|
# @param user_secret [String]
|
|
@@ -946,7 +950,7 @@ module SnapTrade
|
|
|
946
950
|
end
|
|
947
951
|
|
|
948
952
|
# Place a simple order (beta)
|
|
949
|
-
# **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. Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade and
|
|
953
|
+
# **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. 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). 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. 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. 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. 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. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
950
954
|
# @param account_id [String] The ID of the account to execute the trade on.
|
|
951
955
|
# @param user_id [String]
|
|
952
956
|
# @param user_secret [String]
|
|
@@ -412,7 +412,7 @@ module SnapTrade
|
|
|
412
412
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
|
413
413
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
414
414
|
# @param units [Float]
|
|
415
|
-
# @param notional_value [
|
|
415
|
+
# @param notional_value [NotionalValue]
|
|
416
416
|
# @param body [ManualTradeForm]
|
|
417
417
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
418
418
|
def get_order_impact(account_id:, action:, universal_symbol_id:, order_type:, time_in_force:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, notional_value: SENTINEL, extra: {})
|
|
@@ -445,7 +445,7 @@ module SnapTrade
|
|
|
445
445
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
|
446
446
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
447
447
|
# @param units [Float]
|
|
448
|
-
# @param notional_value [
|
|
448
|
+
# @param notional_value [NotionalValue]
|
|
449
449
|
# @param body [ManualTradeForm]
|
|
450
450
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
451
451
|
def get_order_impact_with_http_info(account_id:, action:, universal_symbol_id:, order_type:, time_in_force:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, notional_value: SENTINEL, extra: {})
|
|
@@ -1150,7 +1150,7 @@ module SnapTrade
|
|
|
1150
1150
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
|
1151
1151
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
1152
1152
|
# @param units [Float] For Equity orders, this represents the number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided. If placing an Option order, this field represents the number of contracts to buy or sell. (e.g., 1 contract = 100 shares).
|
|
1153
|
-
# @param notional_value [
|
|
1153
|
+
# @param notional_value [NotionalValue]
|
|
1154
1154
|
# @param client_order_id [String]
|
|
1155
1155
|
# @param body [ManualTradeFormWithOptions]
|
|
1156
1156
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -1195,7 +1195,7 @@ module SnapTrade
|
|
|
1195
1195
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
|
1196
1196
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
1197
1197
|
# @param units [Float] For Equity orders, this represents the number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided. If placing an Option order, this field represents the number of contracts to buy or sell. (e.g., 1 contract = 100 shares).
|
|
1198
|
-
# @param notional_value [
|
|
1198
|
+
# @param notional_value [NotionalValue]
|
|
1199
1199
|
# @param client_order_id [String]
|
|
1200
1200
|
# @param body [ManualTradeFormWithOptions]
|
|
1201
1201
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -27,8 +27,7 @@ module SnapTrade
|
|
|
27
27
|
# When the order expires, for orders with a `time_in_force` of `GTD`.
|
|
28
28
|
attr_accessor :expiry_date
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
attr_accessor :price_currency
|
|
30
|
+
attr_accessor :priced_in
|
|
32
31
|
|
|
33
32
|
# Direction of the net order price. CREDIT means cash is received, DEBIT means cash is paid, EVEN means the net price is zero, and UNKNOWN means the direction could not be determined.
|
|
34
33
|
attr_accessor :price_effect
|
|
@@ -70,7 +69,7 @@ module SnapTrade
|
|
|
70
69
|
:'order_type' => :'order_type',
|
|
71
70
|
:'time_in_force' => :'time_in_force',
|
|
72
71
|
:'expiry_date' => :'expiry_date',
|
|
73
|
-
:'
|
|
72
|
+
:'priced_in' => :'priced_in',
|
|
74
73
|
:'price_effect' => :'price_effect',
|
|
75
74
|
:'total_quantity' => :'total_quantity',
|
|
76
75
|
:'filled_quantity' => :'filled_quantity',
|
|
@@ -98,7 +97,7 @@ module SnapTrade
|
|
|
98
97
|
:'order_type' => :'OrderTypeConfiguration',
|
|
99
98
|
:'time_in_force' => :'AccountOrderTimeInForce',
|
|
100
99
|
:'expiry_date' => :'Time',
|
|
101
|
-
:'
|
|
100
|
+
:'priced_in' => :'PricedInInstrument',
|
|
102
101
|
:'price_effect' => :'PriceEffect',
|
|
103
102
|
:'total_quantity' => :'Float',
|
|
104
103
|
:'filled_quantity' => :'Float',
|
|
@@ -117,7 +116,7 @@ module SnapTrade
|
|
|
117
116
|
def self.openapi_nullable
|
|
118
117
|
Set.new([
|
|
119
118
|
:'expiry_date',
|
|
120
|
-
:'
|
|
119
|
+
:'priced_in',
|
|
121
120
|
:'total_quantity',
|
|
122
121
|
:'filled_quantity',
|
|
123
122
|
:'canceled_quantity',
|
|
@@ -165,8 +164,8 @@ module SnapTrade
|
|
|
165
164
|
self.expiry_date = attributes[:'expiry_date']
|
|
166
165
|
end
|
|
167
166
|
|
|
168
|
-
if attributes.key?(:'
|
|
169
|
-
self.
|
|
167
|
+
if attributes.key?(:'priced_in')
|
|
168
|
+
self.priced_in = attributes[:'priced_in']
|
|
170
169
|
end
|
|
171
170
|
|
|
172
171
|
if attributes.key?(:'price_effect')
|
|
@@ -288,7 +287,7 @@ module SnapTrade
|
|
|
288
287
|
order_type == o.order_type &&
|
|
289
288
|
time_in_force == o.time_in_force &&
|
|
290
289
|
expiry_date == o.expiry_date &&
|
|
291
|
-
|
|
290
|
+
priced_in == o.priced_in &&
|
|
292
291
|
price_effect == o.price_effect &&
|
|
293
292
|
total_quantity == o.total_quantity &&
|
|
294
293
|
filled_quantity == o.filled_quantity &&
|
|
@@ -311,7 +310,7 @@ module SnapTrade
|
|
|
311
310
|
# Calculates hash code according to all attributes.
|
|
312
311
|
# @return [Integer] Hash code
|
|
313
312
|
def hash
|
|
314
|
-
[brokerage_order_id, status, order_type, time_in_force, expiry_date,
|
|
313
|
+
[brokerage_order_id, status, order_type, time_in_force, expiry_date, priced_in, price_effect, total_quantity, filled_quantity, canceled_quantity, open_quantity, execution_price, time_placed, time_updated, time_executed, group, legs].hash
|
|
315
314
|
end
|
|
316
315
|
|
|
317
316
|
# Builds the object from hash
|
|
@@ -30,7 +30,7 @@ module SnapTrade
|
|
|
30
30
|
# Present for mutual fund positions and for other instrument kinds when true. A true value means the position is also counted in cash balance or buying power.
|
|
31
31
|
attr_accessor :cash_equivalent
|
|
32
32
|
|
|
33
|
-
# List of tax lots for the given position. Disabled by default; enable via the Customer Dashboard Add-ons page. When enabled, this field is included for security positions (`stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`). For these positions, an empty list means no tax lot data is available. Availability varies by brokerage and position. This field is omitted for options, futures, future options, CFDs, tokenized assets, and cash, or when the feature is disabled.
|
|
33
|
+
# List of tax lots for the given position. Disabled by default; enable via the Customer Dashboard Add-ons page. When enabled, this field is included for security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`). For these positions, an empty list means no tax lot data is available. Availability varies by brokerage and position. This field is omitted for options, futures, future options, CFDs, tokenized assets, and cash, or when the feature is disabled.
|
|
34
34
|
attr_accessor :tax_lots
|
|
35
35
|
|
|
36
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
# A currency
|
|
14
|
+
# A fiat currency, identified by its ISO-4217 code.
|
|
15
15
|
class CashInstrument
|
|
16
16
|
# Type of security instrument.
|
|
17
17
|
attr_accessor :kind
|
|
@@ -28,6 +28,7 @@ module SnapTrade
|
|
|
28
28
|
:'MutualFundInstrument',
|
|
29
29
|
:'OptionInstrument',
|
|
30
30
|
:'OtherInstrument',
|
|
31
|
+
:'PreferredStockInstrument',
|
|
31
32
|
:'StockInstrument',
|
|
32
33
|
:'TokenizedAssetInstrument'
|
|
33
34
|
]
|
|
@@ -53,6 +54,7 @@ module SnapTrade
|
|
|
53
54
|
:'mutualfund' => :'MutualFundInstrument',
|
|
54
55
|
:'option' => :'OptionInstrument',
|
|
55
56
|
:'other' => :'OtherInstrument',
|
|
57
|
+
:'preferred_stock' => :'PreferredStockInstrument',
|
|
56
58
|
:'stock' => :'StockInstrument',
|
|
57
59
|
:'tokenized_asset' => :'TokenizedAssetInstrument'
|
|
58
60
|
}
|