quadrigacx 0.3.0 → 0.4.0
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/quadrigacx/client/public.rb +8 -0
- data/lib/quadrigacx/version.rb +1 -1
- data/spec/client_spec.rb +11 -0
- data/spec/fixtures/vcr_cassettes/transactions.yml +55 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a5ae600c3af6db8ab2073e6cc64709d994346c0
|
4
|
+
data.tar.gz: dfd126401f57b765a6ac836e4d48c739bd2e922e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e208cc4bda700c440c1808d3708607ebe606d8f02b6e8e20d667797b6171e5e0fb645d2e25ae8852f6a71e14458def68d9c588876aca25a8148dc4f1426828
|
7
|
+
data.tar.gz: 3189131de7793f88b88776b186417ca81ae0b97998658e67b68878a80cc130b44b8615b1cb79336891db7b923c7ef522a5bc5e197f91af58c1a1f5a19f75330a
|
@@ -7,6 +7,14 @@ module QuadrigaCX
|
|
7
7
|
def order_book params={}
|
8
8
|
request(:get, '/order_book', params)
|
9
9
|
end
|
10
|
+
|
11
|
+
# Returns descending JSON list of recent trades
|
12
|
+
#
|
13
|
+
# book - optional, book to return orders for (default btc_cad)
|
14
|
+
# time - optional, time frame for transaction export ("minute" - 1 minute, "hour" - 1 hour). Default: hour.
|
15
|
+
def transactions params={}
|
16
|
+
request(:get, '/transactions', params)
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
12
20
|
|
data/lib/quadrigacx/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -19,6 +19,17 @@ describe QuadrigaCX::Client do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
describe '#transactions' do
|
24
|
+
it 'returns a list of recent trades' do
|
25
|
+
VCR.use_cassette('transactions') do
|
26
|
+
transactions = client.transactions
|
27
|
+
|
28
|
+
expect(transactions.first.date).not_to be_nil
|
29
|
+
expect(transactions.first.price).not_to be_nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
22
33
|
end
|
23
34
|
|
24
35
|
describe 'private' do
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.quadrigacx.com/v2/transactions
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"key":"kOnVDjfPPh","nonce":"1421859871199","signature":"71af7f67029e031d2bd88c87be26a97749ce9a1fe83bd04ed00d2b449911207f"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Content-Length:
|
17
|
+
- '123'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Wed, 21 Jan 2015 17:04:31 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie:
|
36
|
+
- __cfduid=dff373892546d4a5aa2ee49ea11c97afc1421859871; expires=Thu, 21-Jan-16
|
37
|
+
17:04:31 GMT; path=/; domain=.quadrigacx.com; HttpOnly
|
38
|
+
- ci_session=CjNTZwRgADoHKA9wA2YBMAFlDDMAIlRyUjdQJw4sVWsLOAQ7BlgPaVhkBioBawR3BGoLNFc6VG5XIQZnCDEBZlA0B2IFbQ4%2FWmcCYFVmWjEKYlNvBG0AOAcwDzADOgFgATAMMAA5VDNSN1BgDjtVZwtkBDMGNQ9lWDEGKgFrBHcEags2VzhUblchBmoIeAELUDEHZwUwDitaYwIgVSdadwppUy4EbwAxB2APOQN%2BATABYgwxAC5UN1JhUHoOblU2C3kEZwY2DzZYIgYzASMEPgRhCzdXMlR2V3YGcAhtASZQDwdiBTMOPFpoAidVdlpuCiFTZwRhADoHcQ9RAykBYwEsDCsAO1RyUmhQZQ5sVTgLdQQ5BmYPc1h0BlcBMQRnBCQLbld%2BVD1XdwZ6CCoBb1A5BzkFZQ5tWjQCYlVsWmAKa1NlBGIAMQdoD3ADZgE4AW8MKwB1VHJSN1AmDgBVZgs2BCEGZg8iWDsGewFqBDQEagslVypUb1d%2B;
|
39
|
+
expires=Wed, 21-Jan-2015 19:04:31 GMT; Max-Age=7200; path=/
|
40
|
+
X-Frame-Options:
|
41
|
+
- SAMEORIGIN
|
42
|
+
Cf-Ray:
|
43
|
+
- 1ac51763e3b710bd-ORD
|
44
|
+
Content-Encoding:
|
45
|
+
- gzip
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: !binary |-
|
49
|
+
H4sIAAAAAAAAA4zQPQrDMAwF4LtoDkaSLUvOVUqG0HTI0B9KOpXcvdiFUJtA
|
50
|
+
o1E8Pp50esN4vb9uC/SALgQvaIbQwTQuF+iBApOJGRJ08HjO57zkiC7l0DJP
|
51
|
+
0Af2ntaugsSwzAFIKwgriJwYkY8l8w8K/ANxaiBS2W+kURuohDbImtPUazwC
|
52
|
+
SXLlkRukTaP0fdEOxNZAkhcbFNfhAwAA//8DAAUu5xS3AQAA
|
53
|
+
http_version:
|
54
|
+
recorded_at: Wed, 21 Jan 2015 17:04:31 GMT
|
55
|
+
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quadrigacx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maros Hluska
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- spec/fixtures/vcr_cassettes/market_buy.yml
|
138
138
|
- spec/fixtures/vcr_cassettes/open_orders.yml
|
139
139
|
- spec/fixtures/vcr_cassettes/order_book.yml
|
140
|
+
- spec/fixtures/vcr_cassettes/transactions.yml
|
140
141
|
- spec/fixtures/vcr_cassettes/withdraw.yml
|
141
142
|
- spec/spec_helper.rb
|
142
143
|
homepage: http://mhluska.com/
|
@@ -172,5 +173,6 @@ test_files:
|
|
172
173
|
- spec/fixtures/vcr_cassettes/market_buy.yml
|
173
174
|
- spec/fixtures/vcr_cassettes/open_orders.yml
|
174
175
|
- spec/fixtures/vcr_cassettes/order_book.yml
|
176
|
+
- spec/fixtures/vcr_cassettes/transactions.yml
|
175
177
|
- spec/fixtures/vcr_cassettes/withdraw.yml
|
176
178
|
- spec/spec_helper.rb
|