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.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/Gemfile +17 -14
- data/Gemfile.lock +26 -28
- data/lib/rbtc_arbitrage.rb +2 -2
- data/lib/rbtc_arbitrage/cli.rb +1 -1
- data/lib/rbtc_arbitrage/trader.rb +8 -2
- data/lib/rbtc_arbitrage/version.rb +1 -1
- data/rbtc_arbitrage.gemspec +1 -3
- data/spec/clients/bitstamp_client_spec.rb +2 -2
- data/spec/rbtc_arbitrage_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_transfer/calls_Bitstamp_correctly.yml +48 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml +46 -48
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml +52 -52
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml +49 -46
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/should_fetch_balance.yml +43 -173
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/shouldn_t_raise_security_error.yml +87 -168
- data/spec/support/cassettes/RbtcArbitrage_Trader/_fetch_prices/gets_the_right_price_set.yml +101 -98
- data/spec/trader_spec.rb +4 -4
- metadata +6 -56
- data/lib/rbtc_arbitrage/clients/mtgox_client.rb +0 -56
- data/spec/clients/mtgox_client_spec.rb +0 -53
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml +0 -77
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml +0 -44
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml +0 -44
- 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://
|
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
|
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
|
-
-
|
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: '{"
|
40
|
-
http_version:
|
41
|
-
recorded_at:
|
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
|
-
-
|
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
|
-
-
|
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
|
-
-
|
78
|
+
- incap_ses_209_99025=ac97CP6xUQT2lWvjkIXmAmVVLlMAAAAADla0l37QEduCr4KyyIndGg==;
|
76
79
|
path=/; Domain=.bitstamp.net
|
77
|
-
- nlbi_99025=
|
78
|
-
- visid_incap_99025=
|
79
|
-
expires=
|
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
|
-
-
|
82
|
-
|
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": "
|
88
|
-
"
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
-
-
|
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
|
-
-
|
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
|
-
-
|
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
|
-
-
|
169
|
-
|
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:
|
133
|
+
http_version:
|
134
|
+
recorded_at: Sun, 23 Mar 2014 03:30:47 GMT
|
178
135
|
- request:
|
179
|
-
method:
|
180
|
-
uri: https://
|
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
|
-
|
191
|
-
-
|
192
|
-
|
193
|
-
- '
|
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/
|
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
|
-
-
|
229
|
-
|
230
|
-
-
|
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
|
-
-
|
247
|
-
path=/;
|
248
|
-
-
|
249
|
-
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
-
|
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:
|
258
|
-
string:
|
259
|
-
"
|
260
|
-
http_version:
|
261
|
-
recorded_at:
|
262
|
-
recorded_with: VCR 2.
|
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
|
-
|
16
|
-
-
|
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
|
-
-
|
18
|
+
- Sun, 23 Mar 2014 03:42:45 GMT
|
29
19
|
Content-Length:
|
30
|
-
- '
|
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=
|
30
|
+
- incap_ses_124_99025=mwTsavgumAMG7DSiVYq4ATtYLlMAAAAAU99DGZK1+BFZEUmE1d4jIQ==;
|
37
31
|
path=/; Domain=.bitstamp.net
|
38
|
-
-
|
39
|
-
|
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-
|
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": "
|
49
|
-
"
|
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:
|
44
|
+
recorded_at: Sun, 23 Mar 2014 03:42:51 GMT
|
52
45
|
- request:
|
53
46
|
method: get
|
54
|
-
uri: https://
|
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
|
64
|
+
- cloudflare-nginx
|
65
|
+
Date:
|
66
|
+
- Sun, 23 Mar 2014 03:42:52 GMT
|
72
67
|
Content-Type:
|
73
|
-
- application/json
|
74
|
-
|
75
|
-
-
|
76
|
-
|
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
|
-
-
|
84
|
-
|
85
|
-
-
|
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: '{"
|
88
|
+
string: '{"Last Trade":"582.01","Best Bid":"598.00","Best Ask":"599.84"}'
|
93
89
|
http_version:
|
94
|
-
recorded_at:
|
90
|
+
recorded_at: Sun, 23 Mar 2014 03:42:52 GMT
|
95
91
|
- request:
|
96
92
|
method: get
|
97
|
-
uri: https://
|
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
|
-
|
114
|
-
-
|
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
|
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
|
-
-
|
112
|
+
- max-age=10, public
|
125
113
|
Expires:
|
126
|
-
-
|
114
|
+
- Sun, 23 Mar 2014 03:43:02 GMT
|
127
115
|
Date:
|
128
|
-
-
|
129
|
-
|
130
|
-
-
|
131
|
-
|
132
|
-
-
|
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:
|
135
|
-
string: '{"
|
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:
|
132
|
+
recorded_at: Sun, 23 Mar 2014 03:42:52 GMT
|
138
133
|
- request:
|
139
134
|
method: get
|
140
|
-
uri: https://
|
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
|
-
-
|
154
|
-
|
155
|
-
-
|
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:
|
172
|
-
string: '{"
|
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:
|
176
|
-
recorded_with: VCR 2.
|
178
|
+
recorded_at: Sun, 23 Mar 2014 03:42:53 GMT
|
179
|
+
recorded_with: VCR 2.8.0
|