snaptrade 2.0.133 → 2.0.134
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -6
- data/lib/snaptrade/api/trading_api.rb +2 -6
- data/lib/snaptrade/models/manual_trade_form_bracket.rb +1 -11
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/manual_trade_form_bracket_spec.rb +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d24eb0658e7e1dba7e7a0add10823bdd03880e0479de8d58b0e8b95a296835a
|
4
|
+
data.tar.gz: 457d6dafe117a2db5af4f86d7e0fae6d5167c5b05368d03f24a979f0ead7899c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5b82abd3ea4839a93e8d9520a7e8883ea36af676b22455b904646392630a55f2ab93e285f354109bc730027ff0a48d2d57e74a66114baa3535a6847927be74
|
7
|
+
data.tar.gz: 699d0f66f670f7e297368fa303e655e9e74d8f713087f86766df212ca4ebe542c6c6a6e29483472ecd7a2d5b442a5475e95f77db3b1fffbd0eb1c7b04b5f2b2c
|
data/Gemfile.lock
CHANGED
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
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.134)
|
10
10
|
[](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.
|
84
|
+
gem 'snaptrade', '~> 2.0.134'
|
85
85
|
```
|
86
86
|
|
87
87
|
## Getting Started<a id="getting-started"></a>
|
@@ -1778,7 +1778,6 @@ result = snaptrade.trading.place_bracket_order(
|
|
1778
1778
|
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
1779
1779
|
user_id: "snaptrade-user-123",
|
1780
1780
|
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
1781
|
-
symbol: "AAPL",
|
1782
1781
|
price: 31.33,
|
1783
1782
|
stop: 31.33,
|
1784
1783
|
units: 10.5,
|
@@ -1816,9 +1815,6 @@ The ID of the account to execute the trade on.
|
|
1816
1815
|
|
1817
1816
|
##### user_id: `String`<a id="user_id-string"></a>
|
1818
1817
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
1819
|
-
##### symbol: `String`<a id="symbol-string"></a>
|
1820
|
-
The security's trading ticker symbol.
|
1821
|
-
|
1822
1818
|
##### price: `Float`<a id="price-float"></a>
|
1823
1819
|
The limit price for `Limit` and `StopLimit` orders.
|
1824
1820
|
|
@@ -671,16 +671,14 @@ module SnapTrade
|
|
671
671
|
# @param account_id [String] The ID of the account to execute the trade on.
|
672
672
|
# @param user_id [String]
|
673
673
|
# @param user_secret [String]
|
674
|
-
# @param symbol [String] The security's trading ticker symbol.
|
675
674
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
676
675
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
677
676
|
# @param units [Float] Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
678
677
|
# @param body [ManualTradeFormBracket]
|
679
678
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
680
|
-
def place_bracket_order(action:, instrument:, order_type:, time_in_force:, stop_loss:, take_profit:, account_id:, user_id:, user_secret:,
|
679
|
+
def place_bracket_order(action:, instrument:, order_type:, time_in_force:, stop_loss:, take_profit:, account_id:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
|
681
680
|
_body = {}
|
682
681
|
_body[:action] = action if action != SENTINEL
|
683
|
-
_body[:symbol] = symbol if symbol != SENTINEL
|
684
682
|
_body[:instrument] = instrument if instrument != SENTINEL
|
685
683
|
_body[:order_type] = order_type if order_type != SENTINEL
|
686
684
|
_body[:time_in_force] = time_in_force if time_in_force != SENTINEL
|
@@ -708,16 +706,14 @@ module SnapTrade
|
|
708
706
|
# @param account_id [String] The ID of the account to execute the trade on.
|
709
707
|
# @param user_id [String]
|
710
708
|
# @param user_secret [String]
|
711
|
-
# @param symbol [String] The security's trading ticker symbol.
|
712
709
|
# @param price [Float] The limit price for `Limit` and `StopLimit` orders.
|
713
710
|
# @param stop [Float] The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
714
711
|
# @param units [Float] Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
715
712
|
# @param body [ManualTradeFormBracket]
|
716
713
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
717
|
-
def place_bracket_order_with_http_info(action:, instrument:, order_type:, time_in_force:, stop_loss:, take_profit:, account_id:, user_id:, user_secret:,
|
714
|
+
def place_bracket_order_with_http_info(action:, instrument:, order_type:, time_in_force:, stop_loss:, take_profit:, account_id:, user_id:, user_secret:, price: SENTINEL, stop: SENTINEL, units: SENTINEL, extra: {})
|
718
715
|
_body = {}
|
719
716
|
_body[:action] = action if action != SENTINEL
|
720
|
-
_body[:symbol] = symbol if symbol != SENTINEL
|
721
717
|
_body[:instrument] = instrument if instrument != SENTINEL
|
722
718
|
_body[:order_type] = order_type if order_type != SENTINEL
|
723
719
|
_body[:time_in_force] = time_in_force if time_in_force != SENTINEL
|
@@ -16,9 +16,6 @@ module SnapTrade
|
|
16
16
|
# The action describes the intent or side of a trade. This is either `BUY` or `SELL` for Equity symbols or `BUY_TO_OPEN`, `BUY_TO_CLOSE`, `SELL_TO_OPEN` or `SELL_TO_CLOSE` for Options.
|
17
17
|
attr_accessor :action
|
18
18
|
|
19
|
-
# The security's trading ticker symbol.
|
20
|
-
attr_accessor :symbol
|
21
|
-
|
22
19
|
attr_accessor :instrument
|
23
20
|
|
24
21
|
# The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
|
@@ -44,7 +41,6 @@ module SnapTrade
|
|
44
41
|
def self.attribute_map
|
45
42
|
{
|
46
43
|
:'action' => :'action',
|
47
|
-
:'symbol' => :'symbol',
|
48
44
|
:'instrument' => :'instrument',
|
49
45
|
:'order_type' => :'order_type',
|
50
46
|
:'time_in_force' => :'time_in_force',
|
@@ -65,7 +61,6 @@ module SnapTrade
|
|
65
61
|
def self.openapi_types
|
66
62
|
{
|
67
63
|
:'action' => :'ActionStrictWithOptions',
|
68
|
-
:'symbol' => :'String',
|
69
64
|
:'instrument' => :'TradingInstrument',
|
70
65
|
:'order_type' => :'OrderTypeStrict',
|
71
66
|
:'time_in_force' => :'TimeInForceStrict',
|
@@ -104,10 +99,6 @@ module SnapTrade
|
|
104
99
|
self.action = attributes[:'action']
|
105
100
|
end
|
106
101
|
|
107
|
-
if attributes.key?(:'symbol')
|
108
|
-
self.symbol = attributes[:'symbol']
|
109
|
-
end
|
110
|
-
|
111
102
|
if attributes.key?(:'instrument')
|
112
103
|
self.instrument = attributes[:'instrument']
|
113
104
|
end
|
@@ -190,7 +181,6 @@ module SnapTrade
|
|
190
181
|
return true if self.equal?(o)
|
191
182
|
self.class == o.class &&
|
192
183
|
action == o.action &&
|
193
|
-
symbol == o.symbol &&
|
194
184
|
instrument == o.instrument &&
|
195
185
|
order_type == o.order_type &&
|
196
186
|
time_in_force == o.time_in_force &&
|
@@ -210,7 +200,7 @@ module SnapTrade
|
|
210
200
|
# Calculates hash code according to all attributes.
|
211
201
|
# @return [Integer] Hash code
|
212
202
|
def hash
|
213
|
-
[action,
|
203
|
+
[action, instrument, order_type, time_in_force, price, stop, units, stop_loss, take_profit].hash
|
214
204
|
end
|
215
205
|
|
216
206
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
@@ -26,12 +26,6 @@ describe SnapTrade::ManualTradeFormBracket do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
describe 'test attribute "symbol"' do
|
30
|
-
it 'should work' do
|
31
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
29
|
describe 'test attribute "instrument"' do
|
36
30
|
it 'should work' do
|
37
31
|
# 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.
|
4
|
+
version: 2.0.134
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|