rbtc_arbitrage 1.4.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/Gemfile +17 -14
  4. data/Gemfile.lock +26 -28
  5. data/lib/rbtc_arbitrage.rb +2 -2
  6. data/lib/rbtc_arbitrage/cli.rb +1 -1
  7. data/lib/rbtc_arbitrage/trader.rb +8 -2
  8. data/lib/rbtc_arbitrage/version.rb +1 -1
  9. data/rbtc_arbitrage.gemspec +1 -3
  10. data/spec/clients/bitstamp_client_spec.rb +2 -2
  11. data/spec/rbtc_arbitrage_spec.rb +1 -1
  12. data/spec/spec_helper.rb +1 -1
  13. data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_transfer/calls_Bitstamp_correctly.yml +48 -0
  14. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml +46 -48
  15. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml +52 -52
  16. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml +49 -46
  17. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/should_fetch_balance.yml +43 -173
  18. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/shouldn_t_raise_security_error.yml +87 -168
  19. data/spec/support/cassettes/RbtcArbitrage_Trader/_fetch_prices/gets_the_right_price_set.yml +101 -98
  20. data/spec/trader_spec.rb +4 -4
  21. metadata +6 -56
  22. data/lib/rbtc_arbitrage/clients/mtgox_client.rb +0 -56
  23. data/spec/clients/mtgox_client_spec.rb +0 -53
  24. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml +0 -77
  25. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml +0 -44
  26. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml +0 -44
  27. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_prices_correctly.yml +0 -85
@@ -2,43 +2,50 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://data.mtgox.com/api/1/BTCUSD/ticker
5
+ uri: https://campbx.com/api/xticker.php
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- Accept:
11
- - application/json
12
- User-Agent:
13
- - mtgox gem 1.1.0
14
10
  Accept-Encoding:
15
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
21
  Server:
22
- - nginx/1.4.4
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - PHP/5.5.4
27
- Access-Control-Allow-Origin:
28
- - '*'
29
- Content-Length:
30
- - '1377'
31
- Expires:
32
- - Sat, 14 Dec 2013 00:11:24 GMT
22
+ - cloudflare-nginx
33
23
  Date:
34
- - Sat, 14 Dec 2013 00:11:16 GMT
24
+ - Sun, 23 Mar 2014 03:30:45 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
35
29
  Connection:
36
30
  - keep-alive
31
+ Set-Cookie:
32
+ - __cfduid=ded7ab9cbb5b9cf6eba9545a8481bbe301395545444727; expires=Mon, 23-Dec-2019
33
+ 23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
34
+ X-Frame-Options:
35
+ - SAMEORIGIN
36
+ Cache-Control:
37
+ - no-cache, must-revalidate, max-age=3600
38
+ Vary:
39
+ - Accept-Encoding
40
+ Expires:
41
+ - Sun, 23 Mar 2014 04:30:39 GMT
42
+ Cf-Ray:
43
+ - 10f78d5581850657-SJC
37
44
  body:
38
45
  encoding: UTF-8
39
- string: '{"result":"success","return":{"high":{"value":"990.00000","value_int":"99000000","display":"$990.00","display_short":"$990.00","currency":"USD"},"low":{"value":"882.15864","value_int":"88215864","display":"$882.16","display_short":"$882.16","currency":"USD"},"avg":{"value":"929.85051","value_int":"92985051","display":"$929.85","display_short":"$929.85","currency":"USD"},"vwap":{"value":"931.14105","value_int":"93114105","display":"$931.14","display_short":"$931.14","currency":"USD"},"vol":{"value":"17098.42923413","value_int":"1709842923413","display":"17,098.43\u00a0BTC","display_short":"17,098.43\u00a0BTC","currency":"BTC"},"last_local":{"value":"936.91051","value_int":"93691051","display":"$936.91","display_short":"$936.91","currency":"USD"},"last_orig":{"value":"936.91051","value_int":"93691051","display":"$936.91","display_short":"$936.91","currency":"USD"},"last_all":{"value":"936.91051","value_int":"93691051","display":"$936.91","display_short":"$936.91","currency":"USD"},"last":{"value":"936.91051","value_int":"93691051","display":"$936.91","display_short":"$936.91","currency":"USD"},"buy":{"value":"936.91051","value_int":"93691051","display":"$936.91","display_short":"$936.91","currency":"USD"},"sell":{"value":"939.99999","value_int":"93999999","display":"$940.00","display_short":"$940.00","currency":"USD"},"item":"BTC","now":"1386979853545522"}}'
40
- http_version:
41
- recorded_at: Sat, 14 Dec 2013 00:11:15 GMT
46
+ string: '{"Last Trade":"582.01","Best Bid":"598.00","Best Ask":"599.99"}'
47
+ http_version:
48
+ recorded_at: Sun, 23 Mar 2014 03:30:44 GMT
42
49
  - request:
