alpaca-trade-api 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -29
- data/lib/alpaca/trade/api/asset.rb +2 -1
- data/lib/alpaca/trade/api/client.rb +5 -4
- data/lib/alpaca/trade/api/version.rb +1 -1
- 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: 4655ddb2a2cedffa2c5eb1f5eb76fccb77077ae877f2b35a1becf22f50524946
|
4
|
+
data.tar.gz: 357663cde64a002a63fa9810984320184774edd5581fca1ae93dd3daa489e1a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa58e42529f6901b14a010d9e406477744d2d15f64bc549983b082e4bd6ea9b771cd8ba2cae4df32efcf1dfd2aac21ebb7c6f9a8a61464f7991c59ba11ae2020
|
7
|
+
data.tar.gz: e79db3dbd7a4e0bd788e2930bbba1f0dc9cbe1f7949532f6495b5bd04f1b48fdd5e494c735c8c9fc83a0277638fd73556073cb8ba7c60551e4f043d9967389ef
|
data/Gemfile.lock
CHANGED
@@ -7,46 +7,46 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
12
|
-
byebug (11.
|
13
|
-
crack (0.4.
|
14
|
-
|
15
|
-
diff-lcs (1.
|
16
|
-
docile (1.3.
|
10
|
+
addressable (2.7.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
byebug (11.1.3)
|
13
|
+
crack (0.4.5)
|
14
|
+
rexml
|
15
|
+
diff-lcs (1.4.4)
|
16
|
+
docile (1.3.5)
|
17
17
|
faraday (1.3.0)
|
18
18
|
faraday-net_http (~> 1.0)
|
19
19
|
multipart-post (>= 1.2, < 3)
|
20
20
|
ruby2_keywords
|
21
21
|
faraday-net_http (1.0.1)
|
22
|
-
hashdiff (0.
|
23
|
-
json (2.2.0)
|
22
|
+
hashdiff (1.0.1)
|
24
23
|
multipart-post (2.1.1)
|
25
|
-
public_suffix (
|
26
|
-
rake (13.0.
|
24
|
+
public_suffix (4.0.6)
|
25
|
+
rake (13.0.3)
|
27
26
|
rb-readline (0.5.5)
|
28
|
-
|
29
|
-
|
30
|
-
rspec-
|
31
|
-
rspec-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
rexml (3.2.4)
|
28
|
+
rspec (3.10.0)
|
29
|
+
rspec-core (~> 3.10.0)
|
30
|
+
rspec-expectations (~> 3.10.0)
|
31
|
+
rspec-mocks (~> 3.10.0)
|
32
|
+
rspec-core (3.10.1)
|
33
|
+
rspec-support (~> 3.10.0)
|
34
|
+
rspec-expectations (3.10.1)
|
35
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
-
rspec-support (~> 3.
|
37
|
-
rspec-mocks (3.
|
36
|
+
rspec-support (~> 3.10.0)
|
37
|
+
rspec-mocks (3.10.2)
|
38
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-support (3.
|
39
|
+
rspec-support (~> 3.10.0)
|
40
|
+
rspec-support (3.10.2)
|
41
41
|
ruby2_keywords (0.0.4)
|
42
|
-
|
43
|
-
simplecov (0.16.1)
|
42
|
+
simplecov (0.21.2)
|
44
43
|
docile (~> 1.1)
|
45
|
-
|
46
|
-
|
47
|
-
simplecov-html (0.
|
48
|
-
|
49
|
-
|
44
|
+
simplecov-html (~> 0.11)
|
45
|
+
simplecov_json_formatter (~> 0.1)
|
46
|
+
simplecov-html (0.12.3)
|
47
|
+
simplecov_json_formatter (0.1.2)
|
48
|
+
vcr (5.1.0)
|
49
|
+
webmock (3.12.0)
|
50
50
|
addressable (>= 2.3.6)
|
51
51
|
crack (>= 0.3.2)
|
52
52
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -5,7 +5,7 @@ module Alpaca
|
|
5
5
|
module Api
|
6
6
|
class Asset
|
7
7
|
attr_reader :id, :asset_class, :exchange, :symbol, :status, :tradable, :marginable,
|
8
|
-
:shortable, :easy_to_borrow
|
8
|
+
:shortable, :easy_to_borrow, :fractionable
|
9
9
|
|
10
10
|
def initialize(json)
|
11
11
|
@id = json['id']
|
@@ -17,6 +17,7 @@ module Alpaca
|
|
17
17
|
@marginable = json['marginable']
|
18
18
|
@shortable = json['shortable']
|
19
19
|
@easy_to_borrow = json['easy_to_borrow']
|
20
|
+
@fractionable = json['fractionable']
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -112,16 +112,17 @@ module Alpaca
|
|
112
112
|
LastTrade.new(JSON.parse(response.body))
|
113
113
|
end
|
114
114
|
|
115
|
-
def new_order(symbol:,
|
116
|
-
stop_price: nil, extended_hours: false, client_order_id: nil,
|
117
|
-
take_profit: nil, stop_loss: nil)
|
115
|
+
def new_order(symbol:, side:, type:, time_in_force:, qty: nil, notional: nil,
|
116
|
+
limit_price: nil, stop_price: nil, extended_hours: false, client_order_id: nil,
|
117
|
+
order_class: nil, take_profit: nil, stop_loss: nil)
|
118
118
|
|
119
119
|
params = {
|
120
120
|
symbol: symbol,
|
121
|
-
qty: qty,
|
122
121
|
side: side,
|
123
122
|
type: type,
|
124
123
|
time_in_force: time_in_force,
|
124
|
+
qty: qty,
|
125
|
+
notional: notional,
|
125
126
|
limit_price: limit_price,
|
126
127
|
order_class: order_class,
|
127
128
|
stop_price: stop_price,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alpaca-trade-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloves Carneiro Jr
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|