cointrader.net 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8575e7c9f0de7154ecdc863dbc3f390bee560167
4
- data.tar.gz: 2ad987767fe51b17caa6cf8b74e5b3d26facc962
3
+ metadata.gz: 0db047b9510178796a4b3f9d6ae52cff01682a44
4
+ data.tar.gz: 485566802cecd4162c616178d1ee90c990c59dfb
5
5
  SHA512:
6
- metadata.gz: 76966b48d1d9048caa625bc65a9f00bb2bb045b6ba00cb5e1c71a88c357b17b97856a9a8adebf8b04db5f5d08cf129cbcbff7893d362b17583c66d4193857af6
7
- data.tar.gz: fe2b70ccb10511e8c086a80f44ceb506e7d359893a1adf94a1ae57cacc299af5e626b44c3ee462b121151f707cb8266b075a0d2e030ded41419bd989342f2688
6
+ metadata.gz: 961a51857e64557facbb4c01b815f61e54293c2fd0b594744a8dd5fa55d0fb2cd10a47bc4684d0217405f3e4d81a87270c9cba97c709f740d48311d1f301e5d7
7
+ data.tar.gz: 95a53f0f29847b136554caa8efc3f98bb24974f391f8bf67ab748416baad89fc4425ded0329b1440706ca511abf3a5dd9727153281654a9c3f08444631129d8f
@@ -2,12 +2,12 @@ module Cointrader
2
2
  module Order
3
3
  def limit_buy params={}
4
4
  params = get_defaults(params)
5
- request(:post, "/order/#{params[:currency_pair]}/buy")
5
+ request(:post, "/order/#{params[:currency_pair]}/buy", total_quantity: params[:total_quantity], price: params[:price])
6
6
  end
7
7
 
8
8
  def limit_sell params={}
9
9
  params = get_defaults(params)
10
- request(:post, "/order/#{params[:currency_pair]}/sell")
10
+ request(:post, "/order/#{params[:currency_pair]}/sell", total_quantity: params[:total_quantity], price: params[:price])
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Cointrader
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -61,7 +61,7 @@ describe Cointrader::Client do
61
61
  describe '#limit_buy' do
62
62
  it 'returns an order' do
63
63
  VCR.use_cassette('limit_buy') do
64
- response = subject.limit_buy
64
+ response = subject.limit_buy(total_quantity: 10, price: 1)
65
65
 
66
66
  expect_success(response)
67
67
  expect(response['data']['id']).not_to be_nil
@@ -72,7 +72,7 @@ describe Cointrader::Client do
72
72
  describe '#limit_sell' do
73
73
  it 'returns an order' do
74
74
  VCR.use_cassette('limit_sell') do
75
- response = subject.limit_sell
75
+ response = subject.limit_sell(total_quantity: 10, price: 1)
76
76
 
77
77
  expect_success(response)
78
78
  expect(response['data']['id']).not_to be_nil
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/account/balance
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344743245"}'
8
+ string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345445508"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,7 +16,7 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 21d30bb9d6005490ecfe110946b2ccbd07be749242ecaadc8bbd52c327d67d25
19
+ - 24645e009d7c521b01f49b5b9a3737923237ccddcb4d4b8d982879d4047680d8
20
20
  Content-Length:
21
21
  - '77'
22
22
  User-Agent:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f53edda90300f69c0d
44
+ - 555fdab3759c2d030016a114
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:25 GMT
46
+ - Sat, 23 May 2015 01:41:07 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -77,5 +77,5 @@ http_interactions:
77
77
  }
78
78
  }
79
79
  http_version:
80
- recorded_at: Sat, 23 May 2015 01:32:23 GMT
80
+ recorded_at: Sat, 23 May 2015 01:44:05 GMT
81
81
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/order/BTCUSD/buy
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344743535"}'
8
+ string: '{"total_quantity":10,"price":1,"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345445832"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,9 +16,9 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 898a1b605277783216c31b089458e2e0d33b3423bd09cb7f742ee09fc041e30b
19
+ - c872ef62da714fc21b62b488642e9cc985dfa79c7bf74cadfc42465b69ad01a2
20
20
  Content-Length:
21
- - '77'
21
+ - '107'
22
22
  User-Agent:
23
23
  - Ruby
24
24
  response:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f6d00c360300317ef7
44
+ - 555fdab4d00c36030031803b
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:26 GMT
46
+ - Sat, 23 May 2015 01:41:08 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -60,5 +60,5 @@ http_interactions:
60
60
  }
61
61
  }
62
62
  http_version:
63
- recorded_at: Sat, 23 May 2015 01:32:24 GMT
63
+ recorded_at: Sat, 23 May 2015 01:44:06 GMT
64
64
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/order/BTCUSD/sell
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344744396"}'
8
+ string: '{"total_quantity":10,"price":1,"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345446127"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,9 +16,9 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - dd528bcedd43c83c6dac7e36d73853dfc8d45ab4145f50e981e0645d4a0d5c79
19
+ - 7acd255a7f4952cd9263278accef8dba47d6549542671d6e15e54ab1b369e0fc
20
20
  Content-Length:
21
- - '77'
21
+ - '107'
22
22
  User-Agent:
23
23
  - Ruby
24
24
  response:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f63edda90300f69c0e
