snaptrade 2.0.31 → 2.0.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +31 -29
  3. data/README.md +4 -2
  4. data/lib/snaptrade/api/account_information_api.rb +6 -2
  5. data/lib/snaptrade/models/account_holdings_account.rb +1 -1
  6. data/lib/snaptrade/models/account_order_record.rb +4 -2
  7. data/lib/snaptrade/models/exchange.rb +9 -1
  8. data/lib/snaptrade/models/figi_instrument.rb +3 -1
  9. data/lib/snaptrade/models/option_brokerage_symbol.rb +3 -1
  10. data/lib/snaptrade/models/options_position.rb +1 -1
  11. data/lib/snaptrade/models/options_position_currency.rb +1 -0
  12. data/lib/snaptrade/models/options_symbol.rb +12 -24
  13. data/lib/snaptrade/models/position_symbol.rb +6 -1
  14. data/lib/snaptrade/models/security_type.rb +5 -1
  15. data/lib/snaptrade/models/symbol_figi_instrument.rb +2 -0
  16. data/lib/snaptrade/models/underlying_symbol.rb +20 -5
  17. data/lib/snaptrade/models/{model_portfolio.rb → underlying_symbol_exchange.rb} +73 -12
  18. data/lib/snaptrade/models/{brokerage_symbol.rb → underlying_symbol_type.rb} +28 -38
  19. data/lib/snaptrade/models/universal_symbol.rb +9 -3
  20. data/lib/snaptrade/models/{model_asset_class.rb → universal_symbol_currency.rb} +24 -4
  21. data/lib/snaptrade/models/{portfolio_group.rb → universal_symbol_exchange.rb} +78 -7
  22. data/lib/snaptrade/version.rb +1 -1
  23. data/lib/snaptrade.rb +4 -36
  24. data/spec/api/account_information_api_spec.rb +1 -1
  25. data/spec/models/options_symbol_spec.rb +0 -12
  26. data/spec/models/{brokerage_symbol_option_symbol_spec.rb → underlying_symbol_exchange_spec.rb} +14 -14
  27. data/spec/models/underlying_symbol_spec.rb +6 -0
  28. data/spec/models/{trade_impact_spec.rb → underlying_symbol_type_spec.rb} +10 -16
  29. data/spec/models/{model_portfolio_spec.rb → universal_symbol_currency_spec.rb} +8 -8
  30. data/spec/models/{trade_spec.rb → universal_symbol_exchange_spec.rb} +13 -13
  31. metadata +113 -209
  32. data/lib/snaptrade/models/brokerage_authorization_type.rb +0 -216
  33. data/lib/snaptrade/models/brokerage_authorization_type_type.rb +0 -37
  34. data/lib/snaptrade/models/brokerage_symbol_option_symbol.rb +0 -325
  35. data/lib/snaptrade/models/brokerage_symbol_symbol.rb +0 -339
  36. data/lib/snaptrade/models/calculated_trade.rb +0 -228
  37. data/lib/snaptrade/models/excluded_asset.rb +0 -217
  38. data/lib/snaptrade/models/jwt.rb +0 -217
  39. data/lib/snaptrade/models/model_asset_class_details.rb +0 -227
  40. data/lib/snaptrade/models/model_asset_class_target.rb +0 -216
  41. data/lib/snaptrade/models/model_portfolio_asset_class.rb +0 -249
  42. data/lib/snaptrade/models/model_portfolio_details.rb +0 -238
  43. data/lib/snaptrade/models/model_portfolio_security.rb +0 -249
  44. data/lib/snaptrade/models/model_type.rb +0 -38
  45. data/lib/snaptrade/models/portfolio_group_info.rb +0 -325
  46. data/lib/snaptrade/models/portfolio_group_position.rb +0 -237
  47. data/lib/snaptrade/models/portfolio_group_settings.rb +0 -276
  48. data/lib/snaptrade/models/redirect_tokenand_pin.rb +0 -226
  49. data/lib/snaptrade/models/snap_trade_api_disclaimer_accept_status.rb +0 -226
  50. data/lib/snaptrade/models/state.rb +0 -40
  51. data/lib/snaptrade/models/strategy_impact.rb +0 -309
  52. data/lib/snaptrade/models/strategy_impact_legs_inner.rb +0 -270
  53. data/lib/snaptrade/models/strategy_order_place.rb +0 -228
  54. data/lib/snaptrade/models/strategy_order_place_orders_inner.rb +0 -596
  55. data/lib/snaptrade/models/strategy_order_place_orders_inner_legs_inner.rb +0 -270
  56. data/lib/snaptrade/models/target_asset.rb +0 -289
  57. data/lib/snaptrade/models/trade.rb +0 -280
  58. data/lib/snaptrade/models/trade_action.rb +0 -37
  59. data/lib/snaptrade/models/trade_execution_status.rb +0 -297
  60. data/lib/snaptrade/models/trade_execution_status_action.rb +0 -37
  61. data/lib/snaptrade/models/trade_impact.rb +0 -256
  62. data/lib/snaptrade/models/user_error_log.rb +0 -262
  63. data/lib/snaptrade/models/user_settings.rb +0 -298
  64. data/spec/models/brokerage_authorization_type_spec.rb +0 -29
  65. data/spec/models/brokerage_authorization_type_type_spec.rb +0 -23
  66. data/spec/models/brokerage_symbol_spec.rb +0 -59
  67. data/spec/models/brokerage_symbol_symbol_spec.rb +0 -83
  68. data/spec/models/calculated_trade_spec.rb +0 -35
  69. data/spec/models/excluded_asset_spec.rb +0 -29
  70. data/spec/models/jwt_spec.rb +0 -29
  71. data/spec/models/model_asset_class_details_spec.rb +0 -35
  72. data/spec/models/model_asset_class_spec.rb +0 -35
  73. data/spec/models/model_asset_class_target_spec.rb +0 -29
  74. data/spec/models/model_portfolio_asset_class_spec.rb +0 -35
  75. data/spec/models/model_portfolio_details_spec.rb +0 -41
  76. data/spec/models/model_portfolio_security_spec.rb +0 -35
  77. data/spec/models/model_type_spec.rb +0 -23
  78. data/spec/models/portfolio_group_info_spec.rb +0 -89
  79. data/spec/models/portfolio_group_position_spec.rb +0 -41
  80. data/spec/models/portfolio_group_settings_spec.rb +0 -53
  81. data/spec/models/portfolio_group_spec.rb +0 -35
  82. data/spec/models/redirect_tokenand_pin_spec.rb +0 -35
  83. data/spec/models/snap_trade_api_disclaimer_accept_status_spec.rb +0 -35
  84. data/spec/models/state_spec.rb +0 -23
  85. data/spec/models/strategy_impact_legs_inner_spec.rb +0 -65
  86. data/spec/models/strategy_impact_spec.rb +0 -89
  87. data/spec/models/strategy_order_place_orders_inner_legs_inner_spec.rb +0 -65
  88. data/spec/models/strategy_order_place_orders_inner_spec.rb +0 -281
  89. data/spec/models/strategy_order_place_spec.rb +0 -35
  90. data/spec/models/target_asset_spec.rb +0 -59
  91. data/spec/models/trade_action_spec.rb +0 -23
  92. data/spec/models/trade_execution_status_action_spec.rb +0 -23
  93. data/spec/models/trade_execution_status_spec.rb +0 -77
  94. data/spec/models/user_error_log_spec.rb +0 -59
  95. data/spec/models/user_settings_spec.rb +0 -83
