rbtc_arbitrage_simple 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/.travis.yml +23 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +156 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/Procfile +1 -0
- data/README.md +88 -0
- data/Rakefile +10 -0
- data/bin/rbtc_simple +4 -0
- data/dummy_web_server.rb +9 -0
- data/lib/rbtc_arbitrage.rb +15 -0
- data/lib/rbtc_arbitrage/campbx.rb +98 -0
- data/lib/rbtc_arbitrage/cli.rb +19 -0
- data/lib/rbtc_arbitrage/client.rb +48 -0
- data/lib/rbtc_arbitrage/clients/btce_client.rb +62 -0
- data/lib/rbtc_arbitrage/clients/campbx_client.rb +48 -0
- data/lib/rbtc_arbitrage/clients/client.rb.example +46 -0
- data/lib/rbtc_arbitrage/clients/coinbase_client.rb +63 -0
- data/lib/rbtc_arbitrage/clients/mtgox_client.rb +56 -0
- data/lib/rbtc_arbitrage/trader.rb +123 -0
- data/lib/rbtc_arbitrage/version.rb +3 -0
- data/rbtc_arbitrage.gemspec +30 -0
- data/spec/cli_spec.rb +8 -0
- data/spec/client_spec.rb +33 -0
- data/spec/clients/btce_client_spec.rb +93 -0
- data/spec/clients/campbx_client_spec.rb +66 -0
- data/spec/clients/coinbase_client_spec.rb +66 -0
- data/spec/clients/mtgox_client_spec.rb +53 -0
- data/spec/rbtc_arbitrage_spec.rb +11 -0
- data/spec/spec_helper.rb +34 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_balance/fetches_the_balance_correctly.yml +96 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_buy_correctly.yml +52 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_sell_correctly.yml +52 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_prices_correctly.yml +44 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_balance/should_raise_if_bad_API_keys.yml +53 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/calls_btc-e.yml +91 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_buy_correctly.yml +47 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_sell_correctly.yml +47 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_balance/fetches_the_balance_correctly.yml +95 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_buy_correctly.yml +49 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_sell_correctly.yml +49 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_balance/fetches_the_balance_correctly.yml +109 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml +215 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml +56 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml +56 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml +77 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml +44 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml +44 -0
- data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_prices_correctly.yml +85 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml +88 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml +81 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml +81 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/should_fetch_balance.yml +88 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/shouldn_t_raise_security_error.yml +166 -0
- data/spec/support/cassettes/RbtcArbitrage_Trader/_fetch_prices/gets_the_right_price_set.yml +173 -0
- data/spec/trader_spec.rb +228 -0
- metadata +249 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://data.mtgox.com/api/1/generic/info
|
6
|
+
response:
|
7
|
+
status:
|
8
|
+
code: 200
|
9
|
+
message: OK
|
10
|
+
headers:
|
11
|
+
Server:
|
12
|
+
- nginx/1.4.4
|
13
|
+
Content-Type:
|
14
|
+
- application/json; charset=utf-8
|
15
|
+
Access-Control-Allow-Origin:
|
16
|
+
- '*'
|
17
|
+
Content-Length:
|
18
|
+
- '1732'
|
19
|
+
Expires:
|
20
|
+
- Mon, 23 Dec 2013 16:51:12 GMT
|
21
|
+
Cache-Control:
|
22
|
+
- max-age=0, no-cache, no-store
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Date:
|
26
|
+
- Mon, 23 Dec 2013 16:51:12 GMT
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
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
|
32
|
+
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.45}}'
|
33
|
+
http_version:
|
34
|
+
recorded_at: Mon, 23 Dec 2013 16:51:11 GMT
|
35
|
+
- request:
|
36
|
+
method: post
|
37
|
+
uri: https://campbx.com/api/myfunds.php
|
38
|
+
headers:
|
39
|
+
Accept-Encoding:
|
40
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
41
|
+
Accept:
|
42
|
+
- '*/*'
|
43
|
+
User-Agent:
|
44
|
+
- Ruby
|
45
|
+
Content-Type:
|
46
|
+
- application/x-www-form-urlencoded
|
47
|
+
response:
|
48
|
+
status:
|
49
|
+
code: 200
|
50
|
+
message: OK
|
51
|
+
headers:
|
52
|
+
Server:
|
53
|
+
- cloudflare-nginx
|
54
|
+
Date:
|
55
|
+
- Mon, 23 Dec 2013 16:51:13 GMT
|
56
|
+
Content-Type:
|
57
|
+
- application/json
|
58
|
+
Transfer-Encoding:
|
59
|
+
- chunked
|
60
|
+
Connection:
|
61
|
+
- keep-alive
|
62
|
+
Set-Cookie:
|
63
|
+
- __cfduid=d10f5ac004a9165ef621716bc76b652ca1387817472922; expires=Mon, 23-Dec-2019
|
64
|
+
23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
|
65
|
+
X-Frame-Options:
|
66
|
+
- SAMEORIGIN
|
67
|
+
Cache-Control:
|
68
|
+
- no-cache, must-revalidate, max-age=3600
|
69
|
+
Vary:
|
70
|
+
- Accept-Encoding
|
71
|
+
Expires:
|
72
|
+
- Mon, 23 Dec 2013 17:51:12 GMT
|
73
|
+
Cf-Ray:
|
74
|
+
- e168e254197012d
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: "\r\n{\"Total USD\":\"1.41\",\"Total BTC\":\"0.00790000\",\"Liquid USD\":\"1.41\",\"Liquid
|
78
|
+
BTC\":\"0.00790000\",\"Margin Account USD\":\"0.00\",\"Margin Account BTC\":\"0.00000000\"}"
|
79
|
+
http_version:
|
80
|
+
recorded_at: Mon, 23 Dec 2013 16:51:12 GMT
|
81
|
+
recorded_with: VCR 2.8.0
|
data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/should_fetch_balance.yml
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://campbx.com/api/xticker.php
|
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
|
+
- cloudflare-nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 23 Dec 2013 16:52:42 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- __cfduid=d5ef05644738487d7ebb9dc12da1f747f1387817562303; 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
|
+
- Mon, 23 Dec 2013 17:52:41 GMT
|
42
|
+
Cf-Ray:
|
43
|
+
- e1690546069012d
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"Last Trade":"625.01","Best Bid":"625.01","Best Ask":"637.97"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 23 Dec 2013 16:52:42 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: https://data.mtgox.com/api/1/BTCUSD/ticker
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- application/json
|
58
|
+
User-Agent:
|
59
|
+
- mtgox gem 1.1.0
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Server:
|
68
|
+
- nginx/1.4.4
|
69
|
+
Content-Type:
|
70
|
+
- application/json; charset=utf-8
|
71
|
+
Access-Control-Allow-Origin:
|
72
|
+
- '*'
|
73
|
+
Content-Length:
|
74
|
+
- '1377'
|
75
|
+
Cache-Control:
|
76
|
+
- public, max-age=17
|
77
|
+
Expires:
|
78
|
+
- Mon, 23 Dec 2013 16:53:00 GMT
|
79
|
+
Date:
|
80
|
+
- Mon, 23 Dec 2013 16:52:43 GMT
|
81
|
+
Connection:
|
82
|
+
- keep-alive
|
83
|
+
body:
|
84
|
+
encoding: UTF-8
|
85
|
+
string: '{"result":"success","return":{"high":{"value":"685.99999","value_int":"68599999","display":"$686.00","display_short":"$686.00","currency":"USD"},"low":{"value":"630.00000","value_int":"63000000","display":"$630.00","display_short":"$630.00","currency":"USD"},"avg":{"value":"662.15456","value_int":"66215456","display":"$662.15","display_short":"$662.15","currency":"USD"},"vwap":{"value":"662.16657","value_int":"66216657","display":"$662.17","display_short":"$662.17","currency":"USD"},"vol":{"value":"12455.98795853","value_int":"1245598795853","display":"12,455.99\u00a0BTC","display_short":"12,455.99\u00a0BTC","currency":"BTC"},"last_local":{"value":"655.50000","value_int":"65550000","display":"$655.50","display_short":"$655.50","currency":"USD"},"last_orig":{"value":"655.50000","value_int":"65550000","display":"$655.50","display_short":"$655.50","currency":"USD"},"last_all":{"value":"655.50000","value_int":"65550000","display":"$655.50","display_short":"$655.50","currency":"USD"},"last":{"value":"655.50000","value_int":"65550000","display":"$655.50","display_short":"$655.50","currency":"USD"},"buy":{"value":"655.67600","value_int":"65567600","display":"$655.68","display_short":"$655.68","currency":"USD"},"sell":{"value":"664.99500","value_int":"66499500","display":"$665.00","display_short":"$665.00","currency":"USD"},"item":"BTC","now":"1387817551782871"}}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Mon, 23 Dec 2013 16:52:42 GMT
|
88
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,166 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://campbx.com/api/xticker.php
|
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
|
+
- cloudflare-nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 23 Dec 2013 16:52:22 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- __cfduid=d13c053a630b8468a5b9405f4b6eb1f7a1387817542464; 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
|
+
- Mon, 23 Dec 2013 17:52:21 GMT
|
42
|
+
Cf-Ray:
|
43
|
+
- e168fd86749012d
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"Last Trade":"625.01","Best Bid":"625.01","Best Ask":"637.97"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 23 Dec 2013 16:52:22 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: https://data.mtgox.com/api/1/BTCUSD/ticker
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- application/json
|
58
|
+
User-Agent:
|
59
|
+
- mtgox gem 1.1.0
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Server:
|
68
|
+
- nginx/1.4.4
|
69
|
+
Content-Type:
|
70
|
+
- application/json; charset=utf-8
|
71
|
+
Access-Control-Allow-Origin:
|
72
|
+
- '*'
|
73
|
+
Content-Length:
|
74
|
+
- '1387'
|
75
|
+
Cache-Control:
|
76
|
+
- public, max-age=10
|
77
|
+
Expires:
|
78
|
+
- Mon, 23 Dec 2013 16:52:33 GMT
|
79
|
+
Date:
|
80
|
+
- Mon, 23 Dec 2013 16:52:23 GMT
|
81
|
+
Connection:
|
82
|
+
- keep-alive
|
83
|
+
body:
|
84
|
+
encoding: UTF-8
|
85
|
+
string: '{"result":"success","return":{"high":{"value":"685.99999","value_int":"68599999","display":"$686.00","display_short":"$686.00","currency":"USD"},"low":{"value":"630.00000","value_int":"63000000","display":"$630.00","display_short":"$630.00","currency":"USD"},"avg":{"value":"662.15756","value_int":"66215756","display":"$662.16","display_short":"$662.16","currency":"USD"},"vwap":{"value":"662.16810","value_int":"66216810","display":"$662.17","display_short":"$662.17","currency":"USD"},"vol":{"value":"12454.97895853","value_int":"1245497895853","display":"12,454.98\u00a0BTC","display_short":"12,454.98\u00a0BTC","currency":"BTC"},"last_local":{"value":"655.66600","value_int":"65566600","display":"$655.67","display_short":"$655.67","currency":"USD"},"last_orig":{"value":"68000.000","value_int":"68000000","display":"\u00a568,000","display_short":"\u00a568,000","currency":"JPY"},"last_all":{"value":"650.87621","value_int":"65087621","display":"$650.88","display_short":"$650.88","currency":"USD"},"last":{"value":"655.66600","value_int":"65566600","display":"$655.67","display_short":"$655.67","currency":"USD"},"buy":{"value":"663.55000","value_int":"66355000","display":"$663.55","display_short":"$663.55","currency":"USD"},"sell":{"value":"665.40000","value_int":"66540000","display":"$665.40","display_short":"$665.40","currency":"USD"},"item":"BTC","now":"1387817517954792"}}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Mon, 23 Dec 2013 16:52:22 GMT
|
88
|
+
- request:
|
89
|
+
method: post
|
90
|
+
uri: https://data.mtgox.com/api/1/generic/info
|
91
|
+
response:
|
92
|
+
status:
|
93
|
+
code: 200
|
94
|
+
message: OK
|
95
|
+
headers:
|
96
|
+
Server:
|
97
|
+
- nginx/1.4.4
|
98
|
+
Content-Type:
|
99
|
+
- application/json; charset=utf-8
|
100
|
+
Access-Control-Allow-Origin:
|
101
|
+
- '*'
|
102
|
+
Content-Length:
|
103
|
+
- '1732'
|
104
|
+
Expires:
|
105
|
+
- Mon, 23 Dec 2013 16:52:23 GMT
|
106
|
+
Cache-Control:
|
107
|
+
- max-age=0, no-cache, no-store
|
108
|
+
Pragma:
|
109
|
+
- no-cache
|
110
|
+
Date:
|
111
|
+
- Mon, 23 Dec 2013 16:52:23 GMT
|
112
|
+
Connection:
|
113
|
+
- keep-alive
|
114
|
+
body:
|
115
|
+
encoding: UTF-8
|
116
|
+
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
|
117
|
+
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.45}}'
|
118
|
+
http_version:
|
119
|
+
recorded_at: Mon, 23 Dec 2013 16:52:22 GMT
|
120
|
+
- request:
|
121
|
+
method: post
|
122
|
+
uri: https://campbx.com/api/myfunds.php
|
123
|
+
headers:
|
124
|
+
Accept-Encoding:
|
125
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
126
|
+
Accept:
|
127
|
+
- '*/*'
|
128
|
+
User-Agent:
|
129
|
+
- Ruby
|
130
|
+
Content-Type:
|
131
|
+
- application/x-www-form-urlencoded
|
132
|
+
response:
|
133
|
+
status:
|
134
|
+
code: 200
|
135
|
+
message: OK
|
136
|
+
headers:
|
137
|
+
Server:
|
138
|
+
- cloudflare-nginx
|
139
|
+
Date:
|
140
|
+
- Mon, 23 Dec 2013 16:52:24 GMT
|
141
|
+
Content-Type:
|
142
|
+
- application/json
|
143
|
+
Transfer-Encoding:
|
144
|
+
- chunked
|
145
|
+
Connection:
|
146
|
+
- keep-alive
|
147
|
+
Set-Cookie:
|
148
|
+
- __cfduid=df2c166d2cc41339f1576c03e50d91cfe1387817543781; expires=Mon, 23-Dec-2019
|
149
|
+
23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
|
150
|
+
X-Frame-Options:
|
151
|
+
- SAMEORIGIN
|
152
|
+
Cache-Control:
|
153
|
+
- no-cache, must-revalidate, max-age=3600
|
154
|
+
Vary:
|
155
|
+
- Accept-Encoding
|
156
|
+
Expires:
|
157
|
+
- Mon, 23 Dec 2013 17:52:22 GMT
|
158
|
+
Cf-Ray:
|
159
|
+
- e168fe02756012d
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: "\r\n{\"Total USD\":\"1.41\",\"Total BTC\":\"0.00790000\",\"Liquid USD\":\"1.41\",\"Liquid
|
163
|
+
BTC\":\"0.00790000\",\"Margin Account USD\":\"0.00\",\"Margin Account BTC\":\"0.00000000\"}"
|
164
|
+
http_version:
|
165
|
+
recorded_at: Mon, 23 Dec 2013 16:52:23 GMT
|
166
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,173 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://campbx.com/api/xticker.php
|
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
|
+
- cloudflare-nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 23 Dec 2013 16:49:49 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- __cfduid=dd0db16ca7e6b42fc3eb5b46af612a9151387817388611; 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
|
+
- Mon, 23 Dec 2013 17:49:47 GMT
|
42
|
+
Cf-Ray:
|
43
|
+
- e168c16d2920657
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"Last Trade":"625.01","Best Bid":"625.01","Best Ask":"637.97"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 23 Dec 2013 16:49:48 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: https://data.mtgox.com/api/1/BTCUSD/ticker
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- application/json
|
58
|
+
User-Agent:
|
59
|
+
- mtgox gem 1.1.0
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Server:
|
68
|
+
- nginx/1.4.4
|
69
|
+
Content-Type:
|
70
|
+
- application/json; charset=utf-8
|
71
|
+
Access-Control-Allow-Origin:
|
72
|
+
- '*'
|
73
|
+
Content-Length:
|
74
|
+
- '1399'
|
75
|
+
Cache-Control:
|
76
|
+
- public, max-age=8
|
77
|
+
Expires:
|
78
|
+
- Mon, 23 Dec 2013 16:49:57 GMT
|
79
|
+
Date:
|
80
|
+
- Mon, 23 Dec 2013 16:49:49 GMT
|
81
|
+
Connection:
|
82
|
+
- keep-alive
|
83
|
+
body:
|
84
|
+
encoding: UTF-8
|
85
|
+
string: '{"result":"success","return":{"high":{"value":"685.99999","value_int":"68599999","display":"$686.00","display_short":"$686.00","currency":"USD"},"low":{"value":"630.00000","value_int":"63000000","display":"$630.00","display_short":"$630.00","currency":"USD"},"avg":{"value":"662.16647","value_int":"66216647","display":"$662.17","display_short":"$662.17","currency":"USD"},"vwap":{"value":"662.16836","value_int":"66216836","display":"$662.17","display_short":"$662.17","currency":"USD"},"vol":{"value":"12450.68479794","value_int":"1245068479794","display":"12,450.68\u00a0BTC","display_short":"12,450.68\u00a0BTC","currency":"BTC"},"last_local":{"value":"655.00000","value_int":"65500000","display":"$655.00","display_short":"$655.00","currency":"USD"},"last_orig":{"value":"489.00000","value_int":"48900000","display":"489.00\u00a0\u20ac","display_short":"489.00\u00a0\u20ac","currency":"EUR"},"last_all":{"value":"667.72950","value_int":"66772950","display":"$667.73","display_short":"$667.73","currency":"USD"},"last":{"value":"655.00000","value_int":"65500000","display":"$655.00","display_short":"$655.00","currency":"USD"},"buy":{"value":"661.50000","value_int":"66150000","display":"$661.50","display_short":"$661.50","currency":"USD"},"sell":{"value":"667.47499","value_int":"66747499","display":"$667.47","display_short":"$667.47","currency":"USD"},"item":"BTC","now":"1387817367194043"}}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Mon, 23 Dec 2013 16:49:49 GMT
|
88
|
+
- request:
|
89
|
+
method: get
|
90
|
+
uri: https://campbx.com/api/xticker.php
|
91
|
+
body:
|
92
|
+
encoding: US-ASCII
|
93
|
+
string: ''
|
94
|
+
headers:
|
95
|
+
Accept-Encoding:
|
96
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
97
|
+
Accept:
|
98
|
+
- '*/*'
|
99
|
+
User-Agent:
|
100
|
+
- Ruby
|
101
|
+
response:
|
102
|
+
status:
|
103
|
+
code: 200
|
104
|
+
message: OK
|
105
|
+
headers:
|
106
|
+
Server:
|
107
|
+
- cloudflare-nginx
|
108
|
+
Date:
|
109
|
+
- Mon, 23 Dec 2013 16:49:50 GMT
|
110
|
+
Content-Type:
|
111
|
+
- application/json
|
112
|
+
Transfer-Encoding:
|
113
|
+
- chunked
|
114
|
+
Connection:
|
115
|
+
- keep-alive
|
116
|
+
Set-Cookie:
|
117
|
+
- __cfduid=d67869f8544a1a1a0579be7bc107d34161387817389952; expires=Mon, 23-Dec-2019
|
118
|
+
23:50:00 GMT; path=/; domain=.campbx.com; HttpOnly
|
119
|
+
X-Frame-Options:
|
120
|
+
- SAMEORIGIN
|
121
|
+
Cache-Control:
|
122
|
+
- no-cache, must-revalidate, max-age=3600
|
123
|
+
Vary:
|
124
|
+
- Accept-Encoding
|
125
|
+
Expires:
|
126
|
+
- Mon, 23 Dec 2013 17:49:49 GMT
|
127
|
+
Cf-Ray:
|
128
|
+
- e168c1f372b012d
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"Last Trade":"625.01","Best Bid":"625.01","Best Ask":"637.97"}'
|
132
|
+
http_version:
|
133
|
+
recorded_at: Mon, 23 Dec 2013 16:49:49 GMT
|
134
|
+
- request:
|
135
|
+
method: get
|
136
|
+
uri: https://data.mtgox.com/api/1/BTCUSD/ticker
|
137
|
+
body:
|
138
|
+
encoding: US-ASCII
|
139
|
+
string: ''
|
140
|
+
headers:
|
141
|
+
Accept:
|
142
|
+
- application/json
|
143
|
+
User-Agent:
|
144
|
+
- mtgox gem 1.1.0
|
145
|
+
Accept-Encoding:
|
146
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
147
|
+
response:
|
148
|
+
status:
|
149
|
+
code: 200
|
150
|
+
message: OK
|
151
|
+
headers:
|
152
|
+
Server:
|
153
|
+
- nginx/1.4.4
|
154
|
+
Content-Type:
|
155
|
+
- application/json; charset=utf-8
|
156
|
+
Access-Control-Allow-Origin:
|
157
|
+
- '*'
|
158
|
+
Content-Length:
|
159
|
+
- '1399'
|
160
|
+
Cache-Control:
|
161
|
+
- public, max-age=7
|
162
|
+
Expires:
|
163
|
+
- Mon, 23 Dec 2013 16:49:57 GMT
|
164
|
+
Date:
|
165
|
+
- Mon, 23 Dec 2013 16:49:50 GMT
|
166
|
+
Connection:
|
167
|
+
- keep-alive
|
168
|
+
body:
|
169
|
+
encoding: UTF-8
|
170
|
+
string: '{"result":"success","return":{"high":{"value":"685.99999","value_int":"68599999","display":"$686.00","display_short":"$686.00","currency":"USD"},"low":{"value":"630.00000","value_int":"63000000","display":"$630.00","display_short":"$630.00","currency":"USD"},"avg":{"value":"662.16647","value_int":"66216647","display":"$662.17","display_short":"$662.17","currency":"USD"},"vwap":{"value":"662.16836","value_int":"66216836","display":"$662.17","display_short":"$662.17","currency":"USD"},"vol":{"value":"12450.68479794","value_int":"1245068479794","display":"12,450.68\u00a0BTC","display_short":"12,450.68\u00a0BTC","currency":"BTC"},"last_local":{"value":"655.00000","value_int":"65500000","display":"$655.00","display_short":"$655.00","currency":"USD"},"last_orig":{"value":"489.00000","value_int":"48900000","display":"489.00\u00a0\u20ac","display_short":"489.00\u00a0\u20ac","currency":"EUR"},"last_all":{"value":"667.72950","value_int":"66772950","display":"$667.73","display_short":"$667.73","currency":"USD"},"last":{"value":"655.00000","value_int":"65500000","display":"$655.00","display_short":"$655.00","currency":"USD"},"buy":{"value":"661.50000","value_int":"66150000","display":"$661.50","display_short":"$661.50","currency":"USD"},"sell":{"value":"667.47499","value_int":"66747499","display":"$667.47","display_short":"$667.47","currency":"USD"},"item":"BTC","now":"1387817367194043"}}'
|
171
|
+
http_version:
|
172
|
+
recorded_at: Mon, 23 Dec 2013 16:49:49 GMT
|
173
|
+
recorded_with: VCR 2.8.0
|