snaptrade 1.16.3 → 1.17.0

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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +12 -20
  3. data/README.md +5 -5
  4. data/docs/AccountHoldings.md +2 -2
  5. data/docs/AccountHoldingsAccount.md +2 -2
  6. data/docs/AccountInformationApi.md +64 -64
  7. data/docs/AccountOrderRecord.md +2 -2
  8. data/docs/AuthenticationApi.md +32 -32
  9. data/docs/Balance.md +1 -1
  10. data/docs/Brokerage.md +1 -1
  11. data/docs/BrokerageAuthorization.md +1 -1
  12. data/docs/BrokerageAuthorizationTypeReadOnly.md +1 -1
  13. data/docs/BrokerageSymbol.md +1 -1
  14. data/docs/BrokerageSymbolOptionSymbol.md +1 -1
  15. data/docs/BrokerageSymbolSymbol.md +7 -7
  16. data/docs/ConnectionsApi.md +30 -30
  17. data/docs/EncryptedResponse.md +1 -1
  18. data/docs/ErrorLogsApi.md +6 -6
  19. data/docs/ExchangeRatePairs.md +2 -2
  20. data/docs/ExcludedAsset.md +1 -1
  21. data/docs/ManualTrade.md +1 -1
  22. data/docs/ManualTradeAndImpact.md +2 -2
  23. data/docs/ManualTradeBalance.md +2 -2
  24. data/docs/ManualTradeSymbol.md +1 -1
  25. data/docs/ModelAssetClassDetails.md +1 -1
  26. data/docs/ModelAssetClassTarget.md +1 -1
  27. data/docs/ModelPortfolioAssetClass.md +1 -1
  28. data/docs/ModelPortfolioDetails.md +1 -1
  29. data/docs/ModelPortfolioSecurity.md +1 -1
  30. data/docs/MonthlyDividends.md +1 -1
  31. data/docs/NetContributions.md +1 -1
  32. data/docs/NetDividend.md +1 -1
  33. data/docs/OptionStrategy.md +1 -1
  34. data/docs/OptionsApi.md +58 -58
  35. data/docs/OptionsHoldings.md +2 -2
  36. data/docs/OptionsPosition.md +1 -1
  37. data/docs/OptionsSymbol.md +1 -1
  38. data/docs/PastValue.md +1 -1
  39. data/docs/PerformanceCustom.md +1 -1
  40. data/docs/PortfolioGroupInfo.md +1 -1
  41. data/docs/PortfolioGroupPosition.md +1 -1
  42. data/docs/PortfolioGroupSettings.md +1 -1
  43. data/docs/Position.md +1 -1
  44. data/docs/PositionSymbol.md +1 -1
  45. data/docs/ReferenceDataApi.md +28 -28
  46. data/docs/SnapTradeHoldingsAccount.md +1 -1
  47. data/docs/StrategyOrderRecord.md +1 -1
  48. data/docs/StrategyQuotes.md +2 -2
  49. data/docs/SubPeriodReturnRate.md +2 -2
  50. data/docs/Symbol.md +3 -3
  51. data/docs/SymbolsQuotesInner.md +1 -1
  52. data/docs/TargetAsset.md +1 -1
  53. data/docs/Trade.md +3 -3
  54. data/docs/TradeExecutionStatus.md +3 -3
  55. data/docs/TradeImpact.md +2 -2
  56. data/docs/TradingApi.md +84 -84
  57. data/docs/TransactionsAndReportingApi.md +32 -32
  58. data/docs/TransactionsStatus.md +1 -1
  59. data/docs/UnderlyingSymbol.md +3 -3
  60. data/docs/UniversalActivity.md +5 -5
  61. data/docs/UniversalSymbol.md +7 -7
  62. data/docs/UniversalSymbolTicker.md +3 -3
  63. data/docs/UserSettings.md +1 -1
  64. data/header.png +0 -0
  65. data/lib/snaptrade/api/account_information_api.rb +0 -16
  66. data/lib/snaptrade/api/api_status_api.rb +0 -2
  67. data/lib/snaptrade/api/authentication_api.rb +0 -10
  68. data/lib/snaptrade/api/connections_api.rb +0 -8
  69. data/lib/snaptrade/api/error_logs_api.rb +0 -2
  70. data/lib/snaptrade/api/options_api.rb +0 -10
  71. data/lib/snaptrade/api/reference_data_api.rb +0 -22
  72. data/lib/snaptrade/api/trading_api.rb +0 -12
  73. data/lib/snaptrade/api/transactions_and_reporting_api.rb +0 -4
  74. data/lib/snaptrade/models/brokerage_symbol_symbol.rb +30 -0
  75. data/lib/snaptrade/models/universal_activity.rb +1 -1
  76. data/lib/snaptrade/models/universal_symbol.rb +30 -0
  77. data/lib/snaptrade/version.rb +1 -1
  78. metadata +4 -3
@@ -29,7 +29,6 @@ module SnapTrade
29
29
  _body = {}
30
30
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
31
31
  trading_cancel_user_account_order_request = _body