43
50
  method: get
44
51
  uri: https://www.bitstamp.net/api/ticker/
@@ -52,86 +59,42 @@ http_interactions:
52
59
  message: OK
53
60
  headers:
54
61
  Date:
55
- - Sat, 14 Dec 2013 00:11:18 GMT
62
+ - Sun, 23 Mar 2014 03:30:46 GMT
56
63
  Server:
57
64
  - Apache
58
- Content-Language:
59
- - en
60
- Expires:
61
- - Sat, 14 Dec 2013 00:11:18 GMT
62
- Vary:
63
- - Accept-Language
64
- Cache-Control:
65
- - max-age=0
66
65
  Last-Modified:
67
- - Sat, 14 Dec 2013 00:11:18 GMT
66
+ - Sun, 23 Mar 2014 03:30:40 GMT
67
+ Etag:
68
+ - '"120627-a0-4f53dbe43993c"'
69
+ Accept-Ranges:
70
+ - bytes
71
+ Content-Length:
72
+ - '160'
68
73
  Connection:
69
74
  - close
70
- Transfer-Encoding:
71
- - chunked
72
75
  Content-Type:
73
76
  - application/json
74
77
  Set-Cookie:
75
- - incap_ses_124_99025=wp/Pe6y/EklQ+vjVAYq4ASaiq1IAAAAAZp7dDncapnrTcJ5kpIQdyw==;
78
+ - incap_ses_209_99025=ac97CP6xUQT2lWvjkIXmAmVVLlMAAAAADla0l37QEduCr4KyyIndGg==;
76
79
  path=/; Domain=.bitstamp.net
77
- - nlbi_99025=frJvdklUpDcWVR4aItob8gAAAAD//cyej+u2tsraUKi14TY1; path=/; Domain=.bitstamp.net
78
- - visid_incap_99025=htYi8DIDT6mQNq81wErLuCaiq1IAAAAAQUIPAAAAAAC6L4jthZPC0huW9aVHobjK;
79
- expires=Sun, 13 Dec 2015 10:20:58 GMT; path=/; Domain=.bitstamp.net
80
+ - nlbi_99025=0G3MM5q2Pzwr+8o8+dl6vQAAAADv3RENe5/Dnu0w3GAAKrKa; path=/; Domain=.bitstamp.net
81
+ - visid_incap_99025=zjGAh9DuTmOh+ixrHvdIKWVVLlMAAAAAQUIPAAAAAADth/HKqj8PLoFfrRankXPA;
82
+ expires=Mon, 21 Mar 2016 09:10:05 GMT; path=/; Domain=.bitstamp.net
80
83
  X-Iinfo:
81
- - 6-267125833-267125990 NNNY CT(194 197 0) RT(1386979877303 200) q(0 0 3 -1)
82
- r(3 5) U6
84
+ - 9-47163190-47163247 NNNN CT(148 156 0) RT(1395545444598 256) q(0 0 3 -1) r(3
85
+ 6) U13
83
86
  X-Cdn:
84
87
  - Incapsula
85
88
  body:
86
89
  encoding: ASCII-8BIT
87
- string: '{"high": "920.42", "last": "881.01", "timestamp": "1386979871", "bid":
88
- "880.58", "volume": "14742.57748152", "low": "850.00", "ask": "881.01"}'
89
- http_version:
90
- recorded_at: Sat, 14 Dec 2013 00:11:17 GMT
91
- - request:
92
- method: post
93
- uri: https://data.mtgox.com/api/1/generic/info
94
- body:
95
- encoding: US-ASCII
96
- string: nonce=1386979877064995
97
- headers: {}
98
- response:
99
- status:
100
- code: 200
101
- message: OK
102
- headers:
103
- Server:
104
- - nginx/1.4.4
105
- Content-Type:
106
- - application/json; charset=utf-8
107
- X-Powered-By:
108
- - PHP/5.5.4
109
- Access-Control-Allow-Origin:
110
- - '*'
111
- Content-Length:
112
- - '1731'
113
- Expires:
114
- - Sat, 14 Dec 2013 00:11:18 GMT
115
- Cache-Control:
116
- - max-age=0, no-cache, no-store
117
- Pragma:
118
- - no-cache
119
- Date:
120
- - Sat, 14 Dec 2013 00:11:18 GMT
121
- Connection:
122
- - keep-alive
123
- body:
124
- encoding: UTF-8
125
- string: '{"result":"success","return":{"Login":"heynk","Index":"141119","Id":"84fdd298-4386-4d7c-86c0-af74f2e0d0ec","Link":"M82141119X","Rights":["deposit","get_info","merchant","trade","withdraw"],"Language":"en_US","Created":"2012-04-07
126
- 13:52:16","Last_Login":"2013-10-15 20:52:29","Wallets":{"BTC":{"Balance":{"value":"0.00000133","value_int":"133","display":"0.00000133\u00a0BTC","display_short":"0.00\u00a0BTC","currency":"BTC"},"Operations":1,"Daily_Withdraw_Limit":{"value":"100.00000000","value_int":"10000000000","display":"100.00000000\u00a0BTC","display_short":"100.00\u00a0BTC","currency":"BTC"},"Monthly_Withdraw_Limit":null,"Max_Withdraw":{"value":"100.00000000","value_int":"10000000000","display":"100.00000000\u00a0BTC","display_short":"100.00\u00a0BTC","currency":"BTC"},"Open_Orders":{"value":"0.00000000","value_int":"0","display":"0.00000000\u00a0BTC","display_short":"0.00\u00a0BTC","currency":"BTC"}},"USD":{"Balance":{"value":"0.00000","value_int":"0","display":"$0.00000","display_short":"$0.00","currency":"USD"},"Operations":0,"Daily_Withdraw_Limit":{"value":"1000.00000","value_int":"100000000","display":"$1,000.00000","display_short":"$1,000.00","currency":"USD"},"Monthly_Withdraw_Limit":{"value":"10000.00000","value_int":"1000000000","display":"$10,000.00000","display_short":"$10,000.00","currency":"USD"},"Max_Withdraw":{"value":"1000.00000","value_int":"100000000","display":"$1,000.00000","display_short":"$1,000.00","currency":"USD"},"Open_Orders":{"value":"0.00000","value_int":"0","display":"$0.00000","display_short":"$0.00","currency":"USD"}}},"Monthly_Volume":{"value":"0.00000000","value_int":"0","display":"0.00000000\u00a0BTC","display_short":"0.00\u00a0BTC","currency":"BTC"},"Trade_Fee":0.6}}'
127
- http_version:
128
- recorded_at: Sat, 14 Dec 2013 00:11:17 GMT
90
+ string: '{"high": "571.70", "last": "565.14", "timestamp": "1395545436", "bid":
91
+ "563.11", "vwap": "556.51", "volume": "13033.39643050", "low": "541.00", "ask":
92
+ "567.39"}'
93
+ http_version:
94
+ recorded_at: Sun, 23 Mar 2014 03:30:46 GMT
129
95
  - request:
130
96
  method: post
131
97
  uri: https://www.bitstamp.net/api/balance/
132
- body:
133
- encoding: US-ASCII
134
- string: ''
135
98
  headers: {}
136
99
  response:
137
100
  status:
@@ -139,124 +102,80 @@ http_interactions:
139
102
  message: OK
140
103
  headers:
141
104
  Date:
142
- - Sat, 14 Dec 2013 00:11:19 GMT
105
+ - Sun, 23 Mar 2014 03:30:47 GMT
143
106
  Server:
144
107
  - Apache
145
108
  Content-Language:
146
109
  - en
147
110
  Expires:
148
- - Sat, 14 Dec 2013 00:11:19 GMT
111
+ - Sun, 23 Mar 2014 03:30:47 GMT
149
112
  Vary:
150
113
  - Accept-Language
151
114
  Cache-Control:
152
115
  - max-age=0
153
116
  Last-Modified:
154
- - Sat, 14 Dec 2013 00:11:19 GMT
117
+ - Sun, 23 Mar 2014 03:30:47 GMT
155
118
  Connection:
156
119
  - close
157
120
  Transfer-Encoding:
158
121
  - chunked
159
122
  Content-Type:
160
123
  - application/json
161
- Set-Cookie:
162
- - incap_ses_124_99025=GESjRX2p1FQy/fjVAYq4ASeiq1IAAAAAJcwtVpaFJ+QHk8orTEMsZw==;
163
- path=/; Domain=.bitstamp.net
164
- - nlbi_99025=J1gzYO+0XhN1UV4/Itob8gAAAABBDThC+VwGL20pWFGXgvj7; path=/; Domain=.bitstamp.net
165
- - visid_incap_99025=2AKYVKhlRCm/WnhrC2Fityeiq1IAAAAAQUIPAAAAAAD0WM8jegGzeJ0ciNTV87Ff;
166
- expires=Sun, 13 Dec 2015 10:20:58 GMT; path=/; Domain=.bitstamp.net
167
124
  X-Iinfo:
168
- - 6-267126664-267126809 NNNY CT(195 194 0) RT(1386979878484 170) q(0 0 4 -1)
169
- r(4 6) U6
125
+ - 9-47163404-47163547 NNNN CT(148 148 0) RT(1395545445722 506) q(0 0 3 -1) r(3
126
+ 6) U6
170
127
  X-Cdn:
171
128
  - Incapsula
172
129
  body:
173
130
  encoding: ASCII-8BIT
174
131
  string: '{"btc_reserved": "0", "fee": "0.5000", "btc_available": "0", "usd_reserved":
175
132
  "0", "btc_balance": "0", "usd_balance": "0.00", "usd_available": "0.00"}'
176
- http_version:
177
- recorded_at: Sat, 14 Dec 2013 00:11:18 GMT
133
+ http_version:
134
+ recorded_at: Sun, 23 Mar 2014 03:30:47 GMT
178
135
  - request:
179
- method: get
180
- uri: https://www.bitstamp.net/api/ticker/
181
- body:
182
- encoding: US-ASCII
183
- string: ''
184
- headers: {}
185
- response:
186
- status:
187
- code: 200
188
- message: OK
136
+ method: post
137
+ uri: https://campbx.com/api/myfunds.php
189
138
  headers:
190
- Last-Modified:
191
- - Mon, 16 Dec 2013 02:12:58 GMT
192
- Content-Length:
193
- - '142'
139
+ Accept-Encoding:
140
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
141
+ Accept:
142
+ - '*/*'
143
+ User-Agent:
144
+ - Ruby
194
145
  Content-Type:
195
- - application/json
196
- Date:
197
- - Mon, 16 Dec 2013 02:13:01 GMT
198
- Set-Cookie:
199
- - incap_ses_124_99025=oAAKBfh/+BebzgTeAYq4Aa1hrlIAAAAAEfBbC/KT2mE2YFNlC/1lyg==;
200
- path=/; Domain=.bitstamp.net
201
- - visid_incap_99025=hPcnjpjDSUC3iAxDMQyuYq1hrlIAAAAAQUIPAAAAAAB+KwK/y1uaEhittWjXASNS;
202
- expires=Tue, 15 Dec 2015 10:21:00 GMT; path=/; Domain=.bitstamp.net
203
- X-Iinfo:
204
- - 6-412133624-0 0CNY RT(1387159981182 470) q(0 -1 -1 0) r(0 -1)
205
- X-Cdn:
206
- - Incapsula
207
- body:
208
- encoding: ASCII-8BIT
209
- string: '{"high": "869.98", "last": "856.14", "timestamp": "1387159973", "bid":
210
- "856.13", "volume": "11217.69441970", "low": "803.51", "ask": "856.14"}'
211
- http_version:
212
- recorded_at: Mon, 16 Dec 2013 02:13:01 GMT
213
- - request:
214
- method: get
215
- uri: https://www.bitstamp.net/api/ticker/
216
- body:
217
- encoding: US-ASCII
218
- string: ''
219
- headers: {}
146
+ - application/x-www-form-urlencoded
220
147
  response:
221
148
  status:
222
149
  code: 200
223
150
  message: OK
224
151
  headers:
225
- Date:
226
- - Wed, 18 Dec 2013 16:05:37 GMT
227
152
  Server:
228
- - Apache
229
- Content-Language:
230
- - en
231
- Expires:
232
- - Wed, 18 Dec 2013 16:05:37 GMT
233
- Vary:
234
- - Accept-Language
235
- Cache-Control:
236
- - max-age=0
237
- Last-Modified:
238
- - Wed, 18 Dec 2013 16:05:37 GMT
239
- Connection:
240
- - close
241
- Transfer-Encoding:
242
- - chunked
153
+ - cloudflare-nginx
154
+ Date:
155
+ - Sun, 23 Mar 2014 03:30:48 GMT
243
156
  Content-Type:
244
157
  - application/json
158
+ Transfer-Encoding:
159
+ - chunked
160
+ Connection:
161
+ - keep-alive
245
162
  Set-Cookie:
246
- - incap_ses_124_99025=fuP7FFvJnjp1j05zBoq4AdHHsVIAAAAArqmygbHRZCD82yqclcr33w==;
247
- path=/; Domain=.bitstamp.net
248
- - nlbi_99025=kr1fOzNQhRegQCrEItob8gAAAAAPQ9EmQddfssZX5Aa/29tG; path=/; Domain=.bitstamp.net
249
- - visid_incap_99025=iBN9Fa/uQ1WiZunAXUGle9HHsVIAAAAAQUIPAAAAAAARBsszfGccqoFxcirQiIvb;
250
- expires=Thu, 17 Dec 2015 17:12:31 GMT; path=/; Domain=.bitstamp.net
251
- X-Iinfo:
252
- - 6-64948554-64948783 NNNY CT(194 193 0) RT(1387382736888 198) q(0 0 4 0) r(4
253
- 6) U13
254
- X-Cdn:
255
- - Incapsula
163
+ - __cfduid=d0a69041fe1f32c646bd22c8bf6b09f9c1395545448556; expires=Mon, 23-Dec-2019
164
+ 23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
165
+ X-Frame-Options:
166
+ - SAMEORIGIN
167
+ Cache-Control:
168
+ - no-cache, must-revalidate, max-age=3600
169
+ Vary:
170
+ - Accept-Encoding
171
+ Expires:
172
+ - Sun, 23 Mar 2014 04:30:43 GMT
173
+ Cf-Ray:
174
+ - 10f78d6c78780657-SJC
256
175
  body:
257
- encoding: ASCII-8BIT
258
- string: '{"high": "718.00", "last": "558.01", "timestamp": "1387382716", "bid":
259
- "558.01", "volume": "116665.49784212", "low": "382.21", "ask": "560.00"}'
260
- http_version:
261
- recorded_at: Wed, 18 Dec 2013 16:05:38 GMT
262
- recorded_with: VCR 2.7.0
176
+ encoding: UTF-8
177
+ string: "\r\n{\"Total USD\":\"1.41\",\"Total BTC\":\"0.00790000\",\"Liquid USD\":\"1.41\",\"Liquid
178
+ BTC\":\"0.00790000\",\"Margin Account USD\":\"0.00\",\"Margin Account BTC\":\"0.00000000\"}"
179
+ http_version:
180
+ recorded_at: Sun, 23 Mar 2014 03:30:48 GMT
181
+ recorded_with: VCR 2.8.0
@@ -12,165 +12,168 @@ http_interactions:
12
12
  code: 200
13
13
  message: OK
14
14
  headers:
15
- Date:
16
- - Sat, 07 Dec 2013 00:26:20 GMT
17
- Server:
18
- - Apache
19
- Content-Language:
20
- - en
21
- Expires:
22
- - Sat, 07 Dec 2013 00:26:20 GMT
23
- Vary:
24
- - Accept-Language
25
- Cache-Control:
26
- - max-age=0
15
+ Etag:
16
+ - '"10073f-a0-4f53de978bbb9"'
27
17
  Last-Modified:
28
- - Sat, 07 Dec 2013 00:26:20 GMT
18
+ - Sun, 23 Mar 2014 03:42:45 GMT
29
19
  Content-Length:
30
- - '143'
31
- Connection:
32
- - close
20
+ - '160'
33
21
  Content-Type:
34
22
  - application/json
23
+ Cache-Control:
24
+ - max-age=10, public
25
+ Expires:
26
+ - Sun, 23 Mar 2014 03:43:01 GMT
27
+ Date:
28
+ - Sun, 23 Mar 2014 03:42:51 GMT
35
29
  Set-Cookie:
36
- - incap_ses_124_99025=u5e3Rdx3w1wPlA00/Ym4ASxrolIAAAAAIdi10K5L5D7AsIYkGOtxLQ==;
30
+ - incap_ses_124_99025=mwTsavgumAMG7DSiVYq4ATtYLlMAAAAAU99DGZK1+BFZEUmE1d4jIQ==;
37
31
  path=/; Domain=.bitstamp.net
