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
data/spec/trader_spec.rb CHANGED
@@ -56,13 +56,13 @@ describe RbtcArbitrage::Trader do
56
56
  describe "#fetch_prices" do
57
57
  it "gets the right price set", :vcr do
58
58
  stamp_price = Bitstamp.ticker.ask.to_f
59
- mtgox_price = MtGox.ticker.buy
59
+ campbx_price = RbtcArbitrage::Clients::CampbxClient.new.price(:sell)
60
60
 
61
61
  trader.fetch_prices
62
62
 
63
63
  #allow for recent price changes
64
64
  trader.buyer[:price].should be_within(0.02).of(stamp_price)
65
- trader.seller[:price].should be_within(0.02).of(mtgox_price)
65
+ trader.seller[:price].should be_within(0.02).of(campbx_price)
66
66
  end
67
67
 
68
68
  it "calculates profit and percent accurately" do
@@ -84,7 +84,7 @@ describe RbtcArbitrage::Trader do
84
84
  verbose: false,
85
85
  live: true,
86
86
  seller: :bitstamp,
87
- buyer: :mtgox,
87
+ buyer: :campbx,
88
88
  notify: true,
89
89
  }
90
90
  }
@@ -100,7 +100,7 @@ describe RbtcArbitrage::Trader do
100
100
  end
101
101
 
102
102
  it "sets the right exchanges" do
103
- trader.buy_client.should be_a(RbtcArbitrage::Clients::MtGoxClient)
103
+ trader.buy_client.should be_a(RbtcArbitrage::Clients::CampbxClient)
104
104
  trader.sell_client.should be_a(RbtcArbitrage::Clients::BitstampClient)
105
105
  end
106
106
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbtc_arbitrage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hank Stoever
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-19 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: mtgox
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: faraday
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +52,6 @@ dependencies:
66
52
  - - '='
67
53
  - !ruby/object:Gem::Version
68
54
  version: 0.8.8
69
- - !ruby/object:Gem::Dependency
70
- name: bitstamp
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: activemodel
85
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +108,6 @@ dependencies:
136
108
  - - '='
137
109
  - !ruby/object:Gem::Version
138
110
  version: 0.2.4
139
- - !ruby/object:Gem::Dependency
140
- name: bitstamp
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '>='
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '>='
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
111
  - !ruby/object:Gem::Dependency
154
112
  name: coinbase
155
113
  requirement: !ruby/object:Gem::Requirement
@@ -187,6 +145,7 @@ extensions: []
187
145
  extra_rdoc_files: []
188
146
  files:
189
147
  - .gitignore
148
+ - .gitmodules
190
149
  - .rspec
191
150
  - .travis.yml
192
151
  - Gemfile
@@ -207,7 +166,6 @@ files:
207
166
  - lib/rbtc_arbitrage/clients/campbx_client.rb
208
167
  - lib/rbtc_arbitrage/clients/client.rb.example
209
168
  - lib/rbtc_arbitrage/clients/coinbase_client.rb
210
- - lib/rbtc_arbitrage/clients/mtgox_client.rb
211
169
  - lib/rbtc_arbitrage/trader.rb
212
170
  - lib/rbtc_arbitrage/version.rb
213
171
  - rbtc_arbitrage.gemspec
@@ -217,13 +175,13 @@ files:
217
175
  - spec/clients/btce_client_spec.rb
218
176
  - spec/clients/campbx_client_spec.rb
219
177
  - spec/clients/coinbase_client_spec.rb
220
- - spec/clients/mtgox_client_spec.rb
221
178
  - spec/rbtc_arbitrage_spec.rb
222
179
  - spec/spec_helper.rb
223
180
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_balance/fetches_the_balance_correctly.yml
224
181
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_buy_correctly.yml
225
182
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_sell_correctly.yml
226
183
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_prices_correctly.yml
184
+ - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_transfer/calls_Bitstamp_correctly.yml
227
185
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_balance/should_raise_if_bad_API_keys.yml
228
186
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/calls_btc-e.yml
229
187
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_buy_correctly.yml
@@ -235,10 +193,6 @@ files:
235
193
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml
236
194
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml
237
195
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml
238
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml
239
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml
240
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml
241
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_prices_correctly.yml
242
196
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml
243
197
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml
244
198
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml
@@ -267,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
221
  version: '0'
268
222
  requirements: []
269
223
  rubyforge_project:
270
- rubygems_version: 2.0.6
224
+ rubygems_version: 2.2.0
271
225
  signing_key:
272
226
  specification_version: 4
273
227
  summary: A gem for conducting arbitrage with Bitcoin.
@@ -278,13 +232,13 @@ test_files:
278
232
  - spec/clients/btce_client_spec.rb
279
233
  - spec/clients/campbx_client_spec.rb
280
234
  - spec/clients/coinbase_client_spec.rb
281
- - spec/clients/mtgox_client_spec.rb
282
235
  - spec/rbtc_arbitrage_spec.rb
283
236
  - spec/spec_helper.rb
284
237
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_balance/fetches_the_balance_correctly.yml
285
238
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_buy_correctly.yml
286
239
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_price_for_sell_correctly.yml
287
240
  - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_price/fetches_prices_correctly.yml
241
+ - spec/support/cassettes/RbtcArbitrage_Clients_BitstampClient/_transfer/calls_Bitstamp_correctly.yml
288
242
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_balance/should_raise_if_bad_API_keys.yml
289
243
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/calls_btc-e.yml
290
244
  - spec/support/cassettes/RbtcArbitrage_Clients_BtceClient/_price/fetches_price_for_buy_correctly.yml
@@ -296,10 +250,6 @@ test_files:
296
250
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml
297
251
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml
298
252
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml
299
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_balance/fetches_the_balance_correctly.yml
300
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_buy_correctly.yml
301
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_price_for_sell_correctly.yml
302
- - spec/support/cassettes/RbtcArbitrage_Clients_MtGoxClient/_price/fetches_prices_correctly.yml
303
253
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/should_raise_SecurityError_if_not_live.yml
304
254
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_BTC.yml
305
255
  - spec/support/cassettes/RbtcArbitrage_Trader/_execute_trade/when_live/raises_SecurityError_if_not_enough_USD.yml
@@ -1,56 +0,0 @@
1
- module RbtcArbitrage
2
- module Clients
3
- class MtGoxClient
4
- include RbtcArbitrage::Client
5
-
6
- ##
7
- # Returns an array of Floats.
8
- # The first element is the balance in BTC;
9
- # The second is in USD.
10
- def balance
11
- return @balance if @balance
12
- balances = MtGox.balance
13
- @balance = [balances[0].amount.to_f, balances[1].amount.to_f]
14
- end
15
-
16
- ##
17
- # Configures the MtGox
18
- # client's API keys.
19
- def validate_env
20
- validate_keys :mtgox_key, :mtgox_secret, :mtgox_address
21
- MtGox.configure do |config|
22
- config.key = ENV["MTGOX_KEY"]
23
- config.secret = ENV["MTGOX_SECRET"]
24
- end
25
- end
26
-
27
- def exchange
28
- :mtgox
29
- end
30
-
31
- # `action` is :buy or :sell
32
- # Returns a Numeric type.
33
- def price action
34
- return @price if @price
35
- action = {
36
- buy: :sell,
37
- sell: :buy,
38
- }[action]
39
- @price = MtGox.ticker.send(action)
40
- end
41
-
42
- # `action` is :buy or :sell
43
- def trade action
44
- action = "#{action.to_s}!".to_sym
45
- MtGox.send(action, @options[:volume], :market)
46
- end
47
-
48
- ##
49
- # Transfers BTC to the address of a different
50
- # exchange.
51
- def transfer other_client
52
- MtGox.withdraw! @options[:volume], other_client.address
53
- end
54
- end
55
- end
56
- end
@@ -1,53 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe RbtcArbitrage::Clients::MtGoxClient do
4
- let(:client) { RbtcArbitrage::Clients::MtGoxClient.new }
5
- before(:each) { client.validate_env }
6
-
7
- describe "#balance" do
8
- it "fetches the balance correctly", :vcr do
9
- balances = MtGox.balance
10
- balance = client.balance
11
- balance.should == [balances[0].amount.to_f, balances[1].amount.to_f]
12
- end
13
- end
14
-
15
- describe "#price" do
16
- [:buy, :sell].each do |action|
17
- it "fetches price for #{action} correctly", :vcr do
18
- client.price(action).should be_a(BigDecimal)
19
- end
20
- end
21
-
22
- it "calls MtGox" do
23
- hash = Hashie::Mash.new(buy: 10)
24
- hash.should_receive(:buy)
25
- MtGox.should_receive(:ticker) { hash }
26
- client.price(:sell)
27
-
28
- client.instance_variable_set(:@price, nil)
29
- hash = Hashie::Mash.new(sell: 10)
30
- hash.should_receive(:sell)
31
- MtGox.should_receive(:ticker) { hash }
32
- client.price(:buy)
33
- end
34
- end
35
-
36
- describe "#trade" do
37
- it "calls MtGox" do
38
- MtGox.should_receive(:sell!).with(0.01, :market)
39
- client.trade(:sell)
40
-
41
- MtGox.should_receive(:buy!).with(0.01, :market)
42
- client.trade(:buy)
43
- end
44
- end
45
-
46
- describe "#transfer" do
47
- it "calls MtGox correctly" do
48
- sell_client = RbtcArbitrage::Clients::BitstampClient.new
49
- MtGox.should_receive(:withdraw!).with(0.01, sell_client.address)
50
- client.transfer sell_client
51
- end
52
- end
53
- end
@@ -1,77 +0,0 @@
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
@@ -1,44 +0,0 @@
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
@@ -1,44 +0,0 @@
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