snaptrade 2.0.162 → 2.0.163
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/Gemfile.lock +2 -2
- data/README.md +74 -2
- data/lib/snaptrade/api/trading_api.rb +146 -0
- data/lib/snaptrade/models/option_impact.rb +228 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +1 -0
- data/spec/api/trading_api_spec.rb +15 -0
- data/spec/models/option_impact_spec.rb +35 -0
- metadata +152 -149
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0d0339193f49eb4054b1acc4117f5d3908eeac1216d70285623c61902b7d8c5
|
|
4
|
+
data.tar.gz: 518944dd0e7fe9ab5f1aad96792e7a502cba9bcbb8588371f361f7249cfa85de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27aff07e9e57db3b29bdd26e695b7ac801959edf7b1df0af3a8aa06962746d321bbe42c65f3dad38c0ca8225d4331820812aa987185a64df3b1331939512eae7
|
|
7
|
+
data.tar.gz: ca89c95353f8a4f9ab22910539a4a048e516e3c47360b75d4bcee4c53bd15bbc7509928397263abc33347e9a38e28ed539aec590cc22c22f6dac112136aec3fb
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
snaptrade (2.0.
|
|
4
|
+
snaptrade (2.0.163)
|
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ GEM
|
|
|
29
29
|
method_source (1.1.0)
|
|
30
30
|
multipart-post (2.4.1)
|
|
31
31
|
parallel (1.27.0)
|
|
32
|
-
parser (3.3.10.
|
|
32
|
+
parser (3.3.10.2)
|
|
33
33
|
ast (~> 2.4.1)
|
|
34
34
|
racc
|
|
35
35
|
prism (1.9.0)
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.163)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -64,6 +64,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
64
64
|
* [`snaptrade.trading.cancel_order`](#snaptradetradingcancel_order)
|
|
65
65
|
* [`snaptrade.trading.cancel_user_account_order`](#snaptradetradingcancel_user_account_order)
|
|
66
66
|
* [`snaptrade.trading.get_cryptocurrency_pair_quote`](#snaptradetradingget_cryptocurrency_pair_quote)
|
|
67
|
+
* [`snaptrade.trading.get_option_impact`](#snaptradetradingget_option_impact)
|
|
67
68
|
* [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
|
|
68
69
|
* [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
|
|
69
70
|
* [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
|
|
@@ -84,7 +85,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
84
85
|
Add to Gemfile:
|
|
85
86
|
|
|
86
87
|
```ruby
|
|
87
|
-
gem 'snaptrade', '~> 2.0.
|
|
88
|
+
gem 'snaptrade', '~> 2.0.163'
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1797,6 +1798,77 @@ p result
|
|
|
1797
1798
|
---
|
|
1798
1799
|
|
|
1799
1800
|
|
|
1801
|
+
### `snaptrade.trading.get_option_impact`<a id="snaptradetradingget_option_impact"></a>
|
|
1802
|
+
|
|
1803
|
+
Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
1804
|
+
Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1808
|
+
|
|
1809
|
+
```ruby
|
|
1810
|
+
result = snaptrade.trading.get_option_impact(
|
|
1811
|
+
order_type: "MARKET",
|
|
1812
|
+
time_in_force: "Day",
|
|
1813
|
+
legs: [
|
|
1814
|
+
{
|
|
1815
|
+
"instrument" => {
|
|
1816
|
+
"symbol" => "PBI 250718C00006000",
|
|
1817
|
+
"instrument_type" => "OPTION",
|
|
1818
|
+
},
|
|
1819
|
+
"action" => "BUY_TO_OPEN",
|
|
1820
|
+
"units" => 1,
|
|
1821
|
+
}
|
|
1822
|
+
],
|
|
1823
|
+
user_id: "snaptrade-user-123",
|
|
1824
|
+
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1825
|
+
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1826
|
+
limit_price: "",
|
|
1827
|
+
stop_price: "",
|
|
1828
|
+
price_effect: "DEBIT",
|
|
1829
|
+
)
|
|
1830
|
+
p result
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1834
|
+
|
|
1835
|
+
##### order_type: [`MlegOrderTypeStrict`](./lib/snaptrade/models/mleg_order_type_strict.rb)<a id="order_type-mlegordertypestrictlibsnaptrademodelsmleg_order_type_strictrb"></a>
|
|
1836
|
+
The type of order to place.
|
|
1837
|
+
|
|
1838
|
+
##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
|
|
1839
|
+
The Time in Force type for the order. This field indicates how long the order
|
|
1840
|
+
will remain active before it is executed or expires. Here are the supported
|
|
1841
|
+
values: - `Day` - Day. The order is valid only for the trading day on which it
|
|
1842
|
+
is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed
|
|
1843
|
+
or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety
|
|
1844
|
+
immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order
|
|
1845
|
+
must be executed immediately. Any portion of the order that cannot be filled
|
|
1846
|
+
immediately will be canceled.
|
|
1847
|
+
|
|
1848
|
+
##### legs: Array<[`MlegLeg`](./lib/snaptrade/models/mleg_leg.rb)><a id="legs-array"></a>
|
|
1849
|
+
##### user_id: `String`<a id="user_id-string"></a>
|
|
1850
|
+
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
1851
|
+
##### account_id: `String`<a id="account_id-string"></a>
|
|
1852
|
+
##### limit_price: `Float`<a id="limit_price-float"></a>
|
|
1853
|
+
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
|
1854
|
+
|
|
1855
|
+
##### stop_price: `Float`<a id="stop_price-float"></a>
|
|
1856
|
+
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
|
1857
|
+
|
|
1858
|
+
##### price_effect: [`MlegPriceEffectStrict`](./lib/snaptrade/models/mleg_price_effect_strict.rb)<a id="price_effect-mlegpriceeffectstrictlibsnaptrademodelsmleg_price_effect_strictrb"></a>
|
|
1859
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1860
|
+
|
|
1861
|
+
[OptionImpact](./lib/snaptrade/models/option_impact.rb)
|
|
1862
|
+
|
|
1863
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1864
|
+
|
|
1865
|
+
`/accounts/{accountId}/trading/options/impact` `POST`
|
|
1866
|
+
|
|
1867
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1868
|
+
|
|
1869
|
+
---
|
|
1870
|
+
|
|
1871
|
+
|
|
1800
1872
|
### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
|
|
1801
1873
|
|
|
1802
1874
|
Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
@@ -378,6 +378,152 @@ module SnapTrade
|
|
|
378
378
|
end
|
|
379
379
|
|
|
380
380
|
|
|
381
|
+
# Get option order impact
|
|
382
|
+
#
|
|
383
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
384
|
+
# Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
385
|
+
#
|
|
386
|
+
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
387
|
+
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
|
|
388
|
+
# @param legs [Array<MlegLeg>]
|
|
389
|
+
# @param user_id [String]
|
|
390
|
+
# @param user_secret [String]
|
|
391
|
+
# @param account_id [String]
|
|
392
|
+
# @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
|
393
|
+
# @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
|
394
|
+
# @param price_effect [MlegPriceEffectStrict]
|
|
395
|
+
# @param body [MlegTradeForm]
|
|
396
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
397
|
+
def get_option_impact(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
|
|
398
|
+
_body = {}
|
|
399
|
+
_body[:order_type] = order_type if order_type != SENTINEL
|
|
400
|
+
_body[:time_in_force] = time_in_force if time_in_force != SENTINEL
|
|
401
|
+
_body[:limit_price] = limit_price if limit_price != SENTINEL
|
|
402
|
+
_body[:stop_price] = stop_price if stop_price != SENTINEL
|
|
403
|
+
_body[:price_effect] = price_effect if price_effect != SENTINEL
|
|
404
|
+
_body[:legs] = legs if legs != SENTINEL
|
|
405
|
+
mleg_trade_form = _body
|
|
406
|
+
data, _status_code, _headers = get_option_impact_with_http_info_impl(user_id, user_secret, account_id, mleg_trade_form, extra)
|
|
407
|
+
data
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# Get option order impact
|
|
411
|
+
#
|
|
412
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
413
|
+
# Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
414
|
+
#
|
|
415
|
+
# @param order_type [MlegOrderTypeStrict] The type of order to place.
|
|
416
|
+
# @param time_in_force [TimeInForceStrict] The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
|
|
417
|
+
# @param legs [Array<MlegLeg>]
|
|
418
|
+
# @param user_id [String]
|
|
419
|
+
# @param user_secret [String]
|
|
420
|
+
# @param account_id [String]
|
|
421
|
+
# @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
|
422
|
+
# @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
|
423
|
+
# @param price_effect [MlegPriceEffectStrict]
|
|
424
|
+
# @param body [MlegTradeForm]
|
|
425
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
426
|
+
def get_option_impact_with_http_info(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
|
|
427
|
+
_body = {}
|
|
428
|
+
_body[:order_type] = order_type if order_type != SENTINEL
|
|
429
|
+
_body[:time_in_force] = time_in_force if time_in_force != SENTINEL
|
|
430
|
+
_body[:limit_price] = limit_price if limit_price != SENTINEL
|
|
431
|
+
_body[:stop_price] = stop_price if stop_price != SENTINEL
|
|
432
|
+
_body[:price_effect] = price_effect if price_effect != SENTINEL
|
|
433
|
+
_body[:legs] = legs if legs != SENTINEL
|
|
434
|
+
mleg_trade_form = _body
|
|
435
|
+
get_option_impact_with_http_info_impl(user_id, user_secret, account_id, mleg_trade_form, extra)
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# Get option order impact
|
|
439
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
440
|
+
# @param user_id [String]
|
|
441
|
+
# @param user_secret [String]
|
|
442
|
+
# @param account_id [String]
|
|
443
|
+
# @param mleg_trade_form [MlegTradeForm]
|
|
444
|
+
# @param [Hash] opts the optional parameters
|
|
445
|
+
# @return [OptionImpact]
|
|
446
|
+
private def get_option_impact_impl(user_id, user_secret, account_id, mleg_trade_form, opts = {})
|
|
447
|
+
data, _status_code, _headers = get_option_impact_with_http_info(user_id, user_secret, account_id, mleg_trade_form, opts)
|
|
448
|
+
data
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# Get option order impact
|
|
452
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
453
|
+
# @param user_id [String]
|
|
454
|
+
# @param user_secret [String]
|
|
455
|
+
# @param account_id [String]
|
|
456
|
+
# @param mleg_trade_form [MlegTradeForm]
|
|
457
|
+
# @param [Hash] opts the optional parameters
|
|
458
|
+
# @return [Array<(OptionImpact, Integer, Hash)>] OptionImpact data, response status code and response headers
|
|
459
|
+
private def get_option_impact_with_http_info_impl(user_id, user_secret, account_id, mleg_trade_form, opts = {})
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug 'Calling API: TradingApi.get_option_impact ...'
|
|
462
|
+
end
|
|
463
|
+
# verify the required parameter 'user_id' is set
|
|
464
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
465
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TradingApi.get_option_impact"
|
|
466
|
+
end
|
|
467
|
+
# verify the required parameter 'user_secret' is set
|
|
468
|
+
if @api_client.config.client_side_validation && user_secret.nil?
|
|
469
|
+
fail ArgumentError, "Missing the required parameter 'user_secret' when calling TradingApi.get_option_impact"
|
|
470
|
+
end
|
|
471
|
+
# verify the required parameter 'account_id' is set
|
|
472
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
473
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.get_option_impact"
|
|
474
|
+
end
|
|
475
|
+
# verify the required parameter 'mleg_trade_form' is set
|
|
476
|
+
if @api_client.config.client_side_validation && mleg_trade_form.nil?
|
|
477
|
+
fail ArgumentError, "Missing the required parameter 'mleg_trade_form' when calling TradingApi.get_option_impact"
|
|
478
|
+
end
|
|
479
|
+
# resource path
|
|
480
|
+
local_var_path = '/accounts/{accountId}/trading/options/impact'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
481
|
+
|
|
482
|
+
# query parameters
|
|
483
|
+
query_params = opts[:query_params] || {}
|
|
484
|
+
query_params[:'userId'] = user_id
|
|
485
|
+
query_params[:'userSecret'] = user_secret
|
|
486
|
+
|
|
487
|
+
# header parameters
|
|
488
|
+
header_params = opts[:header_params] || {}
|
|
489
|
+
# HTTP header 'Accept' (if needed)
|
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
491
|
+
# HTTP header 'Content-Type'
|
|
492
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
493
|
+
if !content_type.nil?
|
|
494
|
+
header_params['Content-Type'] = content_type
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# form parameters
|
|
498
|
+
form_params = opts[:form_params] || {}
|
|
499
|
+
|
|
500
|
+
# http body (model)
|
|
501
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mleg_trade_form)
|
|
502
|
+
|
|
503
|
+
# return_type
|
|
504
|
+
return_type = opts[:debug_return_type] || 'OptionImpact'
|
|
505
|
+
|
|
506
|
+
# auth_names
|
|
507
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
508
|
+
|
|
509
|
+
new_options = opts.merge(
|
|
510
|
+
:operation => :"TradingApi.get_option_impact",
|
|
511
|
+
:header_params => header_params,
|
|
512
|
+
:query_params => query_params,
|
|
513
|
+
:form_params => form_params,
|
|
514
|
+
:body => post_body,
|
|
515
|
+
:auth_names => auth_names,
|
|
516
|
+
:return_type => return_type
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
|
520
|
+
if @api_client.config.debugging
|
|
521
|
+
@api_client.config.logger.debug "API called: TradingApi#get_option_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
522
|
+
end
|
|
523
|
+
return data, status_code, headers, response
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
|
|
381
527
|
# Check equity order impact
|
|
382
528
|
#
|
|
383
529
|
# Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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
|
+
# Estimated cost and fees for an option order before it is placed.
|
|
15
|
+
class OptionImpact
|
|
16
|
+
# Estimated option premium for the order (before fees).
|
|
17
|
+
attr_accessor :estimated_cost
|
|
18
|
+
|
|
19
|
+
# Estimated transaction fees and commissions for the order.
|
|
20
|
+
attr_accessor :estimated_transaction_fee
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'estimated_cost' => :'estimated_cost',
|
|
26
|
+
:'estimated_transaction_fee' => :'estimated_transaction_fee'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
|
31
|
+
def self.acceptable_attributes
|
|
32
|
+
attribute_map.values
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.openapi_types
|
|
37
|
+
{
|
|
38
|
+
:'estimated_cost' => :'String',
|
|
39
|
+
:'estimated_transaction_fee' => :'String'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List of attributes with nullable: true
|
|
44
|
+
def self.openapi_nullable
|
|
45
|
+
Set.new([
|
|
46
|
+
])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::OptionImpact` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::OptionImpact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'estimated_cost')
|
|
65
|
+
self.estimated_cost = attributes[:'estimated_cost']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'estimated_transaction_fee')
|
|
69
|
+
self.estimated_transaction_fee = attributes[:'estimated_transaction_fee']
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
invalid_properties = Array.new
|
|
77
|
+
invalid_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
def valid?
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
estimated_cost == o.estimated_cost &&
|
|
92
|
+
estimated_transaction_fee == o.estimated_transaction_fee
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Integer] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[estimated_cost, estimated_transaction_fee].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def self.build_from_hash(attributes)
|
|
111
|
+
new.build_from_hash(attributes)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Builds the object from hash
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
# @return [Object] Returns the model itself
|
|
117
|
+
def build_from_hash(attributes)
|
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
122
|
+
self.send("#{key}=", nil)
|
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
124
|
+
# check to ensure the input is an array given that the attribute
|
|
125
|
+
# is documented as an array but the input is not
|
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
128
|
+
end
|
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
self
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Deserializes the data based on type
|
|
138
|
+
# @param string type Data type
|
|
139
|
+
# @param string value Value to be deserialized
|
|
140
|
+
# @return [Object] Deserialized data
|
|
141
|
+
def _deserialize(type, value)
|
|
142
|
+
case type.to_sym
|
|
143
|
+
when :Time
|
|
144
|
+
Time.parse(value)
|
|
145
|
+
when :Date
|
|
146
|
+
Date.parse(value)
|
|
147
|
+
when :String
|
|
148
|
+
value.to_s
|
|
149
|
+
when :Integer
|
|
150
|
+
value.to_i
|
|
151
|
+
when :Float
|
|
152
|
+
value.to_f
|
|
153
|
+
when :Boolean
|
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
155
|
+
true
|
|
156
|
+
else
|
|
157
|
+
false
|
|
158
|
+
end
|
|
159
|
+
when :Object
|
|
160
|
+
# generic object (usually a Hash), return directly
|
|
161
|
+
value
|
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
|
168
|
+
{}.tap do |hash|
|
|
169
|
+
value.each do |k, v|
|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
else # model
|
|
174
|
+
# models (e.g. Pet) or oneOf
|
|
175
|
+
klass = SnapTrade.const_get(type)
|
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the string representation of the object
|
|
181
|
+
# @return [String] String presentation of the object
|
|
182
|
+
def to_s
|
|
183
|
+
to_hash.to_s
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_body
|
|
189
|
+
to_hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
if value.nil?
|
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
hash[param] = _to_hash(value)
|
|
204
|
+
end
|
|
205
|
+
hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Outputs non-array value in the form of hash
|
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
210
|
+
# @param [Object] value Any valid value
|
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
|
212
|
+
def _to_hash(value)
|
|
213
|
+
if value.is_a?(Array)
|
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
|
215
|
+
elsif value.is_a?(Hash)
|
|
216
|
+
{}.tap do |hash|
|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
218
|
+
end
|
|
219
|
+
elsif value.respond_to? :to_hash
|
|
220
|
+
value.to_hash
|
|
221
|
+
else
|
|
222
|
+
value
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
|
@@ -115,6 +115,7 @@ require 'snaptrade/models/option_brokerage_symbol'
|
|
|
115
115
|
require 'snaptrade/models/option_chain_inner'
|
|
116
116
|
require 'snaptrade/models/option_chain_inner_chain_per_root_inner'
|
|
117
117
|
require 'snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner'
|
|
118
|
+
require 'snaptrade/models/option_impact'
|
|
118
119
|
require 'snaptrade/models/option_leg'
|
|
119
120
|
require 'snaptrade/models/option_leg_action'
|
|
120
121
|
require 'snaptrade/models/option_strategy'
|
|
@@ -72,6 +72,21 @@ describe 'TradingApi' do
|
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
+
# unit tests for get_option_impact
|
|
76
|
+
# Get option order impact
|
|
77
|
+
# Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
78
|
+
# @param user_id
|
|
79
|
+
# @param user_secret
|
|
80
|
+
# @param account_id
|
|
81
|
+
# @param mleg_trade_form
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [OptionImpact]
|
|
84
|
+
describe 'get_option_impact test' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
75
90
|
# unit tests for get_order_impact
|
|
76
91
|
# Check equity order impact
|
|
77
92
|
# Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: api@snaptrade.com
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SnapTrade::OptionImpact
|
|
15
|
+
describe SnapTrade::OptionImpact do
|
|
16
|
+
let(:instance) { SnapTrade::OptionImpact.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of OptionImpact' do
|
|
19
|
+
it 'should create an instance of OptionImpact' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::OptionImpact)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "estimated_cost"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "estimated_transaction_fee"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.163
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -195,6 +195,7 @@ files:
|
|
|
195
195
|
- lib/snaptrade/models/option_chain_inner.rb
|
|
196
196
|
- lib/snaptrade/models/option_chain_inner_chain_per_root_inner.rb
|
|
197
197
|
- lib/snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner.rb
|
|
198
|
+
- lib/snaptrade/models/option_impact.rb
|
|
198
199
|
- lib/snaptrade/models/option_leg.rb
|
|
199
200
|
- lib/snaptrade/models/option_leg_action.rb
|
|
200
201
|
- lib/snaptrade/models/option_strategy.rb
|
|
@@ -371,6 +372,7 @@ files:
|
|
|
371
372
|
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
|
372
373
|
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
|
373
374
|
- spec/models/option_chain_inner_spec.rb
|
|
375
|
+
- spec/models/option_impact_spec.rb
|
|
374
376
|
- spec/models/option_leg_action_spec.rb
|
|
375
377
|
- spec/models/option_leg_spec.rb
|
|
376
378
|
- spec/models/option_strategy_legs_inner_spec.rb
|
|
@@ -462,177 +464,178 @@ specification_version: 4
|
|
|
462
464
|
summary: SnapTrade Ruby Gem
|
|
463
465
|
test_files:
|
|
464
466
|
- spec/api/trading_api_spec.rb
|
|
465
|
-
- spec/api/api_status_api_spec.rb
|
|
466
|
-
- spec/api/reference_data_api_spec.rb
|
|
467
467
|
- spec/api/options_api_spec.rb
|
|
468
|
-
- spec/api/
|
|
468
|
+
- spec/api/api_status_api_spec.rb
|
|
469
469
|
- spec/api/experimental_endpoints_api_spec.rb
|
|
470
|
-
- spec/api/account_information_api_spec.rb
|
|
471
470
|
- spec/api/connections_api_spec.rb
|
|
472
471
|
- spec/api/transactions_and_reporting_api_spec.rb
|
|
472
|
+
- spec/api/account_information_api_spec.rb
|
|
473
|
+
- spec/api/reference_data_api_spec.rb
|
|
474
|
+
- spec/api/authentication_api_spec.rb
|
|
473
475
|
- spec/api_client_spec.rb
|
|
474
476
|
- spec/configuration_spec.rb
|
|
475
477
|
- spec/getting_started_spec.rb
|
|
476
|
-
- spec/models/
|
|
477
|
-
- spec/models/
|
|
478
|
-
- spec/models/
|
|
479
|
-
- spec/models/
|
|
480
|
-
- spec/models/
|
|
481
|
-
- spec/models/
|
|
482
|
-
- spec/models/
|
|
483
|
-
- spec/models/
|
|
484
|
-
- spec/models/
|
|
485
|
-
- spec/models/
|
|
486
|
-
- spec/models/
|
|
487
|
-
- spec/models/
|
|
488
|
-
- spec/models/
|
|
489
|
-
- spec/models/
|
|
490
|
-
- spec/models/
|
|
491
|
-
- spec/models/
|
|
492
|
-
- spec/models/
|
|
493
|
-
- spec/models/account_order_record_quote_universal_symbol_spec.rb
|
|
478
|
+
- spec/models/options_symbol_spec.rb
|
|
479
|
+
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
|
480
|
+
- spec/models/net_dividend_spec.rb
|
|
481
|
+
- spec/models/validated_trade_body_spec.rb
|
|
482
|
+
- spec/models/strategy_quotes_greek_spec.rb
|
|
483
|
+
- spec/models/connection_portal_version_spec.rb
|
|
484
|
+
- spec/models/underlying_symbol_spec.rb
|
|
485
|
+
- spec/models/monthly_dividends_spec.rb
|
|
486
|
+
- spec/models/option_type_spec.rb
|
|
487
|
+
- spec/models/account_balance_spec.rb
|
|
488
|
+
- spec/models/underlying_symbol_exchange_spec.rb
|
|
489
|
+
- spec/models/connection_type_spec.rb
|
|
490
|
+
- spec/models/snap_trade_login_user_request_body_spec.rb
|
|
491
|
+
- spec/models/rate_of_return_object_spec.rb
|
|
492
|
+
- spec/models/performance_custom_spec.rb
|
|
493
|
+
- spec/models/account_order_record_quote_currency_spec.rb
|
|
494
|
+
- spec/models/option_leg_action_spec.rb
|
|
494
495
|
- spec/models/simple_order_form_spec.rb
|
|
495
|
-
- spec/models/
|
|
496
|
-
- spec/models/manual_trade_symbol_spec.rb
|
|
497
|
-
- spec/models/mleg_price_effect_strict_spec.rb
|
|
498
|
-
- spec/models/strategy_order_record_status_spec.rb
|
|
496
|
+
- spec/models/us_exchange_spec.rb
|
|
499
497
|
- spec/models/balance_currency_spec.rb
|
|
500
|
-
- spec/models/
|
|
501
|
-
- spec/models/
|
|
502
|
-
- spec/models/
|
|
503
|
-
- spec/models/
|
|
504
|
-
- spec/models/
|
|
505
|
-
- spec/models/
|
|
506
|
-
- spec/models/timeframe_spec.rb
|
|
507
|
-
- spec/models/brokerage_authorization_spec.rb
|
|
508
|
-
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
509
|
-
- spec/models/action_strict_with_options_spec.rb
|
|
498
|
+
- spec/models/account_universal_activity_spec.rb
|
|
499
|
+
- spec/models/mleg_price_effect_strict_spec.rb
|
|
500
|
+
- spec/models/crypto_order_preview_spec.rb
|
|
501
|
+
- spec/models/manual_trade_form_with_options_spec.rb
|
|
502
|
+
- spec/models/take_profit_spec.rb
|
|
503
|
+
- spec/models/crypto_trading_instrument_spec.rb
|
|
510
504
|
- spec/models/transactions_status_spec.rb
|
|
511
|
-
- spec/models/
|
|
512
|
-
- spec/models/
|
|
505
|
+
- spec/models/manual_trade_and_impact_spec.rb
|
|
506
|
+
- spec/models/underlying_symbol_type_spec.rb
|
|
513
507
|
- spec/models/symbols_quotes_inner_spec.rb
|
|
514
|
-
- spec/models/
|
|
515
|
-
- spec/models/
|
|
516
|
-
- spec/models/
|
|
517
|
-
- spec/models/model404_failed_request_response_spec.rb
|
|
518
|
-
- spec/models/mleg_trading_instrument_spec.rb
|
|
519
|
-
- spec/models/options_position_spec.rb
|
|
520
|
-
- spec/models/child_brokerage_order_ids_spec.rb
|
|
521
|
-
- spec/models/manual_trade_replace_form_spec.rb
|
|
522
|
-
- spec/models/manual_trade_impact_spec.rb
|
|
523
|
-
- spec/models/net_dividend_spec.rb
|
|
524
|
-
- spec/models/account_balance_spec.rb
|
|
525
|
-
- spec/models/option_chain_inner_spec.rb
|
|
526
|
-
- spec/models/monthly_dividends_spec.rb
|
|
527
|
-
- spec/models/account_order_record_option_symbol_spec.rb
|
|
508
|
+
- spec/models/symbol_exchange_spec.rb
|
|
509
|
+
- spec/models/manual_trade_form_bracket_spec.rb
|
|
510
|
+
- spec/models/snap_trade_holdings_total_value_spec.rb
|
|
528
511
|
- spec/models/model402_brokerage_auth_disabled_response_spec.rb
|
|
529
|
-
- spec/models/
|
|
530
|
-
- spec/models/
|
|
531
|
-
- spec/models/
|
|
532
|
-
- spec/models/
|
|
533
|
-
- spec/models/
|
|
534
|
-
- spec/models/
|
|
535
|
-
- spec/models/
|
|
536
|
-
- spec/models/
|
|
537
|
-
- spec/models/account_order_record_quote_currency_spec.rb
|
|
512
|
+
- spec/models/brokerage_authorization_disabled_confirmation_spec.rb
|
|
513
|
+
- spec/models/brokerage_spec.rb
|
|
514
|
+
- spec/models/manual_trade_symbol_spec.rb
|
|
515
|
+
- spec/models/manual_trade_impact_spec.rb
|
|
516
|
+
- spec/models/position_spec.rb
|
|
517
|
+
- spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
|
|
518
|
+
- spec/models/dividend_at_date_spec.rb
|
|
519
|
+
- spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
|
|
538
520
|
- spec/models/strategy_type_spec.rb
|
|
539
|
-
- spec/models/
|
|
540
|
-
- spec/models/
|
|
521
|
+
- spec/models/stop_loss_spec.rb
|
|
522
|
+
- spec/models/timeframe_spec.rb
|
|
523
|
+
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
524
|
+
- spec/models/trading_instrument_spec.rb
|
|
525
|
+
- spec/models/account_orders_v2_response_spec.rb
|
|
526
|
+
- spec/models/order_updated_response_spec.rb
|
|
527
|
+
- spec/models/partner_data_spec.rb
|
|
541
528
|
- spec/models/sub_period_return_rate_spec.rb
|
|
542
|
-
- spec/models/
|
|
543
|
-
- spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
|
|
544
|
-
- spec/models/position_currency_spec.rb
|
|
529
|
+
- spec/models/mleg_trading_instrument_spec.rb
|
|
545
530
|
- spec/models/brokerage_authorization_refresh_confirmation_spec.rb
|
|
546
|
-
- spec/models/
|
|
547
|
-
- spec/models/
|
|
548
|
-
- spec/models/
|
|
549
|
-
- spec/models/
|
|
550
|
-
- spec/models/
|
|
551
|
-
- spec/models/
|
|
552
|
-
- spec/models/
|
|
553
|
-
- spec/models/
|
|
554
|
-
- spec/models/
|
|
555
|
-
- spec/models/
|
|
556
|
-
- spec/models/
|
|
557
|
-
- spec/models/
|
|
558
|
-
- spec/models/
|
|
559
|
-
- spec/models/
|
|
560
|
-
- spec/models/
|
|
561
|
-
- spec/models/
|
|
562
|
-
- spec/models/
|
|
563
|
-
- spec/models/
|
|
564
|
-
- spec/models/
|
|
565
|
-
- spec/models/
|
|
531
|
+
- spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
|
|
532
|
+
- spec/models/account_balance_total_spec.rb
|
|
533
|
+
- spec/models/model400_failed_request_response_spec.rb
|
|
534
|
+
- spec/models/figi_instrument_spec.rb
|
|
535
|
+
- spec/models/manual_trade_replace_form_spec.rb
|
|
536
|
+
- spec/models/recent_orders_response_spec.rb
|
|
537
|
+
- spec/models/holdings_status_spec.rb
|
|
538
|
+
- spec/models/account_spec.rb
|
|
539
|
+
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
|
540
|
+
- spec/models/manual_trade_form_spec.rb
|
|
541
|
+
- spec/models/connections_session_events200_response_inner_spec.rb
|
|
542
|
+
- spec/models/model425_failed_request_response_spec.rb
|
|
543
|
+
- spec/models/symbol_spec.rb
|
|
544
|
+
- spec/models/strategy_order_record_status_spec.rb
|
|
545
|
+
- spec/models/currency_spec.rb
|
|
546
|
+
- spec/models/strategy_quotes_spec.rb
|
|
547
|
+
- spec/models/snap_trade_holdings_account_spec.rb
|
|
548
|
+
- spec/models/option_chain_inner_spec.rb
|
|
549
|
+
- spec/models/exchange_spec.rb
|
|
550
|
+
- spec/models/model404_failed_request_response_spec.rb
|
|
551
|
+
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
|
566
552
|
- spec/models/notional_value_spec.rb
|
|
567
553
|
- spec/models/status_spec.rb
|
|
568
|
-
- spec/models/
|
|
569
|
-
- spec/models/
|
|
570
|
-
- spec/models/
|
|
554
|
+
- spec/models/universal_activity_spec.rb
|
|
555
|
+
- spec/models/session_event_type_spec.rb
|
|
556
|
+
- spec/models/mleg_leg_spec.rb
|
|
557
|
+
- spec/models/account_order_record_status_v2_spec.rb
|
|
571
558
|
- spec/models/brokerage_instrument_spec.rb
|
|
559
|
+
- spec/models/account_sync_status_spec.rb
|
|
560
|
+
- spec/models/simple_order_form_type_spec.rb
|
|
561
|
+
- spec/models/past_value_spec.rb
|
|
562
|
+
- spec/models/time_in_force_strict_spec.rb
|
|
563
|
+
- spec/models/account_order_record_leg_spec.rb
|
|
564
|
+
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
565
|
+
- spec/models/account_order_record_quote_universal_symbol_spec.rb
|
|
566
|
+
- spec/models/symbol_figi_instrument_spec.rb
|
|
567
|
+
- spec/models/brokerage_type_spec.rb
|
|
568
|
+
- spec/models/mleg_order_type_strict_spec.rb
|
|
569
|
+
- spec/models/manual_trade_balance_spec.rb
|
|
570
|
+
- spec/models/account_order_record_universal_symbol_spec.rb
|
|
571
|
+
- spec/models/account_holdings_account_spec.rb
|
|
572
|
+
- spec/models/manual_trade_spec.rb
|
|
573
|
+
- spec/models/brokerage_instruments_response_spec.rb
|
|
574
|
+
- spec/models/options_position_spec.rb
|
|
575
|
+
- spec/models/tax_lot_spec.rb
|
|
576
|
+
- spec/models/account_order_record_option_symbol_spec.rb
|
|
572
577
|
- spec/models/mleg_action_strict_spec.rb
|
|
578
|
+
- spec/models/trading_instrument_type_spec.rb
|
|
579
|
+
- spec/models/model401_failed_request_response_spec.rb
|
|
580
|
+
- spec/models/mleg_order_response_spec.rb
|
|
581
|
+
- spec/models/options_position_currency_spec.rb
|
|
582
|
+
- spec/models/universal_symbol_spec.rb
|
|
573
583
|
- spec/models/crypto_order_form_spec.rb
|
|
574
|
-
- spec/models/
|
|
575
|
-
- spec/models/
|
|
576
|
-
- spec/models/
|
|
577
|
-
- spec/models/
|
|
578
|
-
- spec/models/
|
|
579
|
-
- spec/models/
|
|
584
|
+
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
585
|
+
- spec/models/auth_type_spec.rb
|
|
586
|
+
- spec/models/mleg_trade_form_spec.rb
|
|
587
|
+
- spec/models/option_leg_spec.rb
|
|
588
|
+
- spec/models/exchange_rate_pairs_spec.rb
|
|
589
|
+
- spec/models/cancel_order_response_spec.rb
|
|
590
|
+
- spec/models/login_redirect_uri_spec.rb
|
|
591
|
+
- spec/models/account_universal_activity_currency_spec.rb
|
|
592
|
+
- spec/models/account_information_get_user_account_order_detail_request_spec.rb
|
|
593
|
+
- spec/models/type_spec.rb
|
|
594
|
+
- spec/models/order_type_strict_spec.rb
|
|
595
|
+
- spec/models/net_contributions_spec.rb
|
|
580
596
|
- spec/models/account_status_spec.rb
|
|
581
|
-
- spec/models/
|
|
582
|
-
- spec/models/
|
|
583
|
-
- spec/models/
|
|
584
|
-
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
|
585
|
-
- spec/models/account_universal_activity_symbol_spec.rb
|
|
586
|
-
- spec/models/symbol_exchange_spec.rb
|
|
587
|
-
- spec/models/past_value_spec.rb
|
|
597
|
+
- spec/models/position_currency_spec.rb
|
|
598
|
+
- spec/models/cryptocurrency_pair_spec.rb
|
|
599
|
+
- spec/models/cryptocurrency_pair_quote_spec.rb
|
|
588
600
|
- spec/models/user_i_dand_secret_spec.rb
|
|
589
|
-
- spec/models/
|
|
590
|
-
- spec/models/
|
|
591
|
-
- spec/models/underlying_symbol_exchange_spec.rb
|
|
592
|
-
- spec/models/rate_of_return_response_spec.rb
|
|
593
|
-
- spec/models/option_leg_spec.rb
|
|
594
|
-
- spec/models/position_spec.rb
|
|
595
|
-
- spec/models/option_strategy_legs_inner_spec.rb
|
|
596
|
-
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
597
|
-
- spec/models/recent_orders_response_spec.rb
|
|
598
|
-
- spec/models/account_order_record_v2_spec.rb
|
|
599
|
-
- spec/models/model425_failed_request_response_spec.rb
|
|
600
|
-
- spec/models/connection_portal_version_spec.rb
|
|
601
|
-
- spec/models/model403_failed_request_response_spec.rb
|
|
602
|
-
- spec/models/time_in_force_strict_spec.rb
|
|
603
|
-
- spec/models/option_strategy_spec.rb
|
|
604
|
-
- spec/models/strategy_quotes_spec.rb
|
|
605
|
-
- spec/models/mleg_leg_spec.rb
|
|
601
|
+
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
|
602
|
+
- spec/models/security_type_spec.rb
|
|
606
603
|
- spec/models/option_brokerage_symbol_spec.rb
|
|
607
|
-
- spec/models/
|
|
608
|
-
- spec/models/
|
|
609
|
-
- spec/models/
|
|
610
|
-
- spec/models/
|
|
611
|
-
- spec/models/underlying_symbol_spec.rb
|
|
612
|
-
- spec/models/stop_loss_spec.rb
|
|
613
|
-
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
614
|
-
- spec/models/paginated_universal_activity_spec.rb
|
|
615
|
-
- spec/models/crypto_order_form_time_in_force_spec.rb
|
|
616
|
-
- spec/models/account_universal_activity_currency_spec.rb
|
|
617
|
-
- spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
|
|
618
|
-
- spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
|
|
619
|
-
- spec/models/manual_trade_form_with_options_spec.rb
|
|
620
|
-
- spec/models/account_balance_total_spec.rb
|
|
621
|
-
- spec/models/options_symbol_spec.rb
|
|
622
|
-
- spec/models/session_event_spec.rb
|
|
623
|
-
- spec/models/account_holdings_account_spec.rb
|
|
624
|
-
- spec/models/crypto_trading_instrument_spec.rb
|
|
604
|
+
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
605
|
+
- spec/models/account_universal_activity_option_symbol_spec.rb
|
|
606
|
+
- spec/models/account_simple_spec.rb
|
|
607
|
+
- spec/models/option_strategy_spec.rb
|
|
625
608
|
- spec/models/symbol_query_spec.rb
|
|
626
|
-
- spec/models/
|
|
627
|
-
- spec/models/
|
|
628
|
-
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
629
|
-
- spec/models/session_event_type_spec.rb
|
|
630
|
-
- spec/models/model400_failed_request_response_spec.rb
|
|
631
|
-
- spec/models/tax_lot_spec.rb
|
|
632
|
-
- spec/models/simple_order_form_type_spec.rb
|
|
609
|
+
- spec/models/strategy_order_record_spec.rb
|
|
610
|
+
- spec/models/option_impact_spec.rb
|
|
633
611
|
- spec/models/model403_feature_not_enabled_response_spec.rb
|
|
634
|
-
- spec/models/
|
|
635
|
-
- spec/models/
|
|
636
|
-
- spec/models/order_updated_response_spec.rb
|
|
612
|
+
- spec/models/trading_session_spec.rb
|
|
613
|
+
- spec/models/action_strict_spec.rb
|
|
637
614
|
- spec/models/crypto_order_form_type_spec.rb
|
|
615
|
+
- spec/models/pagination_details_spec.rb
|
|
616
|
+
- spec/models/session_event_spec.rb
|
|
617
|
+
- spec/models/account_holdings_spec.rb
|
|
618
|
+
- spec/models/account_order_record_leg_instrument_spec.rb
|
|
619
|
+
- spec/models/manual_trade_form_notional_value_spec.rb
|
|
620
|
+
- spec/models/option_strategy_legs_inner_spec.rb
|
|
621
|
+
- spec/models/brokerage_authorization_spec.rb
|
|
622
|
+
- spec/models/crypto_order_form_time_in_force_spec.rb
|
|
623
|
+
- spec/models/encrypted_response_encrypted_message_data_spec.rb
|
|
624
|
+
- spec/models/account_universal_activity_symbol_spec.rb
|
|
625
|
+
- spec/models/paginated_universal_activity_spec.rb
|
|
626
|
+
- spec/models/rate_of_return_response_spec.rb
|
|
627
|
+
- spec/models/balance_spec.rb
|
|
628
|
+
- spec/models/delete_user_response_spec.rb
|
|
629
|
+
- spec/models/mleg_instrument_type_spec.rb
|
|
630
|
+
- spec/models/account_order_record_spec.rb
|
|
631
|
+
- spec/models/action_strict_with_options_spec.rb
|
|
632
|
+
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
633
|
+
- spec/models/account_order_record_v2_spec.rb
|
|
634
|
+
- spec/models/child_brokerage_order_ids_spec.rb
|
|
635
|
+
- spec/models/encrypted_response_spec.rb
|
|
636
|
+
- spec/models/position_symbol_spec.rb
|
|
637
|
+
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
638
|
+
- spec/models/model403_failed_request_response_spec.rb
|
|
639
|
+
- spec/models/account_order_record_status_spec.rb
|
|
640
|
+
- spec/models/symbol_currency_spec.rb
|
|
638
641
|
- spec/spec_helper.rb
|