stockfighter 0.1.3 → 0.1.4
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/lib/stockfighter/api.rb +4 -4
- data/lib/stockfighter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9303ecd757e438d43ccd60406c9f9dd435754db7
|
|
4
|
+
data.tar.gz: c5c827c6ae4651d831aa01a18849acebb9956610
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d44a34db3496aa5b8958e4471eb0f4bb3cd7276fc513b95028e9b6e1dbfa175b22f3efa6f95505a1832afbea3965029f6f0eff00e573eb996ee3eaedc8c76b9
|
|
7
|
+
data.tar.gz: ba974cc66552de0c09ffb6f49bd8d275a72e56635189ef6f2a9d6b471dacc440147e5ec4dd484b66a97f2a6d5eb649db9d82a5fe3e731768e5fb4bfbc07c2369
|
data/lib/stockfighter/api.rb
CHANGED
|
@@ -35,20 +35,20 @@ module Stockfighter
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def order_status(order_id)
|
|
38
|
-
HTTParty.get("
|
|
38
|
+
HTTParty.get("#{BASE_URL}/venues/#{@venue}/stocks/#{@symbol}/orders/#{order_id}", :headers => {"X-Starfighter-Authorization" => @api_key}).parsed_response
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def order_book
|
|
42
|
-
HTTParty.get("#{BASE_URL}/venues/#{@venue}/stocks/#{@symbol}", {"X-Starfighter-Authorization" => @api_key}).parsed_response
|
|
42
|
+
HTTParty.get("#{BASE_URL}/venues/#{@venue}/stocks/#{@symbol}", headers: {"X-Starfighter-Authorization" => @api_key}).parsed_response
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def venue_up?
|
|
46
|
-
response = HTTParty.get("#{BASE_URL}/venues/#{@venue}/heartbeat", {"X-Starfighter-Authorization" => @api_key}).parsed_response
|
|
46
|
+
response = HTTParty.get("#{BASE_URL}/venues/#{@venue}/heartbeat", headers: {"X-Starfighter-Authorization" => @api_key}).parsed_response
|
|
47
47
|
response["ok"]
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def status_all
|
|
51
|
-
HTTParty.get("#{BASE_URL}/venues/#{@venue}/accounts/#{@account}/orders", {"X-Starfighter-Authorization" => @api_key})
|
|
51
|
+
HTTParty.get("#{BASE_URL}/venues/#{@venue}/accounts/#{@account}/orders", headers: {"X-Starfighter-Authorization" => @api_key})
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
data/lib/stockfighter/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stockfighter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert J Samson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|