snaptrade 2.0.91 → 2.0.93

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96a36a98aeb1fb6c97d243813734decf01f1ce9ea45c28c42ca570e19487e799
4
- data.tar.gz: '0346728bf405a16ba477eb478daba50e79c478f2e99a025b87a0b75429e0e848'
3
+ metadata.gz: ec20afd5e46b2ecd35706fab5404e4514ae1e9667f5254011580a1873a3c146c
4
+ data.tar.gz: c6c98c5d9694e9ac4e72edf8056a620eeb9841917bca3c49a42817a504b18e12
5
5
  SHA512:
6
- metadata.gz: e72cd583e3751f9ac6353208835835c7202f2fc4cbf58ddedc4b5ce95f7c147441bb412419f883db2826bb72393037cd0359fc6efd754850b5b3d834f6e2d332
7
- data.tar.gz: 626060577c3f93fc74cc948420bc085223d40ce1b8f8aa68160fff700ec89928984c95fc61c0c7fc8268990a51e641d6331a7a17735aba8e86f053bdd178b92c
6
+ metadata.gz: 8490479d39b19d47fc414ab45bef66b834ea3d0f659e6adb97358f51d641c54e8cca06ed063c5a0337dc0155367dd4c5b7342db2f8d27da7ef8069d9e2b29b8d
7
+ data.tar.gz: 0ed6430c3f0c6649b0d2ccf4973d78a9f22b89cd45c29dff332a92812009553ef279f76b5a3409ea50fa88c43c6e2a556a0076c087d0963dc00d2ef0159daf13
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.91)
4
+ snaptrade (2.0.93)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -28,8 +28,8 @@ GEM
28
28
  reline (>= 0.3.0)
29
29
  method_source (1.1.0)
30
30
  multipart-post (2.4.1)
31
- parallel (1.26.3)
32
- parser (3.3.7.4)
31
+ parallel (1.27.0)
32
+ parser (3.3.8.0)
33
33
  ast (~> 2.4.1)
34
34
  racc
35
35
  prism (1.4.0)
@@ -68,7 +68,7 @@ GEM
68
68
  rubocop-ast (>= 1.2.0, < 2.0)
69
69
  ruby-progressbar (~> 1.7)
70
70
  unicode-display_width (>= 1.4.0, < 3.0)
71
- rubocop-ast (1.44.0)
71
+ rubocop-ast (1.44.1)
72
72
  parser (>= 3.3.7.2)
73
73
  prism (~> 1.4)
74
74
  ruby-progressbar (1.13.0)
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.91-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.91)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.93-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.93)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
81
81
  Add to Gemfile:
82
82
 