@@ -101,7 +101,7 @@ describe 'AccountInformationApi' do
101
101
 
102
102
  # unit tests for get_user_holdings
103
103
  # List account holdings
104
- # Lists balances, positions, option positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
104
+ # Lists balances, positions, option positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
105
105
  # @param account_id
106
106
  # @param user_id
107
107
  # @param user_secret
@@ -62,16 +62,4 @@ describe SnapTrade::OptionsSymbol do
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "local_id"' 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 "exchange_id"' 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
65
  end
@@ -11,13 +11,13 @@ require 'spec_helper'
11
11
  require 'json'
12
12
  require 'date'
13
13
 
14
- # Unit tests for SnapTrade::BrokerageSymbolOptionSymbol
15
- describe SnapTrade::BrokerageSymbolOptionSymbol do
16
- let(:instance) { SnapTrade::BrokerageSymbolOptionSymbol.new }
14
+ # Unit tests for SnapTrade::UnderlyingSymbolExchange
15
+ describe SnapTrade::UnderlyingSymbolExchange do
16
+ let(:instance) { SnapTrade::UnderlyingSymbolExchange.new }
17
17
 
18
- describe 'test an instance of BrokerageSymbolOptionSymbol' do
19
- it 'should create an instance of BrokerageSymbolOptionSymbol' do
20
- expect(instance).to be_instance_of(SnapTrade::BrokerageSymbolOptionSymbol)
18
+ describe 'test an instance of UnderlyingSymbolExchange' do
19
+ it 'should create an instance of UnderlyingSymbolExchange' do
20
+ expect(instance).to be_instance_of(SnapTrade::UnderlyingSymbolExchange)
21
21
  end
22
22
  end
23
23
  describe 'test attribute "id"' do
@@ -26,49 +26,49 @@ describe SnapTrade::BrokerageSymbolOptionSymbol do
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "ticker"' do
29
+ describe 'test attribute "code"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "option_type"' do
35
+ describe 'test attribute "mic_code"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "strike_price"' do
41
+ describe 'test attribute "name"' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
44
  end
45
45
  end
46
46
 
47
- describe 'test attribute "expiration_date"' do
47
+ describe 'test attribute "timezone"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
50
  end
51
51
  end
52
52
 
53
- describe 'test attribute "is_mini_option"' do
53
+ describe 'test attribute "start_time"' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
56
  end
57
57
  end
58
58
 
59
- describe 'test attribute "underlying_symbol"' do
59
+ describe 'test attribute "close_time"' do
60
60
  it 'should work' do
61
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "local_id"' do
65
+ describe 'test attribute "suffix"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end
69
69
  end
70
70
 
