snaptrade 2.0.82 → 2.0.84

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +375 -23
  4. data/lib/snaptrade/api/crypto_spot_trading_api.rb +698 -0
  5. data/lib/snaptrade/api/trading_api.rb +158 -16
  6. data/lib/snaptrade/models/account_order_record.rb +14 -4
  7. data/lib/snaptrade/models/account_order_record_child_brokerage_order_ids.rb +234 -0
  8. data/lib/snaptrade/models/brokerage_authorization_type_read_only.rb +1 -1
  9. data/lib/snaptrade/models/{order_class.rb → brokerage_authorization_type_read_only_type.rb} +6 -6
  10. data/lib/snaptrade/models/child_brokerage_order_ids.rb +227 -0
  11. data/lib/snaptrade/models/{manual_trade_form_with_options_take_profit.rb → crypto_spot_order_preview.rb} +11 -17
  12. data/lib/snaptrade/models/crypto_spot_order_preview_estimated_fee.rb +237 -0
  13. data/lib/snaptrade/models/crypto_spot_order_request_body_time_in_force.rb +39 -0
  14. data/lib/snaptrade/models/crypto_spot_quote.rb +257 -0
  15. data/lib/snaptrade/models/cryptocurrency_pair.rb +238 -0
  16. data/lib/snaptrade/models/manual_trade_form_bracket.rb +343 -0
  17. data/lib/snaptrade/models/manual_trade_form_with_options.rb +6 -37
  18. data/lib/snaptrade/models/{manual_trade_form_with_options_stop_loss.rb → trading_crypto_spot_cancel_order_request.rb} +16 -27
  19. data/lib/snaptrade/models/trading_crypto_spot_place_order_request.rb +321 -0
  20. data/lib/snaptrade/models/trading_crypto_spot_symbols200_response.rb +224 -0
  21. data/lib/snaptrade/models/type.rb +7 -3
  22. data/lib/snaptrade/version.rb +1 -1
  23. data/lib/snaptrade.rb +15 -3
  24. data/spec/api/crypto_spot_trading_api_spec.rb +107 -0
  25. data/spec/api/trading_api_spec.rb +14 -0
  26. data/spec/models/account_order_record_child_brokerage_order_ids_spec.rb +35 -0
  27. data/spec/models/account_order_record_spec.rb +6 -0
  28. data/spec/models/brokerage_authorization_type_read_only_type_spec.rb +23 -0
  29. data/spec/models/child_brokerage_order_ids_spec.rb +35 -0
  30. data/spec/models/{manual_trade_form_with_options_stop_loss_spec.rb → crypto_spot_order_preview_estimated_fee_spec.rb} +8 -8
  31. data/spec/models/crypto_spot_order_preview_spec.rb +29 -0
  32. data/spec/models/crypto_spot_order_request_body_time_in_force_spec.rb +23 -0
  33. data/spec/models/crypto_spot_quote_spec.rb +47 -0
  34. data/spec/models/cryptocurrency_pair_spec.rb +35 -0
  35. data/spec/models/manual_trade_form_bracket_spec.rb +83 -0
  36. data/spec/models/manual_trade_form_with_options_spec.rb +0 -18
  37. data/spec/models/trading_crypto_spot_cancel_order_request_spec.rb +29 -0
  38. data/spec/models/trading_crypto_spot_place_order_request_spec.rb +77 -0
  39. data/spec/models/trading_crypto_spot_symbols200_response_spec.rb +29 -0
  40. metadata +41 -11
  41. data/spec/models/manual_trade_form_with_options_take_profit_spec.rb +0 -29
  42. data/spec/models/order_class_spec.rb +0 -23
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.82
4
+ version: 2.0.84
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-06 00:00:00.000000000 Z
11
+ date: 2025-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -87,6 +87,7 @@ files:
87
87
  - lib/snaptrade/api/api_status_api.rb
88
88
  - lib/snaptrade/api/authentication_api.rb
89
89
  - lib/snaptrade/api/connections_api.rb
90
+ - lib/snaptrade/api/crypto_spot_trading_api.rb
90
91
  - lib/snaptrade/api/options_api.rb
91
92
  - lib/snaptrade/api/reference_data_api.rb
92
93
  - lib/snaptrade/api/trading_api.rb
@@ -101,6 +102,7 @@ files:
101
102
  - lib/snaptrade/models/account_holdings.rb
102
103
  - lib/snaptrade/models/account_holdings_account.rb
103
104
  - lib/snaptrade/models/account_order_record.rb
