rbtc_arbitrage_simple 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +23 -0
  5. data/Gemfile +18 -0
  6. data/Gemfile.lock +156 -0
  7. data/Guardfile +8 -0
  8. data/LICENSE.txt +22 -0
  9. data/Procfile +1 -0
  10. data/README.md +88 -0
  11. data/Rakefile +10 -0
  12. data/bin/rbtc_simple +4 -0
  13. data/dummy_web_server.rb +9 -0
  14. data/lib/rbtc_arbitrage.rb +15 -0
  15. data/lib/rbtc_arbitrage/campbx.rb +98 -0
  16. data/lib/rbtc_arbitrage/cli.rb +19 -0
  17. data/lib/rbtc_arbitrage/client.rb +48 -0
  18. data/lib/rbtc_arbitrage/clients/btce_client.rb +62 -0
  19. data/lib/rbtc_arbitrage/clients/campbx_client.rb +48 -0
  20. data/lib/rbtc_arbitrage/clients/client.rb.example +46 -0
  21. data/lib/rbtc_arbitrage/clients/coinbase_client.rb +63 -0
  22. data/lib/rbtc_arbitrage/clients/mtgox_client.rb +56 -0
  23. data/lib/rbtc_arbitrage/trader.rb +123 -0
  24. data/lib/rbtc_arbitrage/version.rb +3 -0
  25. data/rbtc_arbitrage.gemspec +30 -0
  26. data/spec/cli_spec.rb +8 -0
  27. data/spec/client_spec.rb +33 -0
  28. data/spec/clients/btce_client_spec.rb +93 -0
  29. data/spec/clients/campbx_client_spec.rb +66 -0
  30. data/spec/clients/coinbase_client_spec.rb +66 -0
  31. data/spec/clients/mtgox_client_spec.rb +53 -0
  32. data/spec/rbtc_arbitrage_spec.rb +11 -0
  33. data/spec/spec_helper.rb +34 -0
  34. data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_balance/fetches_the_balance_correctly.yml +96 -0
  35. data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_buy_correctly.yml +52 -0
  36. data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_sell_correctly.yml +52 -0
  37. data/spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_prices_correctly.yml +44 -0
  38. data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_balance/should_raise_if_bad_API_keys.yml +53 -0
  39. data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/calls_btc-e.yml +91 -0
  40. data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_buy_correctly.yml +47 -0
  41. data/spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_sell_correctly.yml +47 -0
  42. data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_balance/fetches_the_balance_correctly.yml +95 -0
  43. data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_buy_correctly.yml +49 -0
  44. data/spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_sell_correctly.yml +49 -0
  45. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_balance/fetches_the_balance_correctly.yml +109 -0
  46. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml +215 -0
  47. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml +56 -0
  48. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml +56 -0
  49. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml +77 -0
  50. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml +44 -0
  51. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml +44 -0
  52. data/spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_prices_correctly.yml +85 -0
  53. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml +88 -0
  54. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml +81 -0
  55. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml +81 -0
  56. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/should_fetch_balance.yml +88 -0
  57. data/spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/shouldn_t_raise_security_error.yml +166 -0
  58. data/spec/support/cassettes/RbtcArbitrage_Trader/_fetch_prices/gets_the_right_price_set.yml +173 -0
  59. data/spec/trader_spec.rb +228 -0
  60. metadata +249 -0
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://coinbase.com/api/v1/prices/sell
6
+ headers: {}
7
+ response:
8
+ status:
9
+ code: 200
10
+ message: OK
11
+ headers:
12
+ Server:
13
+ - cloudflare-nginx
14
+ Date:
15
+ - Mon, 23 Dec 2013 01:46:12 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Transfer-Encoding:
19
+ - chunked
20
+ Connection:
21
+ - keep-alive
22
+ Set-Cookie:
23
+ - __cfduid=d2936097f4b45fff147030c15439c297f1387763172302; expires=Mon, 23-Dec-2019
24
+ 23:50:00 GMT; path=/; domain=.coinbase.com; HttpOnly
25
+ - request_method=GET; path=/; secure
26
+ Status:
27
+ - 200 OK
28
+ Strict-Transport-Security:
29
+ - max-age=31536000
30
+ - max-age=31536000
31
+ X-Ua-Compatible:
32
+ - IE=Edge,chrome=1
33
+ Etag:
34
+ - '"f6ca8cefd54471be46d774df727e0885"'
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ X-Request-Id:
38
+ - 5780757a2e6a97f8de4347b0a7d38234
39
+ X-Runtime:
40
+ - '0.264541'
41
+ X-Frame-Options:
42
+ - SAMEORIGIN
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Rack-Cache:
46
+ - miss
47
+ Vary:
48
+ - Accept-Encoding
49
+ Cf-Ray:
50
+ - e11607274740296
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"subtotal":{"amount":"629.48","currency":"USD"},"fees":[{"coinbase":{"amount":"6.29","currency":"USD"}},{"bank":{"amount":"0.15","currency":"USD"}}],"total":{"amount":"623.04","currency":"USD"},"amount":"623.04","currency":"USD"}'
54
+ http_version:
55
+ recorded_at: Mon, 23 Dec 2013 01:46:12 GMT
56
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,77 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://data.mtgox.com/api/1/generic/info
6
+ body:
7
+ encoding: US-ASCII
8
+ string: nonce=1387161061259915
9
+ response:
10
+ status:
11
+ code: 200
12
+ message: OK
13
+ headers:
14
+ Server:
15
+ - nginx/1.4.4
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ X-Powered-By:
19
+ - PHP/5.5.4
20
+ Access-Control-Allow-Origin:
21
+ - '*'
22
+ Content-Length:
23
+ - '1731'
24
+ Expires:
25
+ - Mon, 16 Dec 2013 02:31:02 GMT
26
+ Cache-Control:
27
+ - max-age=0, no-cache, no-store
28
+ Pragma:
29
+ - no-cache
30
+ Date:
31
+ - Mon, 16 Dec 2013 02:31:02 GMT
32
+ Connection:
33
+ - keep-alive
34
+ body:
35
+ encoding: UTF-8
36
+ 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
37
+ 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}}'
38
+ http_version:
39
+ recorded_at: Mon, 16 Dec 2013 02:31:02 GMT
40
+ - request:
41
+ method: post
42
+ uri: https://data.mtgox.com/api/1/generic/info
43
+ body:
44
+ encoding: US-ASCII
45
+ string: nonce=1387161062673595
46
+ response:
47
+ status:
48
+ code: 200
49
+ message: OK
50
+ headers:
51
+ Server:
52
+ - nginx/1.4.4
53
+ Content-Type:
54
+ - application/json; charset=utf-8
55
+ X-Powered-By:
56
+ - PHP/5.5.4
57
+ Access-Control-Allow-Origin:
58
+ - '*'
59
+ Content-Length:
60
+ - '1731'
61
+ Expires:
62
+ - Mon, 16 Dec 2013 02:31:03 GMT
63
+ Cache-Control:
64
+ - max-age=0, no-cache, no-store
65
+ Pragma:
66
+ - no-cache
67
+ Date:
68
+ - Mon, 16 Dec 2013 02:31:03 GMT
69
+ Connection:
70
+ - keep-alive
71
+ body:
72
+ encoding: UTF-8
73
+ 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
74
+ 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}}'
75
+ http_version:
76
+ recorded_at: Mon, 16 Dec 2013 02:31:03 GMT
77
+ recorded_with: VCR 2.7.0
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://data.mtgox.com/api/1/BTCUSD/ticker
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - mtgox gem 1.1.0
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
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
+ Cache-Control:
32
+ - public, max-age=19
33
+ Expires:
34
+ - Tue, 17 Dec 2013 18:52:46 GMT
35
+ Date:
36
+ - Tue, 17 Dec 2013 18:52:27 GMT
37
+ Connection:
38
+ - keep-alive
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"result":"success","return":{"high":{"value":"824.88888","value_int":"82488888","display":"$824.89","display_short":"$824.89","currency":"USD"},"low":{"value":"678.89040","value_int":"67889040","display":"$678.89","display_short":"$678.89","currency":"USD"},"avg":{"value":"740.58273","value_int":"74058273","display":"$740.58","display_short":"$740.58","currency":"USD"},"vwap":{"value":"737.16841","value_int":"73716841","display":"$737.17","display_short":"$737.17","currency":"USD"},"vol":{"value":"46591.37947288","value_int":"4659137947288","display":"46,591.38\u00a0BTC","display_short":"46,591.38\u00a0BTC","currency":"BTC"},"last_local":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last_orig":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last_all":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"buy":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"sell":{"value":"747.00000","value_int":"74700000","display":"$747.00","display_short":"$747.00","currency":"USD"},"item":"BTC","now":"1387306337410204"}}'
42
+ http_version:
43
+ recorded_at: Tue, 17 Dec 2013 18:52:28 GMT
44
+ recorded_with: VCR 2.7.0
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://data.mtgox.com/api/1/BTCUSD/ticker
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - mtgox gem 1.1.0
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
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
+ Cache-Control:
32
+ - public, max-age=19
33
+ Expires:
34
+ - Tue, 17 Dec 2013 18:52:46 GMT
35
+ Date:
36
+ - Tue, 17 Dec 2013 18:52:27 GMT
37
+ Connection:
38
+ - keep-alive
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"result":"success","return":{"high":{"value":"824.88888","value_int":"82488888","display":"$824.89","display_short":"$824.89","currency":"USD"},"low":{"value":"678.89040","value_int":"67889040","display":"$678.89","display_short":"$678.89","currency":"USD"},"avg":{"value":"740.58273","value_int":"74058273","display":"$740.58","display_short":"$740.58","currency":"USD"},"vwap":{"value":"737.16841","value_int":"73716841","display":"$737.17","display_short":"$737.17","currency":"USD"},"vol":{"value":"46591.37947288","value_int":"4659137947288","display":"46,591.38\u00a0BTC","display_short":"46,591.38\u00a0BTC","currency":"BTC"},"last_local":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last_orig":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last_all":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"last":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"buy":{"value":"746.00000","value_int":"74600000","display":"$746.00","display_short":"$746.00","currency":"USD"},"sell":{"value":"747.00000","value_int":"74700000","display":"$747.00","display_short":"$747.00","currency":"USD"},"item":"BTC","now":"1387306337410204"}}'
42
+ http_version:
43
+ recorded_at: Tue, 17 Dec 2013 18:52:28 GMT
44
+ recorded_with: VCR 2.7.0
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://data.mtgox.com/api/1/BTCUSD/ticker
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - mtgox gem 1.1.0
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
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
+ Cache-Control:
32
+ - public, max-age=19
33
+ Expires:
34
+ - Mon, 16 Dec 2013 02:37:47 GMT
35
+ Date:
36
+ - Mon, 16 Dec 2013 02:37:28 GMT
37
+ Connection:
38
+ - keep-alive
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"result":"success","return":{"high":{"value":"928.00000","value_int":"92800000","display":"$928.00","display_short":"$928.00","currency":"USD"},"low":{"value":"838.02010","value_int":"83802010","display":"$838.02","display_short":"$838.02","currency":"USD"},"avg":{"value":"881.69362","value_int":"88169362","display":"$881.69","display_short":"$881.69","currency":"USD"},"vwap":{"value":"877.80871","value_int":"87780871","display":"$877.81","display_short":"$877.81","currency":"USD"},"vol":{"value":"15209.28682013","value_int":"1520928682013","display":"15,209.29\u00a0BTC","display_short":"15,209.29\u00a0BTC","currency":"BTC"},"last_local":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last_orig":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last_all":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"buy":{"value":"912.40000","value_int":"91240000","display":"$912.40","display_short":"$912.40","currency":"USD"},"sell":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"item":"BTC","now":"1387161430752600"}}'
42
+ http_version:
43
+ recorded_at: Mon, 16 Dec 2013 02:37:28 GMT
44
+ - request:
45
+ method: get
46
+ uri: https://data.mtgox.com/api/1/BTCUSD/ticker
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ Accept:
52
+ - application/json
53
+ User-Agent:
54
+ - mtgox gem 1.1.0
55
+ Accept-Encoding:
56
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Server:
63
+ - nginx/1.4.4
64
+ Content-Type:
65
+ - application/json; charset=utf-8
66
+ X-Powered-By:
67
+ - PHP/5.5.4
68
+ Access-Control-Allow-Origin:
69
+ - '*'
70
+ Content-Length:
71
+ - '1377'
72
+ Cache-Control:
73
+ - public, max-age=19
74
+ Expires:
75
+ - Mon, 16 Dec 2013 02:37:47 GMT
76
+ Date:
77
+ - Mon, 16 Dec 2013 02:37:28 GMT
78
+ Connection:
79
+ - keep-alive
80
+ body:
81
+ encoding: UTF-8
82
+ string: '{"result":"success","return":{"high":{"value":"928.00000","value_int":"92800000","display":"$928.00","display_short":"$928.00","currency":"USD"},"low":{"value":"838.02010","value_int":"83802010","display":"$838.02","display_short":"$838.02","currency":"USD"},"avg":{"value":"881.69362","value_int":"88169362","display":"$881.69","display_short":"$881.69","currency":"USD"},"vwap":{"value":"877.80871","value_int":"87780871","display":"$877.81","display_short":"$877.81","currency":"USD"},"vol":{"value":"15209.28682013","value_int":"1520928682013","display":"15,209.29\u00a0BTC","display_short":"15,209.29\u00a0BTC","currency":"BTC"},"last_local":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last_orig":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last_all":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"last":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"buy":{"value":"912.40000","value_int":"91240000","display":"$912.40","display_short":"$912.40","currency":"USD"},"sell":{"value":"915.00000","value_int":"91500000","display":"$915.00","display_short":"$915.00","currency":"USD"},"item":"BTC","now":"1387161430752600"}}'
83
+ http_version:
84
+ recorded_at: Mon, 16 Dec 2013 02:37:28 GMT
85
+ recorded_with: VCR 2.7.0
@@ -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:50:38 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - __cfduid=d58bd3f2a4b2e988c8550d909c806de761387817438029; 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:50:37 GMT
42
+ Cf-Ray:
43
+ - e168d4bad3d012d
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:50:37 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=21
77
+ Expires:
78
+ - Mon, 23 Dec 2013 16:50:59 GMT
79
+ Date:
80
+ - Mon, 23 Dec 2013 16:50:38 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.16460","value_int":"66216460","display":"$662.16","display_short":"$662.16","currency":"USD"},"vwap":{"value":"662.16864","value_int":"66216864","display":"$662.17","display_short":"$662.17","currency":"USD"},"vol":{"value":"12449.81724962","value_int":"1244981724962","display":"12,449.82\u00a0BTC","display_short":"12,449.82\u00a0BTC","currency":"BTC"},"last_local":{"value":"665.78999","value_int":"66578999","display":"$665.79","display_short":"$665.79","currency":"USD"},"last_orig":{"value":"665.78999","value_int":"66578999","display":"$665.79","display_short":"$665.79","currency":"USD"},"last_all":{"value":"665.78999","value_int":"66578999","display":"$665.79","display_short":"$665.79","currency":"USD"},"last":{"value":"665.78999","value_int":"66578999","display":"$665.79","display_short":"$665.79","currency":"USD"},"buy":{"value":"660.80021","value_int":"66080021","display":"$660.80","display_short":"$660.80","currency":"USD"},"sell":{"value":"665.78996","value_int":"66578996","display":"$665.79","display_short":"$665.79","currency":"USD"},"item":"BTC","now":"1387817429741903"}}'
86
+ http_version:
87
+ recorded_at: Mon, 23 Dec 2013 16:50:37 GMT
88
+ recorded_with: VCR 2.8.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:52:20 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:52:20 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:52:19 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:52:21 GMT
56
+ Content-Type:
57
+ - application/json
58
+ Transfer-Encoding:
59
+ - chunked
60
+ Connection:
61
+ - keep-alive
62
+ Set-Cookie:
63
+ - __cfduid=d701d904c2b2cddcefad8ee0f50717b2f1387817540930; 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:52:20 GMT
73
+ Cf-Ray:
74
+ - e168fce65b2012d
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"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:52:20 GMT
81
+ recorded_with: VCR 2.8.0