38
- - nlbi_99025=Rn+xB5JYEHpfqvF1Itob8gAAAAChgNAo+uIYDjrEcGqHxMvT; path=/; Domain=.bitstamp.net
39
- - visid_incap_99025=klpmJNi3T3yJAv8ZxfVzZixrolIAAAAAQUIPAAAAAAA8RrOblNFsuFiMbsITSFhv;
40
- expires=Sun, 06 Dec 2015 16:13:00 GMT; path=/; Domain=.bitstamp.net
32
+ - visid_incap_99025=zd0yM3WjShON/tow/SLn4eNXLlMAAAAAQUIPAAAAAABfYu5wnsbdzNpheq/Fd7WR;
33
+ expires=Mon, 21 Mar 2016 10:22:23 GMT; path=/; Domain=.bitstamp.net
41
34
  X-Iinfo:
42
- - 6-194391567-194391674 NNNY CT(200 199 0) RT(1386375979341 154) q(0 0 4 -1)
43
- r(4 7) U6
35
+ - 6-100669242-0 0CNY RT(1395546171233 187) q(0 -1 -1 0) r(0 -1)
44
36
  X-Cdn:
45
37
  - Incapsula
46
38
  body:
47
39
  encoding: ASCII-8BIT
48
- string: '{"high": "1033.00", "last": "806.00", "timestamp": "1386375966", "bid":
49
- "810.01", "volume": "53542.98657805", "low": "796.73", "ask": "818.46"}'
40
+ string: '{"high": "571.70", "last": "563.89", "timestamp": "1395546161", "bid":
41
+ "560.30", "vwap": "556.58", "volume": "13437.79188219", "low": "541.00", "ask":
42
+ "563.43"}'
50
43
  http_version:
51
- recorded_at: Sat, 07 Dec 2013 00:26:21 GMT
44
+ recorded_at: Sun, 23 Mar 2014 03:42:51 GMT
52
45
  - request:
53
46
  method: get
54
- uri: https://data.mtgox.com/api/1/BTCUSD/ticker
47
+ uri: https://campbx.com/api/xticker.php
55
48
  body:
56
49
  encoding: US-ASCII
57
50
  string: ''
58
51
  headers:
59
- Accept:
60
- - application/json
61
- User-Agent:
62
- - mtgox gem 1.1.0
63
52
  Accept-Encoding:
64
53
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
54
+ Accept:
55
+ - '*/*'
56
+ User-Agent:
57
+ - Ruby
65
58
  response:
66
59
  status:
67
60
  code: 200
68
61
  message: OK
69
62
  headers:
70
63
  Server:
71
- - nginx/1.4.1
64
+ - cloudflare-nginx
65
+ Date:
66
+ - Sun, 23 Mar 2014 03:42:52 GMT
72
67
  Content-Type:
73
- - application/json; charset=utf-8
74
- X-Powered-By:
75
- - PHP/5.5.4
76
- Access-Control-Allow-Origin:
77
- - '*'
68
+ - application/json
69
+ Transfer-Encoding:
70
+ - chunked
71
+ Connection:
72
+ - keep-alive
73
+ Set-Cookie:
74
+ - __cfduid=d46d34ccb02f0a506ce579433a76070af1395546171804; expires=Mon, 23-Dec-2019
75
+ 23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
76
+ X-Frame-Options:
77
+ - SAMEORIGIN
78
+ Cache-Control:
79
+ - no-cache, must-revalidate, max-age=3600
78
80
  Vary:
79
81
  - Accept-Encoding
80
- Cache-Control:
81
- - public, max-age=18
82
82
  Expires:
83
- - Sat, 07 Dec 2013 00:26:39 GMT
84
- Date:
85
- - Sat, 07 Dec 2013 00:26:21 GMT
86
- Content-Length:
87
- - '1405'
88
- Connection:
89
- - keep-alive
83
+ - Sun, 23 Mar 2014 04:42:46 GMT
84
+ Cf-Ray:
85
+ - 10f79f15cf95012b-SJC
90
86
  body:
91
87
  encoding: UTF-8