105
+ - lib/snaptrade/models/account_order_record_child_brokerage_order_ids.rb
104
106
  - lib/snaptrade/models/account_order_record_option_symbol.rb
105
107
  - lib/snaptrade/models/account_order_record_status.rb
106
108
  - lib/snaptrade/models/account_order_record_universal_symbol.rb
@@ -122,10 +124,17 @@ files:
122
124
  - lib/snaptrade/models/brokerage_authorization_refresh_confirmation.rb
123
125
  - lib/snaptrade/models/brokerage_authorization_type_read_only.rb
124
126
  - lib/snaptrade/models/brokerage_authorization_type_read_only_brokerage.rb
127
+ - lib/snaptrade/models/brokerage_authorization_type_read_only_type.rb
125
128
  - lib/snaptrade/models/brokerage_type.rb
129
+ - lib/snaptrade/models/child_brokerage_order_ids.rb
126
130
  - lib/snaptrade/models/connection_portal_version.rb
127
131
  - lib/snaptrade/models/connection_type.rb
128
132
  - lib/snaptrade/models/connections_session_events200_response_inner.rb
133
+ - lib/snaptrade/models/crypto_spot_order_preview.rb
134
+ - lib/snaptrade/models/crypto_spot_order_preview_estimated_fee.rb
135
+ - lib/snaptrade/models/crypto_spot_order_request_body_time_in_force.rb
136
+ - lib/snaptrade/models/crypto_spot_quote.rb
137
+ - lib/snaptrade/models/cryptocurrency_pair.rb
129
138
  - lib/snaptrade/models/currency.rb
130
139
  - lib/snaptrade/models/delete_user_response.rb
131
140
  - lib/snaptrade/models/dividend_at_date.rb
@@ -140,10 +149,9 @@ files:
140
149
  - lib/snaptrade/models/manual_trade_and_impact.rb
141
150
  - lib/snaptrade/models/manual_trade_balance.rb
142
151
  - lib/snaptrade/models/manual_trade_form.rb
152
+ - lib/snaptrade/models/manual_trade_form_bracket.rb
143
153
  - lib/snaptrade/models/manual_trade_form_notional_value.rb
144
154
  - 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
155
  - lib/snaptrade/models/manual_trade_impact.rb
148
156
  - lib/snaptrade/models/manual_trade_symbol.rb
149
157
  - lib/snaptrade/models/model400_failed_request_response.rb
@@ -173,7 +181,6 @@ files:
173
181
  - lib/snaptrade/models/options_position.rb
174
182
  - lib/snaptrade/models/options_position_currency.rb
175
183
  - lib/snaptrade/models/options_symbol.rb
176
- - lib/snaptrade/models/order_class.rb
177
184
  - lib/snaptrade/models/order_type_strict.rb
178
185
  - lib/snaptrade/models/paginated_universal_activity.rb
179
186
  - lib/snaptrade/models/pagination_details.rb
@@ -210,6 +217,9 @@ files:
210
217
  - lib/snaptrade/models/time_in_force_strict.rb
211
218
  - lib/snaptrade/models/timeframe.rb
212
219
  - lib/snaptrade/models/trading_cancel_user_account_order_request.rb
220
+ - lib/snaptrade/models/trading_crypto_spot_cancel_order_request.rb
221
+ - lib/snaptrade/models/trading_crypto_spot_place_order_request.rb
222
+ - lib/snaptrade/models/trading_crypto_spot_symbols200_response.rb
213
223
  - lib/snaptrade/models/transactions_status.rb
214
224
  - lib/snaptrade/models/type.rb
215
225
  - lib/snaptrade/models/underlying_symbol.rb
@@ -226,6 +236,7 @@ files:
226
236
  - spec/api/api_status_api_spec.rb
227
237
  - spec/api/authentication_api_spec.rb
228
238
  - spec/api/connections_api_spec.rb
239
+ - spec/api/crypto_spot_trading_api_spec.rb
229
240
  - spec/api/options_api_spec.rb
230
241
  - spec/api/reference_data_api_spec.rb
231
242
  - spec/api/trading_api_spec.rb
@@ -237,6 +248,7 @@ files:
237
248
  - spec/models/account_balance_total_spec.rb
238
249
  - spec/models/account_holdings_account_spec.rb
239
250
  - spec/models/account_holdings_spec.rb
251
+ - spec/models/account_order_record_child_brokerage_order_ids_spec.rb
240
252
  - spec/models/account_order_record_option_symbol_spec.rb
241
253
  - spec/models/account_order_record_spec.rb