32
-
33
32
  data, _status_code, _headers = cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
34
33
  data
35
34
  end
@@ -45,7 +44,6 @@ module SnapTrade
45
44
  _body = {}
46
45
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
47
46
  trading_cancel_user_account_order_request = _body
48
-
49
47
  cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
50
48
  end
51
49
 
@@ -160,7 +158,6 @@ module SnapTrade
160
158
  _body[:units] = units if units != SENTINEL
161
159
  _body[:universal_symbol_id] = universal_symbol_id if universal_symbol_id != SENTINEL
162
160
  manual_trade_form = _body
163
-
164
161
  data, _status_code, _headers = get_order_impact_with_http_info_impl(user_id, user_secret, manual_trade_form, extra)
165
162
  data
166
163
  end
@@ -189,7 +186,6 @@ module SnapTrade
189
186
  _body[:units] = units if units != SENTINEL
190
187
  _body[:universal_symbol_id] = universal_symbol_id if universal_symbol_id != SENTINEL
191
188
  manual_trade_form = _body
192
-
193
189
  get_order_impact_with_http_info_impl(user_id, user_secret, manual_trade_form, extra)
194
190
  end
195
191
 
@@ -283,7 +279,6 @@ module SnapTrade
283
279
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
284
280
  def get_user_account_quotes(user_id:, user_secret:, symbols:, account_id:, use_ticker: SENTINEL, extra: {})
285
281
  extra[:use_ticker] = use_ticker if use_ticker != SENTINEL
286
-
287
282
  data, _status_code, _headers = get_user_account_quotes_with_http_info_impl(user_id, user_secret, symbols, account_id, extra)
288
283
  data
289
284
  end
@@ -297,7 +292,6 @@ module SnapTrade
297
292
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
298
293
  def get_user_account_quotes_with_http_info(user_id:, user_secret:, symbols:, account_id:, use_ticker: SENTINEL, extra: {})
299
294
  extra[:use_ticker] = use_ticker if use_ticker != SENTINEL
300
-
301
295
  get_user_account_quotes_with_http_info_impl(user_id, user_secret, symbols, account_id, extra)
302
296
  end
303
297
 
@@ -411,7 +405,6 @@ module SnapTrade
411
405
  _body[:units] = units if units != SENTINEL
412
406
  _body[:universal_symbol_id] = universal_symbol_id if universal_symbol_id != SENTINEL
413
407
  manual_trade_form = _body
414
-
415
408
  data, _status_code, _headers = place_force_order_with_http_info_impl(user_id, user_secret, manual_trade_form, extra)
416
409
  data
417
410
  end
@@ -440,7 +433,6 @@ module SnapTrade
440
433
  _body[:units] = units if units != SENTINEL
441
434
  _body[:universal_symbol_id] = universal_symbol_id if universal_symbol_id != SENTINEL
442
435
  manual_trade_form = _body
443
-
444
436
  place_force_order_with_http_info_impl(user_id, user_secret, manual_trade_form, extra)
445
437
  end
446
438
 
@@ -537,7 +529,6 @@ module SnapTrade
537
529
  _body[:first_trade_id] = first_trade_id if first_trade_id != SENTINEL
538
530
  _body[:second_trade_id] = second_trade_id if second_trade_id != SENTINEL
539
531
  trading_place_oco_order_request = _body
540
-
541
532
  data, _status_code, _headers = place_oco_order_with_http_info_impl(user_id, user_secret, trading_place_oco_order_request, extra)
542
533
  data
543
534
  end
@@ -554,7 +545,6 @@ module SnapTrade
554
545
  _body[:first_trade_id] = first_trade_id if first_trade_id != SENTINEL
555
546
  _body[:second_trade_id] = second_trade_id if second_trade_id != SENTINEL
556
547
  trading_place_oco_order_request = _body
557
-
558
548
  place_oco_order_with_http_info_impl(user_id, user_secret, trading_place_oco_order_request, extra)
559
549
  end
560
550
 
@@ -645,7 +635,6 @@ module SnapTrade
645
635
  # @param user_secret [String]
646
636
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
647
637
  def place_order(trade_id:, user_id:, user_secret:, extra: {})
648
-
649
638
  data, _status_code, _headers = place_order_with_http_info_impl(trade_id, user_id, user_secret, extra)
650
639
  data
651
640
  end
@@ -656,7 +645,6 @@ module SnapTrade
656
645
  # @param user_secret [String]
657
646
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
658
647
  def place_order_with_http_info(trade_id:, user_id:, user_secret:, extra: {})
659
-
660
648
  place_order_with_http_info_impl(trade_id, user_id, user_secret, extra)
661
649
  end
662
650
 
@@ -34,7 +34,6 @@ module SnapTrade
34
34
  extra[:accounts] = accounts if accounts != SENTINEL
35
35
  extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
36
36
  extra[:type] = type if type != SENTINEL
37
-
38
37
  data, _status_code, _headers = get_activities_with_http_info_impl(user_id, user_secret, extra)
39
38
  data
40
39
  end
