snaptrade 2.0.18 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a363cc77c3f0d1064c2e6f173c15b0526b4a9e5a68bea6e38ef869c6377fd9ad
4
- data.tar.gz: d2f7de1e5805be1d96d2f47d0263889abb5165576a0230d06704e9e223053afd
3
+ metadata.gz: 3c958613ed72d29c4acd1238bbf384d1c91a08577f00fa97f89f8644d272a0d2
4
+ data.tar.gz: 3ff004f0161f765c4b6016780f48dd0523fb64f1ff70295e85962fdbdb7136cf
5
5
  SHA512:
6
- metadata.gz: 1711b6758368a02f9c7b247f9321aac58a7cfc0a1566da2cce4696b36887b352c63e341132395ef1f49e50432917a8ffa40eef197e4804441de448156c1fb6a0
7
- data.tar.gz: d14162342db37f27e21f320f2ef837208895f274105642f13d13baf17ee2f9c87258515611a5e2d338452ae91a43e8c8a2cab18d00cb16e51f35063888abcdf2
6
+ metadata.gz: 0c83408740c4ed256dcf514d3fe4341e5b74118c971e565d44b916fe146a71a2291570330633e9c2cdee9ed475696f26173d03cce5c2796f9f60521590b59456
7
+ data.tar.gz: f428fb791c310d50595ff13b460e2dc9529a5cf87368e83cc3874f4b09537d69bfac031df88e0c4920ad15554c75d11496bb226e306085c41beef85766f8d24d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.17)
4
+ snaptrade (2.0.18)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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
- [![npm](https://img.shields.io/badge/gem-v2.0.18-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.18)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.19-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.19)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -69,7 +69,7 @@ Connect brokerage accounts to your app for live positions and trading
69
69
  Add to Gemfile:
70
70
 
71
71
  ```ruby
72
- gem 'snaptrade', '~> 2.0.18'
72
+ gem 'snaptrade', '~> 2.0.19'
73
73
  ```
74
74
 
75
75
  ## Getting Started<a id="getting-started"></a>
@@ -109,6 +109,7 @@ p.result[3] # [Faraday::Response] Raw HTTP response
109
109
 
110
110
 
111
111
  ### `snaptrade.account_information.get_all_user_holdings`<a id="snaptradeaccount_informationget_all_user_holdings"></a>
112
+ ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
112
113
 
113
114
  Lists balances, positions and orders for the specified account. The data returned is similar to
114
115
  the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
@@ -958,7 +959,7 @@ p result
958
959
 
959
960
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
960
961
 
961
- ##### order_type: [`OrderType`](./lib/snaptrade/models/order_type.rb)<a id="order_type-ordertypelibsnaptrademodelsorder_typerb"></a>
962
+ ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
962
963
  Order Type
963
964
 
964
965
  ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
@@ -1368,7 +1369,7 @@ p result
1368
1369
  ##### action: [`Action`](./lib/snaptrade/models/action.rb)<a id="action-actionlibsnaptrademodelsactionrb"></a>
1369
1370
  Trade Action
1370
1371
 
1371
- ##### order_type: [`OrderType`](./lib/snaptrade/models/order_type.rb)<a id="order_type-ordertypelibsnaptrademodelsorder_typerb"></a>
1372
+ ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
1372
1373
  Order Type
1373
1374
 
1374
1375
  ##### price: `Float`<a id="price-float"></a>
@@ -1471,7 +1472,7 @@ p result
1471
1472
  ##### action: [`Action`](./lib/snaptrade/models/action.rb)<a id="action-actionlibsnaptrademodelsactionrb"></a>
1472
1473
  Trade Action
1473
1474
 
1474
- ##### order_type: [`OrderType`](./lib/snaptrade/models/order_type.rb)<a id="order_type-ordertypelibsnaptrademodelsorder_typerb"></a>
1475
+ ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
1475
1476
  Order Type
1476
1477
 
1477
1478
  ##### price: `Float`<a id="price-float"></a>
@@ -1601,6 +1602,7 @@ FXT
1601
1602
 
1602
1603
 
1603
1604
  ### `snaptrade.transactions_and_reporting.get_reporting_custom_range`<a id="snaptradetransactions_and_reportingget_reporting_custom_range"></a>
1605
+ ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
1604
1606
 
1605
1607
  Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
1606
1608
 
@@ -479,7 +479,7 @@ module SnapTrade
479
479
  #
480
480
  # Places the option strategy order and returns the order record received from the brokerage.
481
481
  #
482
- # @param order_type [OrderType] Order Type
482
+ # @param order_type [OrderTypeStrict] Order Type
483
483
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
484
484
  # @param user_id [String]
485
485
  # @param user_secret [String]
@@ -502,7 +502,7 @@ module SnapTrade
502
502
  #
503
503
  # Places the option strategy order and returns the order record received from the brokerage.
504
504
  #
505
- # @param order_type [OrderType] Order Type
505
+ # @param order_type [OrderTypeStrict] Order Type
506
506
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
507
507
  # @param user_id [String]
508
508
  # @param user_secret [String]
@@ -151,7 +151,7 @@ module SnapTrade
151
151
  # @param user_secret [String]
152
152
  # @param account_id [String]
153
153
  # @param action [Action] Trade Action
154
- # @param order_type [OrderType] Order Type
154
+ # @param order_type [OrderTypeStrict] Order Type
155
155
  # @param price [Float] Trade Price if limit or stop limit order
156
156
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
157
157
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
@@ -184,7 +184,7 @@ module SnapTrade
184
184
  # @param user_secret [String]
185
185
  # @param account_id [String]
186
186
  # @param action [Action] Trade Action
187
- # @param order_type [OrderType] Order Type
187
+ # @param order_type [OrderTypeStrict] Order Type
188
188
  # @param price [Float] Trade Price if limit or stop limit order
189
189
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
190
190
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
@@ -418,7 +418,7 @@ module SnapTrade
418
418
  # @param user_secret [String]
419
419
  # @param account_id [String]
420
420
  # @param action [Action] Trade Action
421
- # @param order_type [OrderType] Order Type
421
+ # @param order_type [OrderTypeStrict] Order Type
422
422
  # @param price [Float] Trade Price if limit or stop limit order
423
423
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
424
424
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
@@ -451,7 +451,7 @@ module SnapTrade
451
451
  # @param user_secret [String]
452
452
  # @param account_id [String]
453
453
  # @param action [Action] Trade Action
454
- # @param order_type [OrderType] Order Type
454
+ # @param order_type [OrderTypeStrict] Order Type
455
455
  # @param price [Float] Trade Price if limit or stop limit order
456
456
  # @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
457
457
  # @param time_in_force [TimeInForceStrict] Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled
@@ -47,7 +47,7 @@ module SnapTrade
47
47
  # Stop Price. If stop loss or stop limit order, the price to trigger the stop
48
48
  attr_accessor :stop_price
49
49
 
50
- # Order Type
50
+ # Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - StopLoss
51
51
  attr_accessor :order_type
52
52
 
53
53
  # Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled * GTD - Good Til Date
@@ -109,7 +109,7 @@ module SnapTrade
109
109
  :'execution_price' => :'Float',
110
110
  :'limit_price' => :'Float',
111
111
  :'stop_price' => :'Float',
112
- :'order_type' => :'OrderType',
112
+ :'order_type' => :'String',
113
113
  :'time_in_force' => :'String',
114
114
  :'time_placed' => :'String',
115
115
  :'time_updated' => :'String',
@@ -128,6 +128,7 @@ module SnapTrade
128
128
  :'execution_price',
129
129
  :'limit_price',
130
130
  :'stop_price',
131
+ :'order_type',
131
132
  :'time_updated',
132
133
  :'time_executed',
133
134
  ])