242
254
  - spec/models/account_order_record_status_spec.rb
@@ -259,11 +271,18 @@ files:
259
271
  - spec/models/brokerage_authorization_spec.rb
260
272
  - spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
261
273
  - spec/models/brokerage_authorization_type_read_only_spec.rb
274
+ - spec/models/brokerage_authorization_type_read_only_type_spec.rb
262
275
  - spec/models/brokerage_spec.rb
263
276
  - spec/models/brokerage_type_spec.rb
277
+ - spec/models/child_brokerage_order_ids_spec.rb
264
278
  - spec/models/connection_portal_version_spec.rb
265
279
  - spec/models/connection_type_spec.rb
266
280
  - spec/models/connections_session_events200_response_inner_spec.rb
281
+ - spec/models/crypto_spot_order_preview_estimated_fee_spec.rb
282
+ - spec/models/crypto_spot_order_preview_spec.rb
283
+ - spec/models/crypto_spot_order_request_body_time_in_force_spec.rb
284
+ - spec/models/crypto_spot_quote_spec.rb
285
+ - spec/models/cryptocurrency_pair_spec.rb
267
286
  - spec/models/currency_spec.rb
268
287
  - spec/models/delete_user_response_spec.rb
269
288
  - spec/models/dividend_at_date_spec.rb
@@ -276,11 +295,10 @@ files:
276
295
  - spec/models/login_redirect_uri_spec.rb
277
296
  - spec/models/manual_trade_and_impact_spec.rb
278
297
  - spec/models/manual_trade_balance_spec.rb
298
+ - spec/models/manual_trade_form_bracket_spec.rb
279
299
  - spec/models/manual_trade_form_notional_value_spec.rb
280
300
  - spec/models/manual_trade_form_spec.rb
281
301
  - 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
302
  - spec/models/manual_trade_impact_spec.rb
285
303
  - spec/models/manual_trade_spec.rb
286
304
  - spec/models/manual_trade_symbol_spec.rb
@@ -311,7 +329,6 @@ files:
311
329
  - spec/models/options_position_currency_spec.rb
312
330
  - spec/models/options_position_spec.rb
313
331
  - spec/models/options_symbol_spec.rb
314
- - spec/models/order_class_spec.rb
315
332
  - spec/models/order_type_strict_spec.rb
316
333
  - spec/models/paginated_universal_activity_spec.rb
317
334
  - spec/models/pagination_details_spec.rb
@@ -348,6 +365,9 @@ files:
348
365
  - spec/models/time_in_force_strict_spec.rb
349
366
  - spec/models/timeframe_spec.rb
350
367
  - spec/models/trading_cancel_user_account_order_request_spec.rb
368
+ - spec/models/trading_crypto_spot_cancel_order_request_spec.rb
369
+ - spec/models/trading_crypto_spot_place_order_request_spec.rb
370
+ - spec/models/trading_crypto_spot_symbols200_response_spec.rb
351
371
  - spec/models/transactions_status_spec.rb
352
372
  - spec/models/type_spec.rb
353
373
  - spec/models/underlying_symbol_exchange_spec.rb
@@ -387,6 +407,7 @@ summary: SnapTrade Ruby Gem
387
407
  test_files:
388
408
  - spec/api/options_api_spec.rb
389
409
  - spec/api/transactions_and_reporting_api_spec.rb
410
+ - spec/api/crypto_spot_trading_api_spec.rb
390
411
  - spec/api/account_information_api_spec.rb
391
412
  - spec/api/connections_api_spec.rb
392
413
  - spec/api/api_status_api_spec.rb
@@ -397,6 +418,7 @@ test_files:
397
418
  - spec/configuration_spec.rb
398
419
  - spec/getting_started_spec.rb
399
420
  - spec/models/symbols_quotes_inner_spec.rb
421
+ - spec/models/account_order_record_child_brokerage_order_ids_spec.rb
400
422
  - spec/models/account_order_record_status_spec.rb
401
423
  - spec/models/rate_of_return_object_spec.rb
402
424
  - spec/models/partner_data_spec.rb
@@ -414,10 +436,11 @@ test_files:
414
436
  - spec/models/options_position_currency_spec.rb
415
437
  - spec/models/manual_trade_and_impact_spec.rb
416
438
  - spec/models/validated_trade_body_spec.rb
439
+ - spec/models/trading_crypto_spot_symbols200_response_spec.rb
417
440
  - spec/models/exchange_rate_pairs_spec.rb
