snaptrade 2.0.82 → 2.0.83
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 +92 -23
- data/lib/snaptrade/api/trading_api.rb +158 -16
- data/lib/snaptrade/models/account_order_record.rb +14 -4
- data/lib/snaptrade/models/{manual_trade_form_with_options_take_profit.rb → account_order_record_child_brokerage_order_ids.rb} +22 -11
- data/lib/snaptrade/models/{manual_trade_form_with_options_stop_loss.rb → child_brokerage_order_ids.rb} +18 -24
- data/lib/snaptrade/models/manual_trade_form_bracket.rb +343 -0
- data/lib/snaptrade/models/manual_trade_form_with_options.rb +6 -37
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +3 -3
- data/spec/api/trading_api_spec.rb +14 -0
- data/spec/models/account_order_record_child_brokerage_order_ids_spec.rb +35 -0
- data/spec/models/account_order_record_spec.rb +6 -0
- data/spec/models/{manual_trade_form_with_options_stop_loss_spec.rb → child_brokerage_order_ids_spec.rb} +8 -8
- data/spec/models/manual_trade_form_bracket_spec.rb +83 -0
- data/spec/models/manual_trade_form_with_options_spec.rb +0 -18
- metadata +11 -11
- data/lib/snaptrade/models/order_class.rb +0 -37
- data/spec/models/manual_trade_form_with_options_take_profit_spec.rb +0 -29
- data/spec/models/order_class_spec.rb +0 -23
@@ -0,0 +1,83 @@
|
|
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::ManualTradeFormBracket
|
15
|
+
describe SnapTrade::ManualTradeFormBracket do
|
16
|
+
let(:instance) { SnapTrade::ManualTradeFormBracket.new }
|
17
|
+
|
18
|
+
describe 'test an instance of ManualTradeFormBracket' do
|
19
|
+
it 'should create an instance of ManualTradeFormBracket' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::ManualTradeFormBracket)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "account_id"' 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 "action"' 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
|
+
describe 'test attribute "symbol"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "order_type"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "time_in_force"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "price"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "stop"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "units"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "stop_loss"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "take_profit"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -80,22 +80,4 @@ describe SnapTrade::ManualTradeFormWithOptions do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
describe 'test attribute "order_class"' do
|
84
|
-
it 'should work' do
|
85
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
describe 'test attribute "stop_loss"' do
|
90
|
-
it 'should work' do
|
91
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
describe 'test attribute "take_profit"' do
|
96
|
-
it 'should work' do
|
97
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
83
|
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.83
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/snaptrade/models/account_holdings.rb
|
102
102
|
- lib/snaptrade/models/account_holdings_account.rb
|
103
103
|
- lib/snaptrade/models/account_order_record.rb
|
104
|
+
- lib/snaptrade/models/account_order_record_child_brokerage_order_ids.rb
|
104
105
|
- lib/snaptrade/models/account_order_record_option_symbol.rb
|
105
106
|
- lib/snaptrade/models/account_order_record_status.rb
|
106
107
|
- lib/snaptrade/models/account_order_record_universal_symbol.rb
|
@@ -123,6 +124,7 @@ files:
|
|
123
124
|
- lib/snaptrade/models/brokerage_authorization_type_read_only.rb
|
124
125
|
- lib/snaptrade/models/brokerage_authorization_type_read_only_brokerage.rb
|
125
126
|
- lib/snaptrade/models/brokerage_type.rb
|
127
|
+
- lib/snaptrade/models/child_brokerage_order_ids.rb
|
126
128
|
- lib/snaptrade/models/connection_portal_version.rb
|
127
129
|
- lib/snaptrade/models/connection_type.rb
|
128
130
|
- lib/snaptrade/models/connections_session_events200_response_inner.rb
|
@@ -140,10 +142,9 @@ files:
|
|
140
142
|
- lib/snaptrade/models/manual_trade_and_impact.rb
|
141
143
|
- lib/snaptrade/models/manual_trade_balance.rb
|
142
144
|
- lib/snaptrade/models/manual_trade_form.rb
|
145
|
+
- lib/snaptrade/models/manual_trade_form_bracket.rb
|
143
146
|
- lib/snaptrade/models/manual_trade_form_notional_value.rb
|
144
147
|
- lib/snaptrade/models/manual_trade_form_with_options.rb
|
145
|
-
- lib/snaptrade/models/manual_trade_form_with_options_stop_loss.rb
|
146
|
-
- lib/snaptrade/models/manual_trade_form_with_options_take_profit.rb
|
147
148
|
- lib/snaptrade/models/manual_trade_impact.rb
|
148
149
|
- lib/snaptrade/models/manual_trade_symbol.rb
|
149
150
|
- lib/snaptrade/models/model400_failed_request_response.rb
|
@@ -173,7 +174,6 @@ files:
|
|
173
174
|
- lib/snaptrade/models/options_position.rb
|
174
175
|
- lib/snaptrade/models/options_position_currency.rb
|
175
176
|
- lib/snaptrade/models/options_symbol.rb
|
176
|
-
- lib/snaptrade/models/order_class.rb
|
177
177
|
- lib/snaptrade/models/order_type_strict.rb
|
178
178
|
- lib/snaptrade/models/paginated_universal_activity.rb
|
179
179
|
- lib/snaptrade/models/pagination_details.rb
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- spec/models/account_balance_total_spec.rb
|
238
238
|
- spec/models/account_holdings_account_spec.rb
|
239
239
|
- spec/models/account_holdings_spec.rb
|
240
|
+
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
240
241
|
- spec/models/account_order_record_option_symbol_spec.rb
|
241
242
|
- spec/models/account_order_record_spec.rb
|
242
243
|
- spec/models/account_order_record_status_spec.rb
|
@@ -261,6 +262,7 @@ files:
|
|
261
262
|
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
262
263
|
- spec/models/brokerage_spec.rb
|
263
264
|
- spec/models/brokerage_type_spec.rb
|
265
|
+
- spec/models/child_brokerage_order_ids_spec.rb
|
264
266
|
- spec/models/connection_portal_version_spec.rb
|
265
267
|
- spec/models/connection_type_spec.rb
|
266
268
|
- spec/models/connections_session_events200_response_inner_spec.rb
|
@@ -276,11 +278,10 @@ files:
|
|
276
278
|
- spec/models/login_redirect_uri_spec.rb
|
277
279
|
- spec/models/manual_trade_and_impact_spec.rb
|
278
280
|
- spec/models/manual_trade_balance_spec.rb
|
281
|
+
- spec/models/manual_trade_form_bracket_spec.rb
|
279
282
|
- spec/models/manual_trade_form_notional_value_spec.rb
|
280
283
|
- spec/models/manual_trade_form_spec.rb
|
281
284
|
- spec/models/manual_trade_form_with_options_spec.rb
|
282
|
-
- spec/models/manual_trade_form_with_options_stop_loss_spec.rb
|
283
|
-
- spec/models/manual_trade_form_with_options_take_profit_spec.rb
|
284
285
|
- spec/models/manual_trade_impact_spec.rb
|
285
286
|
- spec/models/manual_trade_spec.rb
|
286
287
|
- spec/models/manual_trade_symbol_spec.rb
|
@@ -311,7 +312,6 @@ files:
|
|
311
312
|
- spec/models/options_position_currency_spec.rb
|
312
313
|
- spec/models/options_position_spec.rb
|
313
314
|
- spec/models/options_symbol_spec.rb
|
314
|
-
- spec/models/order_class_spec.rb
|
315
315
|
- spec/models/order_type_strict_spec.rb
|
316
316
|
- spec/models/paginated_universal_activity_spec.rb
|
317
317
|
- spec/models/pagination_details_spec.rb
|
@@ -397,6 +397,7 @@ test_files:
|
|
397
397
|
- spec/configuration_spec.rb
|
398
398
|
- spec/getting_started_spec.rb
|
399
399
|
- spec/models/symbols_quotes_inner_spec.rb
|
400
|
+
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
400
401
|
- spec/models/account_order_record_status_spec.rb
|
401
402
|
- spec/models/rate_of_return_object_spec.rb
|
402
403
|
- spec/models/partner_data_spec.rb
|
@@ -415,7 +416,6 @@ test_files:
|
|
415
416
|
- spec/models/manual_trade_and_impact_spec.rb
|
416
417
|
- spec/models/validated_trade_body_spec.rb
|
417
418
|
- spec/models/exchange_rate_pairs_spec.rb
|
418
|
-
- spec/models/manual_trade_form_with_options_take_profit_spec.rb
|
419
419
|
- spec/models/strategy_order_record_spec.rb
|
420
420
|
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
421
421
|
- spec/models/model425_failed_request_response_spec.rb
|
@@ -486,8 +486,8 @@ test_files:
|
|
486
486
|
- spec/models/manual_trade_form_with_options_spec.rb
|
487
487
|
- spec/models/options_position_spec.rb
|
488
488
|
- spec/models/position_symbol_spec.rb
|
489
|
+
- spec/models/child_brokerage_order_ids_spec.rb
|
489
490
|
- spec/models/options_get_option_strategy_request_spec.rb
|
490
|
-
- spec/models/manual_trade_form_with_options_stop_loss_spec.rb
|
491
491
|
- spec/models/action_strict_with_options_spec.rb
|
492
492
|
- spec/models/currency_spec.rb
|
493
493
|
- spec/models/symbol_query_spec.rb
|
@@ -495,11 +495,11 @@ test_files:
|
|
495
495
|
- spec/models/model402_brokerage_auth_disabled_response_spec.rb
|
496
496
|
- spec/models/trading_cancel_user_account_order_request_spec.rb
|
497
497
|
- spec/models/underlying_symbol_spec.rb
|
498
|
-
- spec/models/order_class_spec.rb
|
499
498
|
- spec/models/model400_failed_request_response_spec.rb
|
500
499
|
- spec/models/net_dividend_spec.rb
|
501
500
|
- spec/models/user_i_dand_secret_spec.rb
|
502
501
|
- spec/models/account_simple_spec.rb
|
502
|
+
- spec/models/manual_trade_form_bracket_spec.rb
|
503
503
|
- spec/models/options_place_option_strategy_request_spec.rb
|
504
504
|
- spec/models/position_spec.rb
|
505
505
|
- spec/models/holdings_status_spec.rb
|
@@ -1,37 +0,0 @@
|
|
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
|
-
class OrderClass
|
15
|
-
SIMPLE = "SIMPLE".freeze
|
16
|
-
BRACKET = "BRACKET".freeze
|
17
|
-
|
18
|
-
def self.all_vars
|
19
|
-
@all_vars ||= [SIMPLE, BRACKET].freeze
|
20
|
-
end
|
21
|
-
|
22
|
-
# Builds the enum from string
|
23
|
-
# @param [String] The enum value in the form of the string
|
24
|
-
# @return [String] The enum value
|
25
|
-
def self.build_from_hash(value)
|
26
|
-
new.build_from_hash(value)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Builds the enum from string
|
30
|
-
# @param [String] The enum value in the form of the string
|
31
|
-
# @return [String] The enum value
|
32
|
-
def build_from_hash(value)
|
33
|
-
return value if OrderClass.all_vars.include?(value)
|
34
|
-
raise "Invalid ENUM value #{value} for class #OrderClass"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,29 +0,0 @@
|
|
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::ManualTradeFormWithOptionsTakeProfit
|
15
|
-
describe SnapTrade::ManualTradeFormWithOptionsTakeProfit do
|
16
|
-
let(:instance) { SnapTrade::ManualTradeFormWithOptionsTakeProfit.new }
|
17
|
-
|
18
|
-
describe 'test an instance of ManualTradeFormWithOptionsTakeProfit' do
|
19
|
-
it 'should create an instance of ManualTradeFormWithOptionsTakeProfit' do
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::ManualTradeFormWithOptionsTakeProfit)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
describe 'test attribute "limit_price"' 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
|
-
end
|
@@ -1,23 +0,0 @@
|
|
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::OrderClass
|
15
|
-
describe SnapTrade::OrderClass do
|
16
|
-
let(:instance) { SnapTrade::OrderClass.new }
|
17
|
-
|
18
|
-
describe 'test an instance of OrderClass' do
|
19
|
-
it 'should create an instance of OrderClass' do
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::OrderClass)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|