@@ -55,7 +54,6 @@ module SnapTrade
55
54
  extra[:accounts] = accounts if accounts != SENTINEL
56
55
  extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
57
56
  extra[:type] = type if type != SENTINEL
58
-
59
57
  get_activities_with_http_info_impl(user_id, user_secret, extra)
60
58
  end
61
59
 
@@ -160,7 +158,6 @@ module SnapTrade
160
158
  extra[:accounts] = accounts if accounts != SENTINEL
161
159
  extra[:detailed] = detailed if detailed != SENTINEL
162
160
  extra[:frequency] = frequency if frequency != SENTINEL
163
-
164
161
  data, _status_code, _headers = get_reporting_custom_range_with_http_info_impl(start_date, end_date, user_id, user_secret, extra)
165
162
  data
166
163
  end
@@ -179,7 +176,6 @@ module SnapTrade
179
176
  extra[:accounts] = accounts if accounts != SENTINEL
180
177
  extra[:detailed] = detailed if detailed != SENTINEL
181
178
  extra[:frequency] = frequency if frequency != SENTINEL
182
-
183
179
  get_reporting_custom_range_with_http_info_impl(start_date, end_date, user_id, user_secret, extra)
184
180
  end
185
181
 
@@ -130,12 +130,42 @@ module SnapTrade
130
130
  # @return Array for valid properties with the reasons
131
131
  def list_invalid_properties
132
132
  invalid_properties = Array.new
133
+ if @id.nil?
134
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
135
+ end
136
+
137
+ if @symbol.nil?
138
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
139
+ end
140
+
141
+ if @raw_symbol.nil?
142
+ invalid_properties.push('invalid value for "raw_symbol", raw_symbol cannot be nil.')
143
+ end
144
+
145
+ if @currency.nil?
146
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
147
+ end
148
+
149
+ if @type.nil?
150
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
151
+ end
152
+
153
+ if @currencies.nil?
154
+ invalid_properties.push('invalid value for "currencies", currencies cannot be nil.')
155
+ end
156
+
133
157
  invalid_properties
134
158
  end
135
159
 
136
160
  # Check to see if the all the properties in the model are valid
137
161
  # @return true if the model is valid
138
162
  def valid?
163
+ return false if @id.nil?
164
+ return false if @symbol.nil?
165
+ return false if @raw_symbol.nil?
166
+ return false if @currency.nil?
167
+ return false if @type.nil?
168
+ return false if @currencies.nil?
139
169
  true
140
170
  end
141
171
 
@@ -26,7 +26,7 @@ module SnapTrade
26
26
 
27
27
  attr_accessor :fee
28
28
 
29
- # The forex conversion rate involved in the transaction if provided by the brokerage
29
+ # The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency)
30
30
  attr_accessor :fx_rate
31
31
 
32
32
  attr_accessor :institution
@@ -124,12 +124,42 @@ module SnapTrade
124
124
  # @return Array for valid properties with the reasons
125
125
  def list_invalid_properties
126
126
  invalid_properties = Array.new
127
+ if @id.nil?
128
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
129
+ end
130
+
131
+ if @symbol.nil?
132
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
133
+ end
134
+
135
+ if @raw_symbol.nil?
136
+ invalid_properties.push('invalid value for "raw_symbol", raw_symbol cannot be nil.')
137
+ end
138
+
139
+ if @currency.nil?
140
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
141
+ end
142
+
143
+ if @type.nil?
144
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
145
+ end
146
+
147
+ if @currencies.nil?
148
+ invalid_properties.push('invalid value for "currencies", currencies cannot be nil.')
149
+ end
150
+
127
151
  invalid_properties
128
152
  end
129
153
 
130
154
  # Check to see if the all the properties in the model are valid
131
155
  # @return true if the model is valid
132
156
  def valid?
157
+ return false if @id.nil?
158
+ return false if @symbol.nil?
159
+ return false if @raw_symbol.nil?
160
+ return false if @currency.nil?
161
+ return false if @type.nil?
162
+ return false if @currencies.nil?
133
163
  true
134
164
  end
135
165
 
@@ -9,5 +9,5 @@ Contact: api@snaptrade.com
9
9
  =end
10
10
 
11
11
  module SnapTrade
12
- VERSION = '1.16.3'
12
+ VERSION = '1.17.0'
13
13
  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: 1.16.3
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -219,6 +219,7 @@ files:
219
219
  - docs/UserErrorLog.md
220
220
  - docs/UserIDandSecret.md
221
221
  - docs/UserSettings.md
222
+ - header.png
222
223
  - lib/snaptrade.rb
223
224
  - lib/snaptrade/api/account_information_api.rb
224
225
  - lib/snaptrade/api/api_status_api.rb
@@ -527,7 +528,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
527
528
  - !ruby/object:Gem::Version
528
529
  version: '0'
529
530
  requirements: []
530
- rubygems_version: 3.4.10
531
+ rubygems_version: 3.3.7
531
532
  signing_key:
532
533
  specification_version: 4
533
534
  summary: SnapTrade Ruby Gem