418
- - spec/models/manual_trade_form_with_options_take_profit_spec.rb
419
441
  - spec/models/strategy_order_record_spec.rb
420
442
  - spec/models/option_chain_inner_chain_per_root_inner_spec.rb
443
+ - spec/models/crypto_spot_order_request_body_time_in_force_spec.rb
421
444
  - spec/models/model425_failed_request_response_spec.rb
422
445
  - spec/models/underlying_symbol_exchange_spec.rb
423
446
  - spec/models/symbol_exchange_spec.rb
@@ -454,6 +477,7 @@ test_files:
454
477
  - spec/models/past_value_spec.rb
455
478
  - spec/models/account_order_record_universal_symbol_spec.rb
456
479
  - spec/models/us_exchange_spec.rb
480
+ - spec/models/cryptocurrency_pair_spec.rb
457
481
  - spec/models/model500_unexpected_exception_response_spec.rb
458
482
  - spec/models/session_event_spec.rb
459
483
  - spec/models/account_holdings_spec.rb
@@ -464,10 +488,13 @@ test_files:
464
488
  - spec/models/symbol_figi_instrument_spec.rb
465
489
  - spec/models/strategy_quotes_spec.rb
466
490
  - spec/models/monthly_dividends_spec.rb
491
+ - spec/models/trading_crypto_spot_place_order_request_spec.rb
467
492
  - spec/models/snap_trade_register_user_request_body_spec.rb
493
+ - spec/models/crypto_spot_order_preview_spec.rb
468
494
  - spec/models/status_spec.rb
469
495
  - spec/models/account_sync_status_spec.rb
470
496
  - spec/models/account_balance_total_spec.rb
497
+ - spec/models/trading_crypto_spot_cancel_order_request_spec.rb
471
498
  - spec/models/take_profit_spec.rb
472
499
  - spec/models/balance_currency_spec.rb
473
500
  - spec/models/option_type_spec.rb
@@ -486,8 +513,8 @@ test_files:
486
513
  - spec/models/manual_trade_form_with_options_spec.rb
487
514
  - spec/models/options_position_spec.rb
488
515
  - spec/models/position_symbol_spec.rb
516
+ - spec/models/child_brokerage_order_ids_spec.rb
489
517
  - spec/models/options_get_option_strategy_request_spec.rb
490
- - spec/models/manual_trade_form_with_options_stop_loss_spec.rb
491
518
  - spec/models/action_strict_with_options_spec.rb
492
519
  - spec/models/currency_spec.rb
493
520
  - spec/models/symbol_query_spec.rb
@@ -495,19 +522,21 @@ test_files:
495
522
  - spec/models/model402_brokerage_auth_disabled_response_spec.rb
496
523
  - spec/models/trading_cancel_user_account_order_request_spec.rb
497
524
  - spec/models/underlying_symbol_spec.rb
498
- - spec/models/order_class_spec.rb
499
525
  - spec/models/model400_failed_request_response_spec.rb
500
526
  - spec/models/net_dividend_spec.rb
501
527
  - spec/models/user_i_dand_secret_spec.rb
502
528
  - spec/models/account_simple_spec.rb
529
+ - spec/models/manual_trade_form_bracket_spec.rb
503
530
  - spec/models/options_place_option_strategy_request_spec.rb
504
531
  - spec/models/position_spec.rb
505
532
  - spec/models/holdings_status_spec.rb
506
533
  - spec/models/recent_orders_response_spec.rb
534
+ - spec/models/crypto_spot_order_preview_estimated_fee_spec.rb
507
535
  - spec/models/encrypted_response_encrypted_message_data_spec.rb
508
536
  - spec/models/manual_trade_form_notional_value_spec.rb
509
537
  - spec/models/dividend_at_date_spec.rb
510
538
  - spec/models/option_chain_inner_spec.rb
539
+ - spec/models/brokerage_authorization_type_read_only_type_spec.rb
511
540
  - spec/models/connection_portal_version_spec.rb
512
541
  - spec/models/figi_instrument_spec.rb
513
542
  - spec/models/order_type_strict_spec.rb
@@ -520,5 +549,6 @@ test_files:
520
549
  - spec/models/manual_trade_spec.rb
521
550
  - spec/models/brokerage_authorization_type_read_only_spec.rb
522
551
  - spec/models/option_brokerage_symbol_spec.rb
552
+ - spec/models/crypto_spot_quote_spec.rb
523
553
  - spec/models/manual_trade_symbol_spec.rb
524
554
  - spec/spec_helper.rb
@@ -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