currency-rate 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/VERSION +1 -1
  4. data/currency-rate.gemspec +22 -3
  5. data/lib/adapter.rb +17 -9
  6. data/lib/btc_adapter.rb +4 -6
  7. data/lib/btc_adapters/average_rate_adapter.rb +4 -3
  8. data/lib/btc_adapters/bitfinex_adapter.rb +30 -0
  9. data/lib/btc_adapters/bitpay_adapter.rb +10 -3
  10. data/lib/btc_adapters/bitstamp_adapter.rb +24 -5
  11. data/lib/btc_adapters/btcchina_adapter.rb +13 -0
  12. data/lib/btc_adapters/btce_adapter.rb +26 -5
  13. data/lib/btc_adapters/coinbase_adapter.rb +2 -2
  14. data/lib/btc_adapters/huobi_adapter.rb +30 -0
  15. data/lib/btc_adapters/kraken_adapter.rb +14 -5
  16. data/lib/btc_adapters/localbitcoins_adapter.rb +10 -3
  17. data/lib/btc_adapters/okcoin_adapter.rb +24 -5
  18. data/lib/currency_rate.rb +11 -10
  19. data/lib/fiat_adapter.rb +4 -18
  20. data/lib/fiat_adapters/fixer_adapter.rb +20 -5
  21. data/lib/fiat_adapters/yahoo_adapter.rb +28 -6
  22. data/spec/currency_rate_spec.rb +10 -6
  23. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/average_rate_adapter.yml +423 -0
  24. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/bitfinex_adapter.yml +125 -0
  25. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/bitpay_adapter_yml.yml +272 -0
  26. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/bitstamp_adapter.yml +153 -0
  27. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/btcchina_adapter.yml +83 -0
  28. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/btce_adapter.yml +223 -0
  29. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/coinbase_adapter.yml +76 -0
  30. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/huobi_adapter.yml +83 -0
  31. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/kraken_adapter.yml +83 -0
  32. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/localbitcoins_adapter.yml +128 -0
  33. data/spec/fixtures/vcr/exchange_rate_adapters/btc_adapters/okcoin_adapter.yml +207 -0
  34. data/spec/fixtures/vcr/exchange_rate_adapters/fiat_adapters/fixer_adapter.yml +81 -0
  35. data/spec/fixtures/vcr/exchange_rate_adapters/fiat_adapters/yahoo_adapter.yml +50 -0
  36. data/spec/lib/btc_adapter_spec.rb +16 -28
  37. data/spec/lib/btc_adapters/average_rate_adapter_spec.rb +4 -4
  38. data/spec/lib/btc_adapters/bitfinex_adapter_spec.rb +38 -0
  39. data/spec/lib/btc_adapters/bitpay_adapter_spec.rb +8 -3
  40. data/spec/lib/btc_adapters/bitstamp_adapter_spec.rb +8 -3
  41. data/spec/lib/btc_adapters/btcchina_adapter_spec.rb +36 -0
  42. data/spec/lib/btc_adapters/btce_adapter_spec.rb +10 -3
  43. data/spec/lib/btc_adapters/coinbase_adapter_spec.rb +5 -3
  44. data/spec/lib/btc_adapters/huobi_adapter_spec.rb +38 -0
  45. data/spec/lib/btc_adapters/kraken_adapter_spec.rb +6 -3
  46. data/spec/lib/btc_adapters/localbitcoins_adapter_spec.rb +4 -3
  47. data/spec/lib/btc_adapters/okcoin_adapter_spec.rb +11 -3
  48. data/spec/lib/fiat_adapters/fixer_adapter_spec.rb +5 -2
  49. data/spec/lib/fiat_adapters/yahoo_adapter_spec.rb +5 -2
  50. metadata +21 -2
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.kraken.com/0/public/Ticker?pair=xbtusd
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sun, 19 Jun 2016 08:30:57 GMT
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ Set-Cookie:
30
+ - __cfduid=d402539a115cb70a2e55852cc8cfce6771466325056; expires=Mon, 19-Jun-17
31
+ 08:30:56 GMT; path=/; domain=.kraken.com; HttpOnly
32
+ Vary:
33
+ - Accept-Encoding
34
+ Server:
35
+ - cloudflare-nginx
36
+ Cf-Ray:
37
+ - 2b559f31f6791111-SIN
38
+ body:
39
+ encoding: ASCII-8BIT
40
+ string: '{"error":[],"result":{"XXBTZUSD":{"a":["758.50900","53","53.000"],"b":["755.35300","3","3.000"],"c":["755.15000","0.88350000"],"v":["644.83315964","5488.21581492"],"p":["752.37956","763.98299"],"t":[983,5366],"l":["745.03000","745.00000"],"h":["761.02000","781.14800"],"o":"758.11000"}}}'
41
+ http_version:
42
+ recorded_at: Sun, 19 Jun 2016 08:30:57 GMT
43
+ - request:
44
+ method: get
45
+ uri: https://api.kraken.com/0/public/Ticker?pair=xbteur
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ''
49
+ headers:
50
+ Accept-Encoding:
51
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
52
+ Accept:
53
+ - "*/*"
54
+ User-Agent:
55
+ - Ruby
56
+ response:
57
+ status:
58
+ code: 200
59
+ message: OK
60
+ headers:
61
+ Date:
62
+ - Sun, 19 Jun 2016 08:30:58 GMT
63
+ Content-Type:
64
+ - application/json; charset=utf-8
65
+ Transfer-Encoding:
66
+ - chunked
67
+ Connection:
68
+ - keep-alive
69
+ Set-Cookie:
70
+ - __cfduid=dd39c75a5254396276fe351f6dcfb329d1466325057; expires=Mon, 19-Jun-17
71
+ 08:30:57 GMT; path=/; domain=.kraken.com; HttpOnly
72
+ Vary:
73
+ - Accept-Encoding
74
+ Server:
75
+ - cloudflare-nginx
76
+ Cf-Ray:
77
+ - 2b559f3ae86601cb-SIN
78
+ body:
79
+ encoding: ASCII-8BIT
80
+ string: '{"error":[],"result":{"XXBTZEUR":{"a":["671.21500","1","1.000"],"b":["671.21400","1","1.000"],"c":["671.21500","0.08714000"],"v":["1548.25746642","11325.90266782"],"p":["667.89052","675.58056"],"t":[3023,17388],"l":["660.01500","660.00000"],"h":["675.00000","694.26000"],"o":"674.30000"}}}'
81
+ http_version:
82
+ recorded_at: Sun, 19 Jun 2016 08:30:58 GMT
83
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,128 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://localbitcoins.com/bitcoinaverage/ticker-all-currencies/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Mon, 30 May 2016 12:37:29 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ Set-Cookie:
30
+ - __cfduid=d207e2f50c79a385181ebc5d62f91b7451464611849; expires=Tue, 30-May-17
31
+ 12:37:29 GMT; path=/; domain=.localbitcoins.com; HttpOnly
32
+ - django_language=en
33
+ - localbitcoinssession=None; Domain=localbitcoins.com; expires=Mon, 30-May-2016
34
+ 18:37:29 GMT; httponly; Max-Age=21600; Path=/; secure
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ Content-Language:
38
+ - en
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains; preload
41
+ Vary:
42
+ - Accept-Language, Cookie
43
+ X-Frame-Options:
44
+ - DENY
45
+ Server:
46
+ - cloudflare-nginx
47
+ Cf-Ray:
48
+ - 2ab23cda6fef426d-OSL
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: '{"COP": {"avg_12h": "1503759.40", "volume_btc": "5.89580000", "avg_24h":
52
+ "1487922.72", "rates": {"last": "1529051.99"}}, "USD": {"avg_12h": "549.03",
53
+ "volume_btc": "813.31260000", "avg_24h": "585.42", "avg_1h": "491.37", "rates":
54
+ {"last": "591.95"}, "avg_6h": "592.46"}, "IDR": {"volume_btc": "0.04170000",
55
+ "avg_24h": "7182254.20", "rates": {"last": "7182254.20"}}, "PEN": {"avg_12h":
56
+ "2016.24", "volume_btc": "0.37340000", "avg_24h": "2000.54", "rates": {"last":
57
+ "2016.24"}}, "AED": {"avg_12h": "2119.45", "volume_btc": "8.94690000", "avg_24h":
58
+ "2077.13", "rates": {"last": "2137.97"}, "avg_6h": "2137.40"}, "GBP": {"avg_12h":
59
+ "373.12", "volume_btc": "430.10190000", "avg_24h": "365.95", "avg_1h": "373.90",
60
+ "rates": {"last": "373.97"}, "avg_6h": "373.84"}, "DOP": {"volume_btc": "0.51290000",
61
+ "avg_24h": "25346.07", "rates": {"last": "25346.07"}}, "DKK": {"avg_12h":
62
+ "3857.28", "volume_btc": "0.36190000", "avg_24h": "4144.79", "rates": {"last":
63
+ "3857.28"}, "avg_6h": "3857.28"}, "CAD": {"avg_12h": "709.98", "volume_btc":
64
+ "12.09200000", "avg_24h": "704.94", "avg_1h": "731.43", "rates": {"last":
65
+ "731.43"}, "avg_6h": "698.18"}, "PKR": {"avg_12h": "53386.11", "volume_btc":
66
+ "10.37130000", "avg_24h": "52970.91", "avg_1h": "52567.96", "rates": {"last":
67
+ "55370.99"}, "avg_6h": "53377.91"}, "HUF": {"avg_12h": "152366.44", "volume_btc":
68
+ "1.05010000", "avg_24h": "152366.44", "rates": {"last": "160342.06"}, "avg_6h":
69
+ "152366.44"}, "VND": {"avg_12h": "10671916.14", "volume_btc": "5.90530000",
70
+ "avg_24h": "10671916.14", "rates": {"last": "12755158.91"}, "avg_6h": "10671916.14"},
71
+ "RON": {"avg_12h": "2082.04", "volume_btc": "20.70270000", "avg_24h": "2072.03",
72
+ "avg_1h": "1964.15", "rates": {"last": "2230.15"}, "avg_6h": "2082.04"}, "MYR":
73
+ {"avg_12h": "2217.83", "volume_btc": "40.54900000", "avg_24h": "2233.80",
74
+ "avg_1h": "2264.63", "rates": {"last": "2375.30"}, "avg_6h": "2267.61"}, "UAH":
75
+ {"avg_12h": "13183.60", "volume_btc": "3.64870000", "avg_24h": "13073.26",
76
+ "rates": {"last": "13912.08"}, "avg_6h": "13603.28"}, "SAR": {"volume_btc":
77
+ "0.27130000", "avg_24h": "2027.27", "rates": {"last": "2172.02"}}, "SEK":
78
+ {"avg_12h": "4671.10", "volume_btc": "82.62260000", "avg_24h": "4646.47",
79
+ "avg_1h": "4750.02", "rates": {"last": "4709.58"}, "avg_6h": "4649.56"}, "SGD":
80
+ {"avg_12h": "753.63", "volume_btc": "10.73370000", "avg_24h": "755.08", "rates":
81
+ {"last": "762.52"}, "avg_6h": "758.96"}, "HKD": {"avg_12h": "4204.58", "volume_btc":
82
+ "5.20370000", "avg_24h": "4147.98", "rates": {"last": "4396.81"}, "avg_6h":
83
+ "4396.81"}, "AUD": {"avg_12h": "747.65", "volume_btc": "299.03490000", "avg_24h":
84
+ "747.58", "avg_1h": "751.86", "rates": {"last": "727.88"}, "avg_6h": "749.57"},
85
+ "CHF": {"avg_12h": "529.13", "volume_btc": "2.95320000", "avg_24h": "529.26",
86
+ "rates": {"last": "500.00"}, "avg_6h": "529.13"}, "IRR": {"volume_btc": "0.55670000",
87
+ "avg_24h": "17962996.23", "rates": {"last": "17962996.23"}}, "BYR": {"volume_btc":
88
+ "0.12010000", "avg_24h": "13530391.34", "rates": {"last": "13618677.04"}},
89
+ "CNY": {"avg_12h": "3778.78", "volume_btc": "110.33540000", "avg_24h": "3683.94",
90
+ "avg_1h": "3871.01", "rates": {"last": "3877.07"}, "avg_6h": "3717.22"}, "VEF":
91
+ {"avg_12h": "472609.86", "volume_btc": "13.65000000", "avg_24h": "459761.11",
92
+ "rates": {"last": "467460.00"}, "avg_6h": "467460.00"}, "HRK": {"avg_12h":
93
+ "3783.39", "volume_btc": "15.30820000", "avg_24h": "3781.95", "avg_1h": "3805.72",
94
+ "rates": {"last": "3815.79"}, "avg_6h": "3786.51"}, "NZD": {"avg_12h": "823.61",
95
+ "volume_btc": "31.42280000", "avg_24h": "823.98", "avg_1h": "895.02", "rates":
96
+ {"last": "909.00"}, "avg_6h": "805.59"}, "CLP": {"avg_12h": "412087.91", "volume_btc":
97
+ "0.44590000", "avg_24h": "387972.26", "rates": {"last": "411522.63"}}, "THB":
98
+ {"avg_12h": "19028.11", "volume_btc": "29.77660000", "avg_24h": "19058.49",
99
+ "avg_1h": "20600.35", "rates": {"last": "20703.93"}, "avg_6h": "18964.44"},
100
+ "EUR": {"avg_12h": "462.44", "volume_btc": "116.81960000", "avg_24h": "462.18",
101
+ "avg_1h": "481.75", "rates": {"last": "585.31"}, "avg_6h": "459.80"}, "TRY":
102
+ {"avg_12h": "1555.77", "volume_btc": "3.56490000", "avg_24h": "1560.96", "rates":
103
+ {"last": "1528.55"}, "avg_6h": "1555.77"}, "ARS": {"avg_12h": "7205.24", "volume_btc":
104
+ "1.05040000", "avg_24h": "7425.74", "rates": {"last": "7205.24"}}, "NOK":
105
+ {"avg_12h": "4461.10", "volume_btc": "37.73380000", "avg_24h": "4470.77",
106
+ "avg_1h": "4539.18", "rates": {"last": "4539.18"}, "avg_6h": "4402.57"}, "RUB":
107
+ {"avg_12h": "34758.32", "volume_btc": "689.11840000", "avg_24h": "34640.07",
108
+ "avg_1h": "34954.05", "rates": {"last": "35732.81"}, "avg_6h": "34717.01"},
109
+ "ZAR": {"avg_12h": "9063.20", "volume_btc": "94.54370000", "avg_24h": "8941.39",
110
+ "avg_1h": "9227.35", "rates": {"last": "8705.88"}, "avg_6h": "9077.46"}, "INR":
111
+ {"avg_12h": "35937.90", "volume_btc": "51.45810000", "avg_24h": "35618.95",
112
+ "avg_1h": "36250.09", "rates": {"last": "37593.98"}, "avg_6h": "36008.48"},
113
+ "MXN": {"avg_12h": "11637.14", "volume_btc": "3.57150000", "avg_24h": "10800.50",
114
+ "rates": {"last": "11904.76"}, "avg_6h": "11904.76"}, "CZK": {"avg_12h": "12328.35",
115
+ "volume_btc": "6.32060000", "avg_24h": "12332.65", "avg_1h": "13210.04", "rates":
116
+ {"last": "13210.04"}, "avg_6h": "13287.98"}, "BRL": {"avg_12h": "1999.03",
117
+ "volume_btc": "0.47280000", "avg_24h": "2014.02", "avg_1h": "1976.00", "rates":
118
+ {"last": "1976.00"}, "avg_6h": "1996.80"}, "MAD": {"avg_12h": "5965.80", "volume_btc":
119
+ "6.34450000", "avg_24h": "5965.80", "rates": {"last": "5950.34"}, "avg_6h":
120
+ "5965.80"}, "PLN": {"avg_12h": "2004.16", "volume_btc": "3.82930000", "avg_24h":
121
+ "2000.37", "rates": {"last": "2004.16"}, "avg_6h": "2004.16"}, "PHP": {"avg_12h":
122
+ "24946.21", "volume_btc": "11.71690000", "avg_24h": "24946.21", "rates": {"last":
123
+ "25704.80"}, "avg_6h": "25798.16"}, "KES": {"avg_12h": "58377.91", "volume_btc":
124
+ "11.51080000", "avg_24h": "58604.42", "avg_1h": "59061.04", "rates": {"last":
125
+ "59283.39"}, "avg_6h": "58119.21"}}'
126
+ http_version:
127
+ recorded_at: Mon, 30 May 2016 12:37:29 GMT
128
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,207 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.okcoin.com/api/v1/ticker.do?symbol=ltc_usd
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 18 Jun 2016 17:13:22 GMT
23
+ Content-Type:
24
+ - text/html;charset=UTF-8
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ Set-Cookie:
30
+ - __cfduid=d54b9b2ef78b8ab5afdc1544d4eefe7851466270002; expires=Sun, 18-Jun-17
31
+ 17:13:22 GMT; path=/; domain=.okcoin.com; HttpOnly
32
+ - coin_session_id_o=18547993-3305-4fe5-9181-746f999c04d6OROA; Domain=okcoin.com;
33
+ Path=/; Secure; HttpOnly
34
+ - language=1; Expires=Sat, 25-Jun-2016 17:13:22 GMT; Path=/
35
+ Cache-Control:
36
+ - no-store
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ Pragma:
40
+ - no-cache
41
+ X-Frame-Options:
42
+ - SAMEORIGIN
43
+ Access-Control-Allow-Credentials:
44
+ - 'true'
45
+ Access-Control-Allow-Origin:
46
+ - https://img.okcoin.com
47
+ Server:
48
+ - cloudflare-nginx
49
+ Cf-Ray:
50
+ - 2b505f1c1f0b3132-SIN
51
+ body:
52
+ encoding: ASCII-8BIT
53
+ string: '{"date":"1466270002","ticker":{"buy":"5.661","high":"5.989","last":"5.661","low":"5.386","sell":"5.663","vol":"91684.538"}}'
54
+ http_version:
55
+ recorded_at: Sat, 18 Jun 2016 17:13:22 GMT
56
+ - request:
57
+ method: get
58
+ uri: https://www.okcoin.com/api/v1/ticker.do?symbol=btc_usd
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ''
62
+ headers:
63
+ Accept-Encoding:
64
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
+ Accept:
66
+ - "*/*"
67
+ User-Agent:
68
+ - Ruby
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Date:
75
+ - Sat, 18 Jun 2016 17:13:23 GMT
76
+ Content-Type:
77
+ - text/html;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ Set-Cookie:
83
+ - __cfduid=dcccbf67194b5cb96029f601c9bfd3a581466270003; expires=Sun, 18-Jun-17
84
+ 17:13:23 GMT; path=/; domain=.okcoin.com; HttpOnly
85
+ - coin_session_id_o=bd9c892b-ff15-46f7-9552-8f438f5f53bfxuST; Domain=okcoin.com;
86
+ Path=/; Secure; HttpOnly
87
+ - language=0; Expires=Sat, 25-Jun-2016 17:13:23 GMT; Path=/
88
+ Cache-Control:
89
+ - no-store
90
+ Expires:
91
+ - Thu, 01 Jan 1970 00:00:00 GMT
92
+ Pragma:
93
+ - no-cache
94
+ X-Frame-Options:
95
+ - SAMEORIGIN
96
+ Access-Control-Allow-Credentials:
97
+ - 'true'
98
+ Access-Control-Allow-Origin:
99
+ - https://img.okcoin.com
100
+ Server:
101
+ - cloudflare-nginx
102
+ Cf-Ray:
103
+ - 2b505f1f88e231fe-SIN
104
+ body:
105
+ encoding: ASCII-8BIT
106
+ string: '{"date":"1466270003","ticker":{"buy":"769.38","high":"775.51","last":"769.05","low":"725.01","sell":"769.39","vol":"11944.5331"}}'
107
+ http_version:
108
+ recorded_at: Sat, 18 Jun 2016 17:13:23 GMT
109
+ - request:
110
+ method: get
111
+ uri: https://www.okcoin.cn/api/ticker.do?symbol=btc_cny
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ headers:
116
+ Accept-Encoding:
117
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
118
+ Accept:
119
+ - "*/*"
120
+ User-Agent:
121
+ - Ruby
122
+ response:
123
+ status:
124
+ code: 200
125
+ message: OK
126
+ headers:
127
+ Server:
128
+ - nginx
129
+ Date:
130
+ - Sat, 18 Jun 2016 17:13:26 GMT
131
+ Content-Type:
132
+ - text/html;charset=UTF-8
133
+ Content-Length:
134
+ - '147'
135
+ Connection:
136
+ - keep-alive
137
+ Set-Cookie:
138
+ - coin_session_id_o=bbb48e4c-ae94-4acf-83aa-77b35644656aSooe; Domain=okcoin.cn;
139
+ Path=/; Secure; HttpOnly
140
+ - language=0; Expires=Sat, 25-Jun-2016 17:13:26 GMT; Path=/
141
+ Cache-Control:
142
+ - no-store
143
+ Expires:
144
+ - Thu, 01 Jan 1970 00:00:00 GMT
145
+ Pragma:
146
+ - no-cache
147
+ X-Frame-Options:
148
+ - SAMEORIGIN
149
+ Access-Control-Allow-Credentials:
150
+ - 'true'
151
+ Access-Control-Allow-Origin:
152
+ - https://img.okcoin.cn
153
+ body:
154
+ encoding: UTF-8
155
+ string: '{"date":"1466270006","ticker":{"buy":"5112.95","change":0.02,"high":"5160.0","last":"5113.0","low":"4841.12","sell":"5113.0","vol":"1292892.0608"}}'
156
+ http_version:
157
+ recorded_at: Sat, 18 Jun 2016 17:13:26 GMT
158
+ - request:
159
+ method: get
160
+ uri: https://www.okcoin.cn/api/ticker.do?symbol=ltc_cny
161
+ body:
162
+ encoding: US-ASCII
163
+ string: ''
164
+ headers:
165
+ Accept-Encoding:
166
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
167
+ Accept:
168
+ - "*/*"
169
+ User-Agent:
170
+ - Ruby
171
+ response:
172
+ status:
173
+ code: 200
174
+ message: OK
175
+ headers:
176
+ Server:
177
+ - nginx
178
+ Date:
179
+ - Sat, 18 Jun 2016 17:13:27 GMT
180
+ Content-Type:
181
+ - text/html;charset=UTF-8
182
+ Content-Length:
183
+ - '144'
184
+ Connection:
185
+ - keep-alive
186
+ Set-Cookie:
187
+ - coin_session_id_o=d98d2276-90bb-4dd8-8b53-7cc2e9dc4627aNON; Domain=okcoin.cn;
188
+ Path=/; Secure; HttpOnly
189
+ - language=0; Expires=Sat, 25-Jun-2016 17:13:27 GMT; Path=/
190
+ Cache-Control:
191
+ - no-store
192
+ Expires:
193
+ - Thu, 01 Jan 1970 00:00:00 GMT
194
+ Pragma:
195
+ - no-cache
196
+ X-Frame-Options:
197
+ - SAMEORIGIN
198
+ Access-Control-Allow-Credentials:
199
+ - 'true'
200
+ Access-Control-Allow-Origin:
201
+ - https://img.okcoin.cn
202
+ body:
203
+ encoding: UTF-8
204
+ string: '{"date":"1466270007","ticker":{"buy":"37.67","change":0.014,"high":"38.2","last":"37.68","low":"36.2","sell":"37.68","vol":"98101757.02760004"}}'
205
+ http_version:
206
+ recorded_at: Sat, 18 Jun 2016 17:13:27 GMT
207
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.fixer.io/latest?base=eur
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx/1.11.1
23
+ Date:
24
+ - Sun, 19 Jun 2016 06:58:50 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '452'
29
+ Connection:
30
+ - keep-alive
31
+ Last-Modified:
32
+ - Fri, 17 Jun 2016 00:00:00 GMT
33
+ Vary:
34
+ - Origin
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"base":"EUR","date":"2016-06-17","rates":{"AUD":1.5234,"BGN":1.9558,"BRL":3.8942,"CAD":1.4519,"CHF":1.0818,"CNY":7.4171,"CZK":27.069,"DKK":7.4362,"GBP":0.7877,"HKD":8.7338,"HRK":7.521,"HUF":314.26,"IDR":14996.53,"ILS":4.3572,"INR":75.4975,"JPY":117.34,"KRW":1318.22,"MXN":21.2471,"MYR":4.6153,"NOK":9.431,"NZD":1.5959,"PHP":52.258,"PLN":4.4463,"RON":4.5355,"RUB":73.2867,"SEK":9.3815,"SGD":1.5187,"THB":39.704,"TRY":3.2988,"USD":1.1254,"ZAR":17.1218}}'
40
+ http_version:
41
+ recorded_at: Sun, 19 Jun 2016 06:58:50 GMT
42
+ - request:
43
+ method: get
44
+ uri: http://api.fixer.io/latest?base=usd
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ Accept-Encoding:
50
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
51
+ Accept:
52
+ - "*/*"
53
+ User-Agent:
54
+ - Ruby
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ Server:
61
+ - nginx/1.11.1
62
+ Date:
63
+ - Sun, 19 Jun 2016 06:58:51 GMT
64
+ Content-Type:
65
+ - application/json
66
+ Content-Length:
67
+ - '447'
68
+ Connection:
69
+ - keep-alive
70
+ Last-Modified:
71
+ - Fri, 17 Jun 2016 00:00:00 GMT
72
+ Vary:
73
+ - Origin
74
+ X-Content-Type-Options:
75
+ - nosniff
76
+ body:
77
+ encoding: UTF-8
78
+ string: '{"base":"USD","date":"2016-06-17","rates":{"AUD":1.3537,"BGN":1.7379,"BRL":3.4603,"CAD":1.2901,"CHF":0.96126,"CNY":6.5906,"CZK":24.053,"DKK":6.6076,"GBP":0.69993,"HKD":7.7606,"HRK":6.683,"HUF":279.24,"IDR":13326.0,"ILS":3.8717,"INR":67.085,"JPY":104.27,"KRW":1171.3,"MXN":18.88,"MYR":4.101,"NOK":8.3801,"NZD":1.4181,"PHP":46.435,"PLN":3.9509,"RON":4.0301,"RUB":65.121,"SEK":8.3361,"SGD":1.3495,"THB":35.28,"TRY":2.9312,"ZAR":15.214,"EUR":0.88857}}'
79
+ http_version:
80
+ recorded_at: Sun, 19 Jun 2016 06:58:51 GMT
81
+ recorded_with: VCR 3.0.3