coinstats 0.0.3 → 0.0.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/README.md +1 -1
- data/lib/coinstats.rb +13 -4
- data/lib/coinstats/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8069842632b21f1e6561578c239f3bfbd687cf37
|
|
4
|
+
data.tar.gz: 1270697cff895a796c00310da72ed382a0f76558
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a67cc6b6c3e9fbff866fc37f1f96bc6bb133e2a0b9f4574f9d64e729b2b6794e88a66fe2eb67d67e5839cd5ea9a4e4b71ad0bb404a0ef4fe5ce9ffc3b39a661
|
|
7
|
+
data.tar.gz: 94f7cbaa011f184baf09b1dade0025375643be95c418ef7a45df6ee527fa8222fd0f0b0b322d034de9493e7f996ad779ca2b682b81f89616ae86da0a556a648a
|
data/README.md
CHANGED
data/lib/coinstats.rb
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
require "coinstats/version"
|
|
2
|
+
require 'openssl'
|
|
3
|
+
require 'rest_client'
|
|
4
|
+
require 'json'
|
|
5
|
+
|
|
6
|
+
API_KEY = ''
|
|
7
|
+
API_SECRET = ''
|
|
2
8
|
|
|
3
9
|
module Coinstats
|
|
4
|
-
def self.add(a,b)
|
|
5
|
-
a + b
|
|
6
|
-
end
|
|
7
10
|
def get_http(url, body=nil)
|
|
8
11
|
nonce = (Time.now.to_f * 1e6).to_i
|
|
9
12
|
message = nonce.to_s + url + body.to_s
|
|
@@ -21,5 +24,11 @@ module Coinstats
|
|
|
21
24
|
puts e
|
|
22
25
|
e.response
|
|
23
26
|
end
|
|
24
|
-
|
|
27
|
+
end
|
|
25
28
|
end
|
|
29
|
+
|
|
30
|
+
#data = get_http('https://coinbase.com/api/v1/account/balance')
|
|
31
|
+
#puts get_http('https://coinbase.com/api/v1/prices/spot_rate')
|
|
32
|
+
#puts get_http('https://coinbase.com/api/v1/prices/spot_rate?currency=EUR')
|
|
33
|
+
#puts get_http('https://coinbase.com/api/v1/prices/historical?page=5')
|
|
34
|
+
#puts JSON.parse(data.body)
|
data/lib/coinstats/version.rb
CHANGED