snaptrade 1.17.11 → 1.17.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +19 -27
- data/README.md +1 -1
- data/docs/ManualTradeForm.md +3 -3
- data/docs/MonthlyDividends.md +1 -1
- data/docs/NetContributions.md +1 -1
- data/docs/PastValue.md +1 -1
- data/docs/SubPeriodReturnRate.md +2 -2
- data/docs/TradingApi.md +4 -4
- data/docs/TransactionsStatus.md +1 -1
- data/lib/snaptrade/api/trading_api.rb +8 -8
- data/lib/snaptrade/models/manual_trade_form.rb +1 -2
- data/lib/snaptrade/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e9789f55603bbab4757b768cf14bb1c4f49b1b6cde5c0b0f56389ba8db8eab1
|
4
|
+
data.tar.gz: 4edfde4d5e8e9732c83cef5417ca8d98dd4c5fafc7f13267e2c823478ca01ddb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baaab36fde93555803ea8f3a6d6da3a8d6c357341f4509a9f2956d0cade3ea6996a802454ac60a632a81bb0e20ca26edda74093901081037a02be14c25db8fba
|
7
|
+
data.tar.gz: 7f1962fe3364eba460e44292ba0044b1e99587f66f63425bcb886e84a92e41a1d85ce4cea0fa983d7574baca6a392b83cfe1c869b0e3278f4b303d94788b4c2b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (1.17.
|
4
|
+
snaptrade (1.17.12)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -9,47 +9,40 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
ast (2.4.2)
|
12
|
-
base64 (0.1.1)
|
13
12
|
byebug (11.1.3)
|
14
13
|
coderay (1.1.3)
|
15
14
|
debug (1.8.0)
|
16
15
|
irb (>= 1.5.0)
|
17
16
|
reline (>= 0.3.1)
|
18
17
|
diff-lcs (1.5.0)
|
19
|
-
faraday (2.
|
20
|
-
|
21
|
-
faraday-net_http (>= 2.0, < 3.1)
|
22
|
-
ruby2_keywords (>= 0.0.4)
|
18
|
+
faraday (2.9.0)
|
19
|
+
faraday-net_http (>= 2.0, < 3.2)
|
23
20
|
faraday-multipart (1.0.4)
|
24
21
|
multipart-post (~> 2)
|
25
|
-
faraday-net_http (3.0
|
22
|
+
faraday-net_http (3.1.0)
|
23
|
+
net-http
|
26
24
|
io-console (0.6.0)
|
27
|
-
irb (1.
|
28
|
-
|
29
|
-
reline (>= 0.3.8)
|
25
|
+
irb (1.6.4)
|
26
|
+
reline (>= 0.3.0)
|
30
27
|
method_source (1.0.0)
|
31
28
|
multipart-post (2.3.0)
|
29
|
+
net-http (0.4.1)
|
30
|
+
uri
|
32
31
|
parallel (1.23.0)
|
33
|
-
parser (3.2.2.
|
32
|
+
parser (3.2.2.1)
|
34
33
|
ast (~> 2.4.1)
|
35
|
-
racc
|
36
34
|
pry (0.14.2)
|
37
35
|
coderay (~> 1.1)
|
38
36
|
method_source (~> 1.0)
|
39
37
|
pry-byebug (3.10.1)
|
40
38
|
byebug (~> 11.0)
|
41
39
|
pry (>= 0.13, < 0.15)
|
42
|
-
psych (5.1.0)
|
43
|
-
stringio
|
44
|
-
racc (1.7.1)
|
45
40
|
rainbow (3.1.1)
|
46
41
|
rake (13.0.6)
|
47
|
-
|
48
|
-
|
49
|
-
regexp_parser (2.8.1)
|
50
|
-
reline (0.3.8)
|
42
|
+
regexp_parser (2.8.0)
|
43
|
+
reline (0.3.4)
|
51
44
|
io-console (~> 0.5)
|
52
|
-
rexml (3.2.
|
45
|
+
rexml (3.2.5)
|
53
46
|
rspec (3.12.0)
|
54
47
|
rspec-core (~> 3.12.0)
|
55
48
|
rspec-expectations (~> 3.12.0)
|
@@ -59,10 +52,10 @@ GEM
|
|
59
52
|
rspec-expectations (3.12.3)
|
60
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
54
|
rspec-support (~> 3.12.0)
|
62
|
-
rspec-mocks (3.12.
|
55
|
+
rspec-mocks (3.12.5)
|
63
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
64
57
|
rspec-support (~> 3.12.0)
|
65
|
-
rspec-support (3.12.
|
58
|
+
rspec-support (3.12.0)
|
66
59
|
rubocop (1.12.1)
|
67
60
|
parallel (~> 1.10)
|
68
61
|
parser (>= 3.0.0.0)
|
@@ -72,15 +65,14 @@ GEM
|
|
72
65
|
rubocop-ast (>= 1.2.0, < 2.0)
|
73
66
|
ruby-progressbar (~> 1.7)
|
74
67
|
unicode-display_width (>= 1.4.0, < 3.0)
|
75
|
-
rubocop-ast (1.
|
68
|
+
rubocop-ast (1.28.1)
|
76
69
|
parser (>= 3.2.1.0)
|
77
70
|
ruby-progressbar (1.13.0)
|
78
|
-
ruby2_keywords (0.0.5)
|
79
|
-
stringio (3.0.8)
|
80
71
|
unicode-display_width (2.4.2)
|
72
|
+
uri (0.13.0)
|
81
73
|
|
82
74
|
PLATFORMS
|
83
|
-
arm64-darwin-
|
75
|
+
arm64-darwin-21
|
84
76
|
|
85
77
|
DEPENDENCIES
|
86
78
|
debug (~> 1.8)
|
@@ -91,4 +83,4 @@ DEPENDENCIES
|
|
91
83
|
snaptrade!
|
92
84
|
|
93
85
|
BUNDLED WITH
|
94
|
-
2.
|
86
|
+
2.3.7
|
data/README.md
CHANGED
data/docs/ManualTradeForm.md
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
| **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
|
11
11
|
| **stop** | **Float** | Stop Price. If stop loss or stop limit order, the price to trigger the stop | [optional] |
|
12
12
|
| **time_in_force** | [**TimeInForce**](TimeInForce.md) | | [optional] |
|
13
|
-
| **units** | **Float** |
|
13
|
+
| **units** | **Float** | | [optional] |
|
14
14
|
| **universal_symbol_id** | **String** | | [optional] |
|
15
|
-
| **notional_value** | **Float** |
|
15
|
+
| **notional_value** | **Float** | | [optional] |
|
16
16
|
|
17
17
|
## Example
|
18
18
|
|
@@ -28,7 +28,7 @@ instance = SnapTrade::ManualTradeForm.new(
|
|
28
28
|
time_in_force: null,
|
29
29
|
units: null,
|
30
30
|
universal_symbol_id: 2bcd7cc3-e922-4976-bce1-9858296801c3,
|
31
|
-
notional_value:
|
31
|
+
notional_value: null
|
32
32
|
)
|
33
33
|
```
|
34
34
|
|
data/docs/MonthlyDividends.md
CHANGED
data/docs/NetContributions.md
CHANGED
data/docs/PastValue.md
CHANGED
data/docs/SubPeriodReturnRate.md
CHANGED
@@ -14,8 +14,8 @@
|
|
14
14
|
require 'snaptrade'
|
15
15
|
|
16
16
|
instance = SnapTrade::SubPeriodReturnRate.new(
|
17
|
-
period_start:
|
18
|
-
period_end:
|
17
|
+
period_start: Sun Jan 23 16:00:00 PST 2022,
|
18
|
+
period_end: Sun Jan 23 16:00:00 PST 2022,
|
19
19
|
rate_of_return: 0.012312367452
|
20
20
|
)
|
21
21
|
```
|
data/docs/TradingApi.md
CHANGED
@@ -103,7 +103,7 @@ stop = 31.33
|
|
103
103
|
time_in_force = "Day"
|
104
104
|
units = 3.14
|
105
105
|
universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
106
|
-
notional_value =
|
106
|
+
notional_value = 3.14
|
107
107
|
|
108
108
|
begin
|
109
109
|
# Check impact of trades on account.
|
@@ -141,7 +141,7 @@ stop = 31.33
|
|
141
141
|
time_in_force = "Day"
|
142
142
|
units = 3.14
|
143
143
|
universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
144
|
-
notional_value =
|
144
|
+
notional_value = 3.14
|
145
145
|
|
146
146
|
begin
|
147
147
|
# Check impact of trades on account.
|
@@ -275,7 +275,7 @@ stop = 31.33
|
|
275
275
|
time_in_force = "Day"
|
276
276
|
units = 3.14
|
277
277
|
universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
278
|
-
notional_value =
|
278
|
+
notional_value = 3.14
|
279
279
|
|
280
280
|
begin
|
281
281
|
# Place a trade with NO validation.
|
@@ -313,7 +313,7 @@ stop = 31.33
|
|
313
313
|
time_in_force = "Day"
|
314
314
|
units = 3.14
|
315
315
|
universal_symbol_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
316
|
-
notional_value =
|
316
|
+
notional_value = 3.14
|
317
317
|
|
318
318
|
begin
|
319
319
|
# Place a trade with NO validation.
|
data/docs/TransactionsStatus.md
CHANGED
@@ -143,9 +143,9 @@ module SnapTrade
|
|
143
143
|
# @param price [Float] Trade Price if limit or stop limit order
|
144
144
|
# @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
145
145
|
# @param time_in_force [TimeInForce]
|
146
|
-
# @param units [Float]
|
146
|
+
# @param units [Float]
|
147
147
|
# @param universal_symbol_id [String]
|
148
|
-
# @param notional_value [Float]
|
148
|
+
# @param notional_value [Float]
|
149
149
|
# @param body [ManualTradeForm]
|
150
150
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
151
151
|
def get_order_impact(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
|
@@ -173,9 +173,9 @@ module SnapTrade
|
|
173
173
|
# @param price [Float] Trade Price if limit or stop limit order
|
174
174
|
# @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
175
175
|
# @param time_in_force [TimeInForce]
|
176
|
-
# @param units [Float]
|
176
|
+
# @param units [Float]
|
177
177
|
# @param universal_symbol_id [String]
|
178
|
-
# @param notional_value [Float]
|
178
|
+
# @param notional_value [Float]
|
179
179
|
# @param body [ManualTradeForm]
|
180
180
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
181
181
|
def get_order_impact_with_http_info(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
|
@@ -394,9 +394,9 @@ module SnapTrade
|
|
394
394
|
# @param price [Float] Trade Price if limit or stop limit order
|
395
395
|
# @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
396
396
|
# @param time_in_force [TimeInForce]
|
397
|
-
# @param units [Float]
|
397
|
+
# @param units [Float]
|
398
398
|
# @param universal_symbol_id [String]
|
399
|
-
# @param notional_value [Float]
|
399
|
+
# @param notional_value [Float]
|
400
400
|
# @param body [ManualTradeForm]
|
401
401
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
402
402
|
def place_force_order(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
|
@@ -424,9 +424,9 @@ module SnapTrade
|
|
424
424
|
# @param price [Float] Trade Price if limit or stop limit order
|
425
425
|
# @param stop [Float] Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
426
426
|
# @param time_in_force [TimeInForce]
|
427
|
-
# @param units [Float]
|
427
|
+
# @param units [Float]
|
428
428
|
# @param universal_symbol_id [String]
|
429
|
-
# @param notional_value [Float]
|
429
|
+
# @param notional_value [Float]
|
430
430
|
# @param body [ManualTradeForm]
|
431
431
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
432
432
|
def place_force_order_with_http_info(user_id:, user_secret:, account_id: SENTINEL, action: SENTINEL, order_type: SENTINEL, price: SENTINEL, stop: SENTINEL, time_in_force: SENTINEL, units: SENTINEL, universal_symbol_id: SENTINEL, notional_value: SENTINEL, extra: {})
|
@@ -28,12 +28,10 @@ module SnapTrade
|
|
28
28
|
|
29
29
|
attr_accessor :time_in_force
|
30
30
|
|
31
|
-
# Trade Units. Cannot work with notional value.
|
32
31
|
attr_accessor :units
|
33
32
|
|
34
33
|
attr_accessor :universal_symbol_id
|
35
34
|
|
36
|
-
# Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. **Only available for Alpaca and Alpaca Paper. Please contact support to get access to place notional trades**
|
37
35
|
attr_accessor :notional_value
|
38
36
|
|
39
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -76,6 +74,7 @@ module SnapTrade
|
|
76
74
|
Set.new([
|
77
75
|
:'price',
|
78
76
|
:'stop',
|
77
|
+
:'units',
|
79
78
|
:'notional_value'
|
80
79
|
])
|
81
80
|
end
|
data/lib/snaptrade/version.rb
CHANGED
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.17.
|
4
|
+
version: 1.17.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -531,7 +531,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
531
531
|
- !ruby/object:Gem::Version
|
532
532
|
version: '0'
|
533
533
|
requirements: []
|
534
|
-
rubygems_version: 3.
|
534
|
+
rubygems_version: 3.3.7
|
535
535
|
signing_key:
|
536
536
|
specification_version: 4
|
537
537
|
summary: SnapTrade Ruby Gem
|