71
- describe 'test attribute "exchange_id"' do
71
+ describe 'test attribute "allows_cryptocurrency_symbols"' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
74
  end
@@ -32,6 +32,12 @@ describe SnapTrade::UnderlyingSymbol do
32
32
  end
33
33
  end
34
34
 
35
+ describe 'test attribute "raw_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
+
35
41
  describe 'test attribute "description"' do
36
42
  it 'should work' do
37
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -11,40 +11,34 @@ require 'spec_helper'
11
11
  require 'json'
12
12
  require 'date'
13
13
 
14
- # Unit tests for SnapTrade::TradeImpact
15
- describe SnapTrade::TradeImpact do
16
- let(:instance) { SnapTrade::TradeImpact.new }
14
+ # Unit tests for SnapTrade::UnderlyingSymbolType
15
+ describe SnapTrade::UnderlyingSymbolType do
16
+ let(:instance) { SnapTrade::UnderlyingSymbolType.new }
17
17
 
18
- describe 'test an instance of TradeImpact' do
19
- it 'should create an instance of TradeImpact' do
20
- expect(instance).to be_instance_of(SnapTrade::TradeImpact)
18
+ describe 'test an instance of UnderlyingSymbolType' do
19
+ it 'should create an instance of UnderlyingSymbolType' do
20
+ expect(instance).to be_instance_of(SnapTrade::UnderlyingSymbolType)
21
21
  end
22
22
  end
23
- describe 'test attribute "account"' do
23
+ describe 'test attribute "id"' do
24
24
  it 'should work' do
25
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "currency"' do
29
+ describe 'test attribute "code"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "remaining_cash"' do
35
+ describe 'test attribute "description"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "estimated_commissions"' 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 "forex_fees"' do
41
+ describe 'test attribute "is_supported"' do
48
42
  it 'should work' do
49
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
44
  end
@@ -11,13 +11,13 @@ require 'spec_helper'
11
11
  require 'json'
12
12
  require 'date'
13
13
 
14
- # Unit tests for SnapTrade::ModelPortfolio
15
- describe SnapTrade::ModelPortfolio do
16
- let(:instance) { SnapTrade::ModelPortfolio.new }
14
+ # Unit tests for SnapTrade::UniversalSymbolCurrency
15
+ describe SnapTrade::UniversalSymbolCurrency do
16
+ let(:instance) { SnapTrade::UniversalSymbolCurrency.new }
17
17
 
18
- describe 'test an instance of ModelPortfolio' do
19
- it 'should create an instance of ModelPortfolio' do
20
- expect(instance).to be_instance_of(SnapTrade::ModelPortfolio)
18
+ describe 'test an instance of UniversalSymbolCurrency' do
19
+ it 'should create an instance of UniversalSymbolCurrency' do
20
+ expect(instance).to be_instance_of(SnapTrade::UniversalSymbolCurrency)
21
21
  end
22
22
  end
23
23
  describe 'test attribute "id"' do
@@ -26,13 +26,13 @@ describe SnapTrade::ModelPortfolio do
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "name"' do
29
+ describe 'test attribute "code"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "model_type"' do
35
+ describe 'test attribute "name"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
@@ -11,13 +11,13 @@ require 'spec_helper'
11
11
  require 'json'
12
12
  require 'date'
13
13
 
14
- # Unit tests for SnapTrade::Trade
15
- describe SnapTrade::Trade do
16
- let(:instance) { SnapTrade::Trade.new }
14
+ # Unit tests for SnapTrade::UniversalSymbolExchange
15
+ describe SnapTrade::UniversalSymbolExchange do
16
+ let(:instance) { SnapTrade::UniversalSymbolExchange.new }
17
17
 
18
- describe 'test an instance of Trade' do
19
- it 'should create an instance of Trade' do
20
- expect(instance).to be_instance_of(SnapTrade::Trade)
18
+ describe 'test an instance of UniversalSymbolExchange' do
19
+ it 'should create an instance of UniversalSymbolExchange' do
20
+ expect(instance).to be_instance_of(SnapTrade::UniversalSymbolExchange)
21
21
  end
22
22
  end
23
23
  describe 'test attribute "id"' do
@@ -26,43 +26,43 @@ describe SnapTrade::Trade do
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "account"' do
29
+ describe 'test attribute "code"' do
30
30
  it 'should work' do
31
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
32
  end
33
33
  end
34
34
 
35
- describe 'test attribute "symbol"' do
35
+ describe 'test attribute "mic_code"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "universal_symbol"' do
41
+ describe 'test attribute "name"' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
44
  end
45
45
  end
46
46
 
47
- describe 'test attribute "action"' do
47
+ describe 'test attribute "timezone"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
50
  end
51
51
  end
52
52
 
53
- describe 'test attribute "units"' do
53
+ describe 'test attribute "start_time"' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
56
  end
57
57
  end
58
58
 
59
- describe 'test attribute "price"' do
59
+ describe 'test attribute "close_time"' do
60
60
  it 'should work' do
61
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
62
  end
63
63
  end
64
64
 
65
- describe 'test attribute "sequence"' do
65
+ describe 'test attribute "suffix"' do
66
66
  it 'should work' do
67
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
68
  end