83
83
  ```ruby
84
- gem 'snaptrade', '~> 2.0.91'
84
+ gem 'snaptrade', '~> 2.0.93'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -134,7 +134,7 @@ p.result[3] # [Faraday::Response] Raw HTTP response
134
134
 
135
135
  Returns all historical transactions for the specified account.
136
136
 
137
- This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
137
+ This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options.
138
138
 
139
139
  Transaction are returned in reverse chronological order, using the `trade_date` field.
140
140
 
@@ -2214,6 +2214,7 @@ result = snaptrade.trading.replace_order(
2214
2214
  user_id: "snaptrade-user-123",
2215
2215
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2216
2216
  price: 31.33,
2217
+ symbol: "AAPL",
2217
2218
  stop: 31.33,
2218
2219
  units: 10.5,
2219
2220
  )
@@ -2250,6 +2251,9 @@ The Brokerage Order ID of the order to replace.
2250
2251
  ##### price: `Float`<a id="price-float"></a>
2251
2252
  The limit price for `Limit` and `StopLimit` orders.
2252
2253
 
2254
+ ##### symbol: `String`<a id="symbol-string"></a>
2255
+ The security's trading ticker symbol
2256
+
2253
2257
  ##### stop: `Float`<a id="stop-float"></a>
2254
2258
  The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2255
2259
 
@@ -21,7 +21,7 @@ module SnapTrade
21
21
  #
22
22
  # Returns all historical transactions for the specified account.
23
23
  #
24
- # This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
24
+ # This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options.
25
25
  #
26
26
  # Transaction are returned in reverse chronological order, using the `trade_date` field.
27
27
  #
@@ -50,7 +50,7 @@ module SnapTrade
50
50
  #
51
51
  # Returns all historical transactions for the specified account.
52
52
  #
53
- # This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
53
+ # This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options.
54
54
  #
55
55
  # Transaction are returned in reverse chronological order, using the `trade_date` field.
56
56
  #
@@ -75,7 +75,7 @@ module SnapTrade
75
75
  end
76
76
 
77
77
  # List account activities
78
- # Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
78
+ # Returns all historical transactions for the specified account. This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
79
79
  # @param account_id [String]
80
80
  # @param user_id [String]
81
81
  # @param user_secret [String]
@@ -92,7 +92,7 @@ module SnapTrade
92
92
  end
93
93
 
94
94
  # List account activities
95
- # Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the &#x60;trade_date&#x60; field. The data returned here is always cached and refreshed once a day.
95
+ # Returns all historical transactions for the specified account. This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the &#x60;trade_date&#x60; field. The data returned here is always cached and refreshed once a day.
96
96
  # @param account_id [String]
97
97
  # @param user_id [String]
98
98
  # @param user_secret [String]
@@ -1404,16 +1404,18 @@ module SnapTrade
1404
1404
  # @param user_id [String]
1405
1405
  # @param user_secret [String]
1406
1406
  # @param price [Float] The limit price for `Limit` and `StopLimit` orders.
1407
+ # @param symbol [String] The security's trading ticker symbol
1407
1408
  # @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
1408
1409
  # @param units [Float]
1409
1410
  # @param body [ManualTradeReplaceForm]
1410
1411
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1411
- def replace_order(action:, order_type:, time_in_force:, account_id:, brokerage_order_id:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
1412
+ def replace_order(action:, order_type:, time_in_force:, account_id:, brokerage_order_id:, user_id:, user_secret:, price: SENTINEL, symbol: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
1412
1413
  _body = {}
1413
1414
  _body[:action] = action if action != SENTINEL
1414
1415
  _body[:order_type] = order_type if order_type != SENTINEL
1415
1416
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
1416
1417
  _body[:price] = price if price != SENTINEL
1418
+ _body[:symbol] = symbol if symbol != SENTINEL
1417
1419
  _body[:stop] = stop if stop != SENTINEL
1418
1420
  _body[:units] = units if units != SENTINEL
1419
1421
  manual_trade_replace_form = _body
@@ -1435,16 +1437,18 @@ module SnapTrade
1435
1437
  # @param user_id [String]
1436
1438
  # @param user_secret [String]
1437
1439
  # @param price [Float] The limit price for `Limit` and `StopLimit` orders.
1440
+ # @param symbol [String] The security's trading ticker symbol
1438
1441
  # @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
1439
1442
  # @param units [Float]
1440
1443
  # @param body [ManualTradeReplaceForm]
1441
1444
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1442
- def replace_order_with_http_info(action:, order_type:, time_in_force:, account_id:, brokerage_order_id:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
1445
+ def replace_order_with_http_info(action:, order_type:, time_in_force:, account_id:, brokerage_order_id:, user_id:, user_secret:, price: SENTINEL, symbol: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
1443
1446
  _body = {}
1444
1447
  _body[:action] = action if action != SENTINEL
1445
1448
  _body[:order_type] = order_type if order_type != SENTINEL
1446
1449
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
1447
1450
  _body[:price] = price if price != SENTINEL
1451
+ _body[:symbol] = symbol if symbol != SENTINEL
1448
1452
  _body[:stop] = stop if stop != SENTINEL
1449
1453
  _body[:units] = units if units != SENTINEL
1450
1454
  manual_trade_replace_form = _body
@@ -25,6 +25,9 @@ module SnapTrade
25
25
  # The limit price for `Limit` and `StopLimit` orders.
26
26
  attr_accessor :price
27
27
 
28
+ # The security's trading ticker symbol
29
+ attr_accessor :symbol
30
+
28
31
  # The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
29
32
  attr_accessor :stop
30
33
 
@@ -37,6 +40,7 @@ module SnapTrade
37
40
  :'order_type' => :'order_type',
38
41
  :'time_in_force' => :'time_in_force',
39
42
  :'price' => :'price',
43
+ :'symbol' => :'symbol',
40
44
  :'stop' => :'stop',
41
45
  :'units' => :'units'
42
46
  }
@@ -54,6 +58,7 @@ module SnapTrade
54
58
  :'order_type' => :'OrderTypeStrict',
55
59
  :'time_in_force' => :'TimeInForceStrict',
56
60
  :'price' => :'Float',
61
+ :'symbol' => :'String',
57
62
  :'stop' => :'Float',
58
63
  :'units' => :'Float'
59
64
  }
@@ -99,6 +104,10 @@ module SnapTrade
99
104
  self.price = attributes[:'price']
100
105
  end
101
106
 
107
+ if attributes.key?(:'symbol')
108
+ self.symbol = attributes[:'symbol']
109
+ end
110
+
102
111
  if attributes.key?(:'stop')
103
112
  self.stop = attributes[:'stop']
104
113
  end
@@ -145,6 +154,7 @@ module SnapTrade
145
154
  order_type == o.order_type &&
146
155
  time_in_force == o.time_in_force &&
147
156
  price == o.price &&
157
+ symbol == o.symbol &&
148
158
  stop == o.stop &&
149
159
  units == o.units
150
160
  end
@@ -158,7 +168,7 @@ module SnapTrade
158
168
  # Calculates hash code according to all attributes.
159
169
  # @return [Integer] Hash code
160
170
  def hash
161
- [action, order_type, time_in_force, price, stop, units].hash
171
+ [action, order_type, time_in_force, price, symbol, stop, units].hash
162
172
  end
163
173
 
164
174
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.91'
11
+ VERSION = '2.0.93'
12
12
  end
@@ -29,7 +29,7 @@ describe 'AccountInformationApi' do
29
29
 
30
30
  # unit tests for get_account_activities
31
31
  # List account activities
32
- # Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the &#x60;trade_date&#x60; field. The data returned here is always cached and refreshed once a day.
32
+ # Returns all historical transactions for the specified account. This endpoint is paginated with a default (and maximum) page size of 1000. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the &#x60;trade_date&#x60; field. The data returned here is always cached and refreshed once a day.
33
33
  # @param account_id
34
34
  # @param user_id
35
35
  # @param user_secret
@@ -44,6 +44,12 @@ describe SnapTrade::ManualTradeReplaceForm do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "symbol"' 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
+
47
53
  describe 'test attribute "stop"' do
48
54
  it 'should work' do
49
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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.91
4
+ version: 2.0.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-09 00:00:00.000000000 Z
11
+ date: 2025-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday