queru_btce 1.0.3 → 1.0.5
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/README.md +4 -3
- data/lib/queru_btce.rb +3 -3
- data/lib/queru_btce/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: cdedde9668a31846f6df9e024bba1164bfe27449
|
4
|
+
data.tar.gz: 536ccfd0077f9251963a3f13a74e0958c0200406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a2a4a920b254fcd494bca06177b4ee1a32d0ce5f0a0d02f6752e9ec3f2213fedc6fec06e7ef43fd0667a84fefc311624c3da3cd70c66547ac6380c95a949246
|
7
|
+
data.tar.gz: 69536e75783ad4de23c34e9c257452434b6e106abf8d8242dfd0a6933ee96fa900b54ce293ea7d9285905c020274af277625f3a31fc78b70e219f5237dab808b
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# QueruBtce
|
2
2
|
|
3
|
-
KISS _BTC-e_ API Access from Ruby.
|
3
|
+
KISS _BTC-e_ and now _wex.nz_ API Access from Ruby.
|
4
4
|
|
5
5
|
[](https://badge.fury.io/rb/queru_btce)
|
6
6
|
|
7
7
|
### Pros:
|
8
8
|
|
9
|
+
- It supports _wex.nz_, former _BTC-E_.
|
9
10
|
- No config file and no framework dependency.
|
10
11
|
- No weird abstractions, you can follow _BTC-e_ API specs.
|
11
12
|
- Returns an object, keys are methods.
|
@@ -45,8 +46,8 @@ $ gem install queru-btce
|
|
45
46
|
This gem provides class methods for all public/private API methods offered by _BTC-e_.
|
46
47
|
Responses are objects (dot methods or hash access) and any errors are raised as exception, your program can handle it.
|
47
48
|
|
48
|
-
- [_BTC-e_ Trade API Documentation](https://
|
49
|
-
- [_BTC-e_ Public API Documentation](https://
|
49
|
+
- [_BTC-e_ Trade API Documentation](https://wex.nz/api/documentation)
|
50
|
+
- [_BTC-e_ Public API Documentation](https://wex.nz/api/3/docs)
|
50
51
|
|
51
52
|
In _BTC-e_ API some methods are _CamelCase_. In this gem those method must be called in _snake_case_ format. For example `TradeHistory` becomes `QueruBtce.trade_history`.
|
52
53
|
|
data/lib/queru_btce.rb
CHANGED
@@ -24,7 +24,7 @@ module QueruBtce
|
|
24
24
|
|
25
25
|
signature = OpenSSL::HMAC.hexdigest('sha512', @api_secret, payload)
|
26
26
|
|
27
|
-
Net::HTTP.start('
|
27
|
+
Net::HTTP.start('wex.nz', 443, use_ssl: true) do |http|
|
28
28
|
headers = { 'Sign': signature, 'Key': @api_key }
|
29
29
|
response = http.post('/tapi', payload, headers).body
|
30
30
|
JSON.parse response, object_class: OpenStruct
|
@@ -38,9 +38,9 @@ module QueruBtce
|
|
38
38
|
def self.public_api(m, *pair)
|
39
39
|
if pair
|
40
40
|
pair = pair.join('-') if pair.is_a? Array
|
41
|
-
JSON.parse open("https://
|
41
|
+
JSON.parse open("https://wex.nz/api/3/#{m}/#{pair}").read, object_class: OpenStruct
|
42
42
|
else
|
43
|
-
JSON.parse open("https://
|
43
|
+
JSON.parse open("https://wex.nz/api/3/#{m}").read, object_class: OpenStruct
|
44
44
|
end
|
45
45
|
rescue OpenURI::HTTPError => e
|
46
46
|
raise "BTC-e API down? #{e}"
|
data/lib/queru_btce/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queru_btce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Queru AKA Jorge Fuertes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|