44
+ - 555fdab4759c2d030016a116
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:26 GMT
46
+ - Sat, 23 May 2015 01:41:08 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -53,5 +53,5 @@ http_interactions:
53
53
  string: "{\n \"success\":true,\n \"message\":\"Sell Order Created\",\n
54
54
  \ \"data\":\n {\n \"id\":\"2221132\"\n }\n} "
55
55
  http_version:
56
- recorded_at: Sat, 23 May 2015 01:32:24 GMT
56
+ recorded_at: Sat, 23 May 2015 01:44:06 GMT
57
57
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/stats/orders/BTCUSD/all/20
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344742945"}'
8
+ string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345443518"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,7 +16,7 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 811a6ee04698a68e320e4bd089e1d805de446f2ca15955869095aaa83d7a4a1a
19
+ - de70251702ddcdaf77da568b9db5257d5fc39bfdcc361a2c4f48c7c014fae1ba
20
20
  Content-Length:
21
21
  - '77'
22
22
  User-Agent:
@@ -41,7 +41,7 @@ http_interactions:
41
41
  Etag:
42
42
  - W/"zVuw45vE0DsxkZqn5802FQ=="
43
43
  Date:
44
- - Sat, 23 May 2015 01:29:25 GMT
44
+ - Sat, 23 May 2015 01:41:07 GMT
45
45
  Via:
46
46
  - 1.1 vegur
47
47
  body:
@@ -108,5 +108,5 @@ http_interactions:
108
108
  ICA8L3NlY3Rpb24+CiAgICAgIDwvb2w+CiAgPC9kaXY+CjwvYm9keT4KPC9o
109
109
  dG1sPgo=
110
110
  http_version:
111
- recorded_at: Sat, 23 May 2015 01:32:23 GMT
111
+ recorded_at: Sat, 23 May 2015 01:44:05 GMT
112
112
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/stats/daily/BTCUSD
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344742275"}'
8
+ string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345442867"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,7 +16,7 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 73d263f1ab089f5a8320103593bb0d6fa41b3e75b094fd4fe26454d65156d074
19
+ - 5ebeefd0e7dac526a9fdd878d575c2ca8bcb23763c19a02c696de162b056edac
20
20
  Content-Length:
21
21
  - '77'
22
22
  User-Agent:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f4759c2d0300169fa8
44
+ - 555fdab1759c2d030016a111
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:24 GMT
46
+ - Sat, 23 May 2015 01:41:05 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -69,5 +69,5 @@ http_interactions:
69
69
  }
70
70
  }
71
71
  http_version:
72
- recorded_at: Sat, 23 May 2015 01:32:22 GMT
72
+ recorded_at: Sat, 23 May 2015 01:44:03 GMT
73
73
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/stats/weekly/BTCUSD
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344742653"}'
8
+ string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345443186"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,7 +16,7 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 5a17dd87ba728e522fbabb8852657de00f50da63b74c5e886611baf3e71affa4
19
+ - b89dfdc1dd225754f06ca6a8e343851ac7414c1ec2831a1716cacd8fedf89e33
20
20
  Content-Length:
21
21
  - '77'
22
22
  User-Agent:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f5759c2d0300169fa9
44
+ - 555fdab1759c2d030016a112
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:25 GMT
46
+ - Sat, 23 May 2015 01:41:05 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -69,5 +69,5 @@ http_interactions:
69
69
  }
70
70
  }
71
71
  http_version:
72
- recorded_at: Sat, 23 May 2015 01:32:22 GMT
72
+ recorded_at: Sat, 23 May 2015 01:44:03 GMT
73
73
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://private-anon-e01e290b7-cointrader.apiary-mock.com/api4/stats/symbol
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432344741868"}'
8
+ string: '{"secret":"l33lpBPqrNazDz5bgOpQkaerFtpOBqw8wjLTK3sbEcSK","t":"1432345442031"}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
@@ -16,7 +16,7 @@ http_interactions:
16
16
  X-Auth:
17
17
  - hCkVvzR4Nuc6dbuN0biMFSqMqSfc1f1grhXqoaQAlq1y
18
18
  X-Auth-Hash:
19
- - 46469148812ab7616fb7673e874366a5232033f96ceb456ad7109aab271812b8
19
+ - 00d394e2c6800fea9d1757c463367b47f92cc6b53290ca312acee9a531c9420e
20
20
  Content-Length:
21
21
  - '77'
22
22
  User-Agent:
@@ -41,9 +41,9 @@ http_interactions:
41
41
  Access-Control-Max-Age:
42
42
  - '10'
43
43
  X-Apiary-Transaction-Id:
44
- - 555fd7f4759c2d0300169fa7
44
+ - 555fdab03edda90300f69d59
45
45
  Date:
46
- - Sat, 23 May 2015 01:29:24 GMT
46
+ - Sat, 23 May 2015 01:41:04 GMT
47
47
  Transfer-Encoding:
48
48
  - chunked
49
49
  Via:
@@ -76,5 +76,5 @@ http_interactions:
76
76
  ]
77
77
  }
78
78
  http_version:
79
- recorded_at: Sat, 23 May 2015 01:32:22 GMT
79
+ recorded_at: Sat, 23 May 2015 01:44:02 GMT
80
80
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cointrader.net
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maros Hluska