@@ -57,7 +57,7 @@ module SnapTrade
57
57
  {
58
58
  :'id' => :'String',
59
59
  :'account' => :'String',
60
- :'order_type' => :'OrderType',
60
+ :'order_type' => :'OrderTypeStrict',
61
61
  :'time_in_force' => :'String',
62
62
  :'symbol' => :'ManualTradeSymbol',
63
63
  :'action' => :'Action',
@@ -61,7 +61,7 @@ module SnapTrade
61
61
  {
62
62
  :'account_id' => :'String',
63
63
  :'action' => :'Action',
64
- :'order_type' => :'OrderType',
64
+ :'order_type' => :'OrderTypeStrict',
65
65
  :'price' => :'Float',
66
66
  :'stop' => :'Float',
67
67
  :'time_in_force' => :'TimeInForceStrict',
@@ -38,7 +38,7 @@ module SnapTrade
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'order_type' => :'OrderType',
41
+ :'order_type' => :'OrderTypeStrict',
42
42
  :'time_in_force' => :'TimeInForceStrict',
43
43
  :'price' => :'Float'
44
44
  }
@@ -11,7 +11,7 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- class OrderType
14
+ class OrderTypeStrict
15
15
  LIMIT = "Limit".freeze
16
16
  MARKET = "Market".freeze
17
17
  STOP_LIMIT = "StopLimit".freeze
@@ -32,8 +32,8 @@ module SnapTrade
32
32
  # @param [String] The enum value in the form of the string
33
33
  # @return [String] The enum value
34
34
  def build_from_hash(value)
35
- return value if OrderType.all_vars.include?(value)
36
- raise "Invalid ENUM value #{value} for class #OrderType"
35
+ return value if OrderTypeStrict.all_vars.include?(value)
36
+ raise "Invalid ENUM value #{value} for class #OrderTypeStrict"
37
37
  end
38
38
  end
39
39
  end
@@ -23,7 +23,7 @@ module SnapTrade
23
23
 
24
24
  attr_accessor :closed_quantity
25
25
 
26
- # Order Type
26
+ # Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - StopLoss
27
27
  attr_accessor :order_type
28
28
 
29
29
  # Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled * GTD - Good Til Date
@@ -71,7 +71,7 @@ module SnapTrade
71
71
  :'filled_quantity' => :'Float',
72
72
  :'open_quantity' => :'Float',
73
73
  :'closed_quantity' => :'Float',
74
- :'order_type' => :'OrderType',
74
+ :'order_type' => :'String',
75
75
  :'time_in_force' => :'String',
76
76
  :'limit_price' => :'Float',
77
77
  :'execution_price' => :'Float',
@@ -83,6 +83,7 @@ module SnapTrade
83
83
  # List of attributes with nullable: true
84
84
  def self.openapi_nullable
85
85
  Set.new([
86
+ :'order_type',
86
87
  :'limit_price',
87
88
  :'execution_price',
88
89
  ])
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.18'
11
+ VERSION = '2.0.19'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -92,7 +92,7 @@ require 'snaptrade/models/options_place_option_strategy_request'
92
92
  require 'snaptrade/models/options_position'
93
93
  require 'snaptrade/models/options_position_currency'
94
94
  require 'snaptrade/models/options_symbol'
95
- require 'snaptrade/models/order_type'
95
+ require 'snaptrade/models/order_type_strict'
96
96
  require 'snaptrade/models/partner_data'
97
97
  require 'snaptrade/models/past_value'
98
98
  require 'snaptrade/models/performance_custom'
@@ -0,0 +1,23 @@
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::OrderTypeStrict
15
+ describe SnapTrade::OrderTypeStrict do
16
+ let(:instance) { SnapTrade::OrderTypeStrict.new }
17
+
18
+ describe 'test an instance of OrderTypeStrict' do
19
+ it 'should create an instance of OrderTypeStrict' do
20
+ expect(instance).to be_instance_of(SnapTrade::OrderTypeStrict)
21
+ end
22
+ end
23
+ 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.18
4
+ version: 2.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -171,7 +171,7 @@ files:
171
171
  - lib/snaptrade/models/options_position.rb
172
172
  - lib/snaptrade/models/options_position_currency.rb
173
173
  - lib/snaptrade/models/options_symbol.rb
174
- - lib/snaptrade/models/order_type.rb
174
+ - lib/snaptrade/models/order_type_strict.rb
175
175
  - lib/snaptrade/models/partner_data.rb
176
176
  - lib/snaptrade/models/past_value.rb
177
177
  - lib/snaptrade/models/performance_custom.rb
@@ -315,7 +315,7 @@ files:
315
315
  - spec/models/options_position_currency_spec.rb
316
316
  - spec/models/options_position_spec.rb
317
317
  - spec/models/options_symbol_spec.rb
318
- - spec/models/order_type_spec.rb
318
+ - spec/models/order_type_strict_spec.rb
319
319
  - spec/models/partner_data_spec.rb
320
320
  - spec/models/past_value_spec.rb
321
321
  - spec/models/performance_custom_spec.rb
@@ -459,7 +459,6 @@ test_files:
459
459
  - spec/models/brokerage_authorization_type_type_spec.rb
460
460
  - spec/models/portfolio_group_settings_spec.rb
461
461
  - spec/models/encrypted_response_spec.rb
462
- - spec/models/order_type_spec.rb
463
462
  - spec/models/time_in_force_strict_spec.rb
464
463
  - spec/models/account_simple_spec.rb
465
464
  - spec/models/manual_trade_balance_spec.rb
@@ -492,6 +491,7 @@ test_files:
492
491
  - spec/models/portfolio_group_position_spec.rb
493
492
  - spec/models/strategy_type_spec.rb
494
493
  - spec/models/figi_instrument_spec.rb
494
+ - spec/models/order_type_strict_spec.rb
495
495
  - spec/models/option_leg_action_spec.rb
496
496
  - spec/models/trade_impact_spec.rb
497
497
  - spec/models/symbol_query_spec.rb
@@ -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::OrderType
15
- describe SnapTrade::OrderType do
16
- let(:instance) { SnapTrade::OrderType.new }
17
-
18
- describe 'test an instance of OrderType' do
19
- it 'should create an instance of OrderType' do
20
- expect(instance).to be_instance_of(SnapTrade::OrderType)
21
- end
22
- end
23
- end