92
- string: '{"result":"success","return":{"high":{"value":"1118.98900","value_int":"111898900","display":"$1,118.99","display_short":"$1,118.99","currency":"USD"},"low":{"value":"800.00000","value_int":"80000000","display":"$800.00","display_short":"$800.00","currency":"USD"},"avg":{"value":"959.10609","value_int":"95910609","display":"$959.11","display_short":"$959.11","currency":"USD"},"vwap":{"value":"946.40403","value_int":"94640403","display":"$946.40","display_short":"$946.40","currency":"USD"},"vol":{"value":"53996.78689676","value_int":"5399678689676","display":"53,996.79\u00a0BTC","display_short":"53,996.79\u00a0BTC","currency":"BTC"},"last_local":{"value":"875.49500","value_int":"87549500","display":"$875.50","display_short":"$875.50","currency":"USD"},"last_orig":{"value":"639.00000","value_int":"63900000","display":"639.00\u00a0\u20ac","display_short":"639.00\u00a0\u20ac","currency":"EUR"},"last_all":{"value":"872.93790","value_int":"87293790","display":"$872.94","display_short":"$872.94","currency":"USD"},"last":{"value":"875.49500","value_int":"87549500","display":"$875.50","display_short":"$875.50","currency":"USD"},"buy":{"value":"863.40001","value_int":"86340001","display":"$863.40","display_short":"$863.40","currency":"USD"},"sell":{"value":"875.48498","value_int":"87548498","display":"$875.48","display_short":"$875.48","currency":"USD"},"item":"BTC","now":"1386375967563898"}}'
88
+ string: '{"Last Trade":"582.01","Best Bid":"598.00","Best Ask":"599.84"}'
93
89
  http_version:
94
- recorded_at: Sat, 07 Dec 2013 00:26:21 GMT
90
+ recorded_at: Sun, 23 Mar 2014 03:42:52 GMT
95
91
  - request:
96
92
  method: get
97
- uri: https://data.mtgox.com/api/1/BTCUSD/ticker
93
+ uri: https://www.bitstamp.net/api/ticker/
98
94
  body:
99
95
  encoding: US-ASCII
100
96
  string: ''
101
- headers:
102
- Accept:
103
- - application/json
104
- User-Agent:
105
- - mtgox gem 1.1.0
106
- Accept-Encoding:
107
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
97
+ headers: {}
108
98
  response:
109
99
  status:
110
100
  code: 200
111
101
  message: OK
112
102
  headers:
113
- Server:
114
- - nginx/1.4.1
103
+ Etag:
104
+ - '"10073f-a0-4f53de978bbb9"'
105
+ Last-Modified:
106
+ - Sun, 23 Mar 2014 03:42:45 GMT
107
+ Content-Length:
108
+ - '160'
115
109
  Content-Type:
116
- - application/json; charset=utf-8
117
- X-Powered-By:
118
- - PHP/5.5.4
119
- Access-Control-Allow-Origin:
120
- - '*'
121
- Vary:
122
- - Accept-Encoding
110
+ - application/json
123
111
  Cache-Control:
124
- - public, max-age=18
112
+ - max-age=10, public
125
113
  Expires:
126
- - Sat, 07 Dec 2013 00:26:39 GMT
114
+ - Sun, 23 Mar 2014 03:43:02 GMT
127
115
  Date:
128
- - Sat, 07 Dec 2013 00:26:21 GMT
129
- Content-Length:
130
- - '1405'
131
- Connection:
132
- - keep-alive
116
+ - Sun, 23 Mar 2014 03:42:52 GMT
117
+ Set-Cookie:
118
+ - incap_ses_124_99025=8NJIRP2zDnyynzWiVYq4ATxYLlMAAAAA87rGvUgzMjmG+XWYXT4xvw==;
119
+ path=/; Domain=.bitstamp.net
120
+ - visid_incap_99025=Re8g8GXTROC4MP9gs7PT6TxYLlMAAAAAQUIPAAAAAADlHONH0i5mBLSiKrP5+Vzo;
121
+ expires=Mon, 21 Mar 2016 10:22:23 GMT; path=/; Domain=.bitstamp.net
122
+ X-Iinfo:
123
+ - 6-100669713-0 0CNY RT(1395546172401 172) q(0 -1 -1 -1) r(0 -1)
124
+ X-Cdn:
125
+ - Incapsula
133
126
  body:
134
- encoding: UTF-8
135
- string: '{"result":"success","return":{"high":{"value":"1118.98900","value_int":"111898900","display":"$1,118.99","display_short":"$1,118.99","currency":"USD"},"low":{"value":"800.00000","value_int":"80000000","display":"$800.00","display_short":"$800.00","currency":"USD"},"avg":{"value":"959.10609","value_int":"95910609","display":"$959.11","display_short":"$959.11","currency":"USD"},"vwap":{"value":"946.40403","value_int":"94640403","display":"$946.40","display_short":"$946.40","currency":"USD"},"vol":{"value":"53996.78689676","value_int":"5399678689676","display":"53,996.79\u00a0BTC","display_short":"53,996.79\u00a0BTC","currency":"BTC"},"last_local":{"value":"875.49500","value_int":"87549500","display":"$875.50","display_short":"$875.50","currency":"USD"},"last_orig":{"value":"639.00000","value_int":"63900000","display":"639.00\u00a0\u20ac","display_short":"639.00\u00a0\u20ac","currency":"EUR"},"last_all":{"value":"872.93790","value_int":"87293790","display":"$872.94","display_short":"$872.94","currency":"USD"},"last":{"value":"875.49500","value_int":"87549500","display":"$875.50","display_short":"$875.50","currency":"USD"},"buy":{"value":"863.40001","value_int":"86340001","display":"$863.40","display_short":"$863.40","currency":"USD"},"sell":{"value":"875.48498","value_int":"87548498","display":"$875.48","display_short":"$875.48","currency":"USD"},"item":"BTC","now":"1386375967563898"}}'
127
+ encoding: ASCII-8BIT
128
+ string: '{"high": "571.70", "last": "563.89", "timestamp": "1395546161", "bid":
129
+ "560.30", "vwap": "556.58", "volume": "13437.79188219", "low": "541.00", "ask":
130
+ "563.43"}'
136
131
  http_version:
137
- recorded_at: Sat, 07 Dec 2013 00:26:21 GMT
132
+ recorded_at: Sun, 23 Mar 2014 03:42:52 GMT
138
133
  - request:
139
134
  method: get
140
- uri: https://www.bitstamp.net/api/ticker/
135
+ uri: https://campbx.com/api/xticker.php
141
136
  body:
142
137
  encoding: US-ASCII
143
138
  string: ''
144
- headers: {}
139
+ headers:
140
+ Accept-Encoding:
141
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
142
+ Accept:
143
+ - '*/*'
144
+ User-Agent:
145
+ - Ruby
145
146
  response:
146
147
  status:
147
148
  code: 200
148
149
  message: OK
149
150
  headers:
150
- Date:
151
- - Sat, 07 Dec 2013 00:26:21 GMT
152
151
  Server:
153
- - Apache
154
- Content-Language:
155
- - en
156
- Expires:
157
- - Sat, 07 Dec 2013 00:26:21 GMT
158
- Vary:
159
- - Accept-Language
160
- Cache-Control:
161
- - max-age=0
162
- Last-Modified:
163
- - Sat, 07 Dec 2013 00:26:21 GMT
164
- Connection:
165
- - close
166
- Transfer-Encoding:
167
- - chunked
152
+ - cloudflare-nginx
153
+ Date:
154
+ - Sun, 23 Mar 2014 03:42:53 GMT
168
155
  Content-Type:
169
156
  - application/json
157
+ Transfer-Encoding:
158
+ - chunked
159
+ Connection:
160
+ - keep-alive
161
+ Set-Cookie:
162
+ - __cfduid=d83066d5da39577b93334f93269e8a0cb1395546173208; expires=Mon, 23-Dec-2019
163
+ 23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
164
+ X-Frame-Options:
165
+ - SAMEORIGIN
166
+ Cache-Control:
167
+ - no-cache, must-revalidate, max-age=3600
168
+ Vary:
169
+ - Accept-Encoding
170
+ Expires:
171
+ - Sun, 23 Mar 2014 04:42:47 GMT
172
+ Cf-Ray:
173
+ - 10f79f1e86130657-SJC
170
174
  body:
171
- encoding: ASCII-8BIT
172
- string: '{"high": "1033.00", "last": "818.46", "timestamp": "1386375976", "bid":
173
- "810.01", "volume": "53542.49489069", "low": "796.73", "ask": "818.46"}'
175
+ encoding: UTF-8
176
+ string: '{"Last Trade":"582.01","Best Bid":"598.00","Best Ask":"599.84"}'
174
177
  http_version:
175
- recorded_at: Sat, 07 Dec 2013 00:26:22 GMT
176
- recorded_with: VCR 2.7.0
178
+ recorded_at: Sun, 23 Mar 2014 03:42:53 GMT
179
+ recorded_with: VCR 2.8.0