snaptrade 3.0.52 → 3.0.53

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa26d4dfc11b1ca2582ee475bf340a2a2eb021cf67c44d207128f87c0271d7aa
4
- data.tar.gz: 3728c7a8695c971549b6851cc32c58d4678892dad2bef481bd46826a99af33e8
3
+ metadata.gz: e741d2cc13ed54e51eae39424c976ccaae36998294c51166e6793b174cf54b3a
4
+ data.tar.gz: b6ac69e291f5c11a5513f551d801141dd14b40a4a5cb92bd94b76bf95215bc65
5
5
  SHA512:
6
- metadata.gz: '03948a2f6bc2ee5d27f47c23d89157f5d5d96d8a18ad37edba31d209d4fb92332b7dec7185797b396de608527836091ee5d30a7c7066aa1f96bc506689ba6266'
7
- data.tar.gz: 3172cba1869adfb648c091a53cb904cb9660d57b944c4cfdb1420a52761650de16e50cc36eeb916e028d39ce6c15add49d76e3bf9d2b73ba791a3b42f416b4d7
6
+ metadata.gz: 463b8172debd276275ec4e23a7d156bb760fb1e90815e08f2578e8d50f315d356fd8911d94fd32babd01279a2c497780beb6d80e0e9ffe0adcdde90e6a91d9b0
7
+ data.tar.gz: 9528ef178227e6eba7062e2d5d382dea4d38f22118e34aae18204fe0e867dc1bb82c47754956ab70fae51f6710a0b38669cbe77db6093d3f1fcc7ab2e3af4de1
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
- [![npm](https://img.shields.io/badge/gem-v3.0.52-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.52)
66
+ [![npm](https://img.shields.io/badge/gem-v3.0.53-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.53)
67
67
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](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.52'
150
+ gem 'snaptrade', '~> 3.0.53'
151
151
  ```
152
152
 
153
153
  ## Getting Started<a id="getting-started"></a>
@@ -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 Webull US; future options are supported only on tastytrade. 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).
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
- 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. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
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 and Webull US futures orders. Requires the existing
1803
- client-order-ID enablement; when disabled the value is ignored. Brokerage
1804
- behavior on duplicates varies; SnapTrade does not enforce uniqueness. Tastytrade
1805
- uses this as external-identifier for correlation and does not deduplicate
1806
- submissions. For Webull US futures, SnapTrade converts the supplied UUID (or its
1807
- generated order UUID) to lowercase 32-character hexadecimal without hyphens. The
1808
- original supplied UUID remains in SnapTrade's trade audit; the converted value
1809
- is returned as brokerage_order_id for subsequent order reads.
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: [`ManualTradeFormNotionalValue`](./lib/snaptrade/models/manual_trade_form_notional_value.rb)<a id="notional_value-manualtradeformnotionalvaluelibsnaptrademodelsmanual_trade_form_notional_valuerb"></a>
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: [`ManualTradeFormNotionalValue`](./lib/snaptrade/models/manual_trade_form_notional_value.rb)<a id="notional_value-manualtradeformnotionalvaluelibsnaptrademodelsmanual_trade_form_notional_valuerb"></a>
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
 
@@ -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 Webull US; future options are supported only on tastytrade. 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).
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
- # 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. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
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 and Webull US futures orders. Requires the existing client-order-ID enablement; when disabled the value is ignored. Brokerage behavior on duplicates varies; SnapTrade does not enforce uniqueness. 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.
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 Webull US; future options are supported only on tastytrade. 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).
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
- # 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. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
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 and Webull US futures orders. Requires the existing client-order-ID enablement; when disabled the value is ignored. Brokerage behavior on duplicates varies; SnapTrade does not enforce uniqueness. 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.
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 Webull US; future options are supported only on tastytrade. 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. 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. 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.
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 Webull US; future options are supported only on tastytrade. 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. 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. A futures symbol does not need to be present in SnapTrade&#39;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.
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&#39;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 &#x60;ESZ26 C6000&#x60;, 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&#39;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 [ManualTradeFormNotionalValue]
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 [ManualTradeFormNotionalValue]
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 [ManualTradeFormNotionalValue]
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 [ManualTradeFormNotionalValue]
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
- # ISO-4217 currency code the order prices are denominated in. For crypto pairs this is the quote asset (for example `USDC` for `ETH-USDC`).
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
- :'price_currency' => :'price_currency',
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
- :'price_currency' => :'String',
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
- :'price_currency',
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?(:'price_currency')
169
- self.price_currency = attributes[:'price_currency']
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
- price_currency == o.price_currency &&
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, price_currency, price_effect, total_quantity, filled_quantity, canceled_quantity, open_quantity, execution_price, time_placed, time_updated, time_executed, group, legs].hash
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
@@ -11,7 +11,7 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # A currency traded as the instrument itself, such as the currency bought or sold by a forex order. Quantities on the leg are amounts of this currency; the order's `price_currency` is the currency it was priced in.
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
@@ -69,7 +69,7 @@ module SnapTrade
69
69
  :'price' => :'Float',
70
70
  :'stop' => :'Float',
71
71
  :'units' => :'Float',
72
- :'notional_value' => :'ManualTradeFormNotionalValue'
72
+ :'notional_value' => :'NotionalValue'
73
73
  }
74
74
  end
75
75
 
@@ -88,7 +88,7 @@ module SnapTrade
88
88
  :'price' => :'Float',
89
89
  :'stop' => :'Float',
90
90
  :'units' => :'Float',
91
- :'notional_value' => :'ManualTradeFormNotionalValue',
91
+ :'notional_value' => :'NotionalValue',
92
92
  :'client_order_id' => :'String'
93
93
  }
94
94
  end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #SnapTrade
3
+
4
+ #Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: api@snaptrade.com
8
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ # The asset an order's prices are denominated in. Use `kind` to determine which schema is present.
15
+ module PricedInInstrument
16
+ class << self
17
+ # List of class defined in oneOf (OpenAPI v3)
18
+ def openapi_one_of
19
+ [
20
+ :'CashInstrument',
21
+ :'CryptoInstrument'
22
+ ]
23
+ end
24
+
25
+ # Discriminator's property name (OpenAPI v3)
26
+ def openapi_discriminator_name
27
+ :'kind'
28
+ end
29
+
30
+ # Discriminator's mapping (OpenAPI v3)
31
+ def openapi_discriminator_mapping
32
+ {
33
+ :'cash' => :'CashInstrument',
34
+ :'crypto' => :'CryptoInstrument'
35
+ }
36
+ end
37
+
38
+ # Builds the object
39
+ # @param [Mixed] Data to be matched against the list of oneOf items
40
+ # @return [Object] Returns the model or the data itself
41
+ def build(data)
42
+ discriminator_value = data[openapi_discriminator_name]
43
+ return nil if discriminator_value.nil?
44
+
45
+ klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
46
+ return nil unless klass
47
+
48
+ SnapTrade.const_get(klass).build_from_hash(data)
49
+ end
50
+ end
51
+ end
52
+
53
+ end
@@ -14,7 +14,7 @@ module SnapTrade
14
14
  class SimpleTradeForm
15
15
  attr_accessor :order_type
16
16
 
17
- # 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.
17
+ # 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.
18
18
  attr_accessor :time_in_force
19
19
 
20
20
  # 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.
@@ -29,7 +29,7 @@ module SnapTrade
29
29
  # 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.
30
30
  attr_accessor :price_effect
31
31
 
32
- # Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade and Webull US futures orders. Requires the existing client-order-ID enablement; when disabled the value is ignored. Brokerage behavior on duplicates varies; SnapTrade does not enforce uniqueness. 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.
32
+ # 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.
33
33
  attr_accessor :client_order_id
34
34
 
35
35
  # 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.
@@ -14,7 +14,7 @@ module SnapTrade
14
14
  class SimpleTradeInstrument
15
15
  attr_accessor :kind
16
16
 
17
- # Equity ticker, OCC equity-option symbol, or brokerage-native futures symbol. Tastytrade future tickers begin with `/` and future-option tickers begin with `./`; preserve their spaces and punctuation. Webull US futures require a specific unprefixed contract symbol such as ESZ6, without whitespace; slash aliases and continuous/root-only symbols are not accepted. Universal symbol IDs are not accepted.
17
+ # Equity ticker, OCC equity-option symbol, or brokerage-native futures symbol. Tastytrade future tickers begin with `/` and future-option tickers begin with `./`; preserve their spaces and punctuation. Webull US futures require a specific unprefixed contract symbol such as ESZ6, without whitespace. TradeStation (live and SIM) requires 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. TradeStation's optional @ prefix for dated futures contracts is forwarded unchanged. Webull and TradeStation do not accept slash aliases or root-only continuous symbols. Universal symbol IDs are not accepted.
18
18
  attr_accessor :symbol
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,10 +11,19 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- class ManualTradeFormNotionalValue
14
+ class TradingPlaceSimpleOrder409Response
15
+ attr_accessor :detail
16
+
17
+ attr_accessor :status_code
18
+
19
+ attr_accessor :code
20
+
15
21
  # Attribute mapping from ruby-style variable name to JSON key.
16
22
  def self.attribute_map
17
23
  {
24
+ :'detail' => :'detail',
25
+ :'status_code' => :'status_code',
26
+ :'code' => :'code'
18
27
  }
19
28
  end
20
29
 
@@ -26,6 +35,9 @@ module SnapTrade
26
35
  # Attribute type mapping.
27
36
  def self.openapi_types
28
37
  {
38
+ :'detail' => :'String',
39
+ :'status_code' => :'Integer',
40
+ :'code' => :'String'
29
41
  }
30
42
  end
31
43
 
@@ -35,27 +47,32 @@ module SnapTrade
35
47
  ])
36
48
  end
37
49
 
38
- # List of class defined in allOf (OpenAPI v3)
39
- def self.openapi_all_of
40
- [
41
- :'NotionalValue'
42
- ]
43
- end
44
-
45
50
  # Initializes the object
46
51
  # @param [Hash] attributes Model attributes in the form of hash
47
52
  def initialize(attributes = {})
48
53
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::ManualTradeFormNotionalValue` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::TradingPlaceSimpleOrder409Response` initialize method"
50
55
  end
51
56
 
52
57
  # check to see if the attribute exists and convert string to symbol for hash key
53
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
59
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::ManualTradeFormNotionalValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::TradingPlaceSimpleOrder409Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
61
  end
57
62
  h[k.to_sym] = v
58
63
  }
64
+
65
+ if attributes.key?(:'detail')
66
+ self.detail = attributes[:'detail']
67
+ end
68
+
69
+ if attributes.key?(:'status_code')
70
+ self.status_code = attributes[:'status_code']
71
+ end
72
+
73
+ if attributes.key?(:'code')
74
+ self.code = attributes[:'code']
75
+ end
59
76
  end
60
77
 
61
78
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -75,7 +92,10 @@ module SnapTrade
75
92
  # @param [Object] Object to be compared
76
93
  def ==(o)
77
94
  return true if self.equal?(o)
78
- self.class == o.class
95
+ self.class == o.class &&
96
+ detail == o.detail &&
97
+ status_code == o.status_code &&
98
+ code == o.code
79
99
  end
80
100
 
81
101
  # @see the `==` method
@@ -87,7 +107,7 @@ module SnapTrade
87
107
  # Calculates hash code according to all attributes.
88
108
  # @return [Integer] Hash code
89
109
  def hash
90
- [].hash
110
+ [detail, status_code, code].hash
91
111
  end
92
112
 
93
113
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '3.0.52'
11
+ VERSION = '3.0.53'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -166,7 +166,6 @@ require 'snaptrade/models/manual_trade_form'
166
166
  require 'snaptrade/models/manual_trade_form_bracket'
167
167
  require 'snaptrade/models/manual_trade_form_complex'
168
168
  require 'snaptrade/models/manual_trade_form_complex_type'
169
- require 'snaptrade/models/manual_trade_form_notional_value'
170
169
  require 'snaptrade/models/manual_trade_form_with_options'
171
170
  require 'snaptrade/models/manual_trade_impact'
172
171
  require 'snaptrade/models/manual_trade_place_time_in_force_strict'
@@ -241,6 +240,7 @@ require 'snaptrade/models/position'
241
240
  require 'snaptrade/models/position_currency'
242
241
  require 'snaptrade/models/position_symbol'
243
242
  require 'snaptrade/models/price_effect'
243
+ require 'snaptrade/models/priced_in_instrument'
244
244
  require 'snaptrade/models/rate_of_return_object'
245
245
  require 'snaptrade/models/rate_of_return_response'
246
246
  require 'snaptrade/models/recent_orders_response'
@@ -300,6 +300,7 @@ require 'snaptrade/models/trade_detection_subscription'
300
300
  require 'snaptrade/models/trading_get_user_account_option_quotes410_response'
301
301
  require 'snaptrade/models/trading_instrument'
302
302
  require 'snaptrade/models/trading_instrument_type'
303
+ require 'snaptrade/models/trading_place_simple_order409_response'
303
304
  require 'snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response'
304
305
  require 'snaptrade/models/trading_session'
305
306
  require 'snaptrade/models/trailing_stop'
@@ -128,7 +128,7 @@ describe 'ExperimentalEndpointsApi' do
128
128
 
129
129
  # unit tests for place_simple_order
130
130
  # Place a simple order (beta)
131
- # **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 Webull US; future options are supported only on tastytrade. 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. 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. A futures symbol does not need to be present in SnapTrade&#39;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.
131
+ # **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&#39;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 &#x60;ESZ26 C6000&#x60;, 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&#39;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.
132
132
  # @param account_id The ID of the account to execute the trade on.
133
133
  # @param user_id
134
134
  # @param user_secret