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,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rbtc_arbitrage/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rbtc_arbitrage_simple"
|
8
|
+
spec.version = RbtcArbitrage::VERSION
|
9
|
+
spec.authors = ["Hank Stoever"]
|
10
|
+
spec.email = ["hstove@gmail.com"]
|
11
|
+
spec.description = %q{A gem for conducting arbitrage with Bitcoin.}
|
12
|
+
spec.summary = %q{A gem for conducting arbitrage with Bitcoin.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
|
24
|
+
spec.add_dependency "mtgox"
|
25
|
+
spec.add_dependency "activemodel", ">= 3.1"
|
26
|
+
spec.add_dependency "activesupport", ">= 3.1"
|
27
|
+
spec.add_dependency "thor"
|
28
|
+
spec.add_dependency "btce", '0.2.4'
|
29
|
+
spec.add_dependency "coinbase", '1.2.4'
|
30
|
+
end
|
data/spec/cli_spec.rb
ADDED
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class FakeClient
|
4
|
+
include RbtcArbitrage::Client
|
5
|
+
|
6
|
+
def trade action
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
describe RbtcArbitrage::Client do
|
11
|
+
let(:client) { FakeClient.new }
|
12
|
+
it "aliases buy and sell" do
|
13
|
+
client.should_receive(:trade).with(:sell)
|
14
|
+
client.sell
|
15
|
+
client.should_receive(:trade).with(:buy)
|
16
|
+
client.buy
|
17
|
+
end
|
18
|
+
|
19
|
+
describe RbtcArbitrage::Clients do
|
20
|
+
RbtcArbitrage.clients.each do |client|
|
21
|
+
required_methods = [:trade, :balance, :validate_env, :exchange]
|
22
|
+
required_methods << [:price, :transfer, :address]
|
23
|
+
required_methods.flatten!
|
24
|
+
describe client do
|
25
|
+
it "has all requred methods" do
|
26
|
+
required_methods.each do |meth|
|
27
|
+
client.new.methods.should include(meth)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RbtcArbitrage::Clients::BtceClient do
|
4
|
+
let(:client) { RbtcArbitrage::Clients::BtceClient.new(verbose: false) }
|
5
|
+
let(:btce) { client.interface }
|
6
|
+
|
7
|
+
it { client.exchange.should == :btce }
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
btce.stub(:get_info) {
|
11
|
+
{
|
12
|
+
"success" => 1,
|
13
|
+
"return" => {
|
14
|
+
"funds" => {
|
15
|
+
"usd" => 2.57460659,
|
16
|
+
"btc" => 0.00012226,
|
17
|
+
"ltc" => 3.00815559,
|
18
|
+
"nmc" => 0,
|
19
|
+
"rur" => 8.0116908,
|
20
|
+
"eur" => 0,
|
21
|
+
"nvc" => 0,
|
22
|
+
"trc" => 0,
|
23
|
+
"ppc" => 0,
|
24
|
+
"ftc" => 0,
|
25
|
+
"xpm" => 0},
|
26
|
+
"rights" => {
|
27
|
+
"info" => 1,
|
28
|
+
"trade" => 0,
|
29
|
+
"withdraw" => 0
|
30
|
+
},
|
31
|
+
"transaction_count" => 120,
|
32
|
+
"open_orders" => 1,
|
33
|
+
"server_time"=>1385947487
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "#balance" do
|
40
|
+
it "fetches the balance correctly" do
|
41
|
+
balances = btce.get_info["return"]["funds"]
|
42
|
+
expected = [balances["btc"], balances["usd"]]
|
43
|
+
client.balance.should eql(expected)
|
44
|
+
client.balance.each do |b|
|
45
|
+
b.should be_a(Float)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should raise if bad API keys", :vcr do
|
50
|
+
btce.unstub(:get_info)
|
51
|
+
expect { client.balance }.to raise_error(SecurityError)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#price" do
|
56
|
+
[:buy, :sell].each do |action|
|
57
|
+
it "fetches price for #{action} correctly", :vcr do
|
58
|
+
client.price(action).should be_a(Float)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
it "calls btc-e", :vcr do
|
63
|
+
ticker = Btce::Ticker.new("btc_usd").json["ticker"]
|
64
|
+
client.price(:sell).should == ticker["sell"]
|
65
|
+
client.price(:buy).should == ticker["buy"]
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "#trade" do
|
70
|
+
it "calls CampBX" do
|
71
|
+
client.stub(:gets) { 'accept' }
|
72
|
+
|
73
|
+
client.instance_variable_set(:@ticker, {"sell" => 10, "buy" => 11})
|
74
|
+
opts = {pair: "btc_usd", type: :sell, rate: 10, amount: 0.01}
|
75
|
+
btce.should_receive(:trade).with(opts)
|
76
|
+
client.trade(:sell)
|
77
|
+
|
78
|
+
opts[:type] = :buy
|
79
|
+
opts[:rate] = 11
|
80
|
+
btce.should_receive(:trade).with(opts)
|
81
|
+
client.trade(:buy)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe "#transfer" do
|
86
|
+
it "calls CampBX correctly" do
|
87
|
+
client.options[:verbose] = true
|
88
|
+
sell_client = RbtcArbitrage::Clients::BtceClient.new
|
89
|
+
client.options[:logger].should_receive(:error)
|
90
|
+
client.transfer(sell_client)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RbtcArbitrage::Clients::CampbxClient do
|
4
|
+
let(:client) { RbtcArbitrage::Clients::CampbxClient.new }
|
5
|
+
let(:campbx) { client.interface }
|
6
|
+
|
7
|
+
before(:each) { client.validate_env }
|
8
|
+
|
9
|
+
it { client.exchange.should == :campbx }
|
10
|
+
|
11
|
+
describe "#balance" do
|
12
|
+
it "fetches the balance correctly", :vcr do
|
13
|
+
balances = campbx.my_funds
|
14
|
+
expected = [balances["Total BTC"].to_f, balances["Total USD"].to_f]
|
15
|
+
client.balance.should == expected
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#price" do
|
20
|
+
[:buy, :sell].each do |action|
|
21
|
+
it "fetches price for #{action} correctly", :vcr do
|
22
|
+
client.price(action).should be_a(Float)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "calls CampBX" do
|
27
|
+
hash = Hashie::Mash.new("Best Bid" => 10)
|
28
|
+
hash.should_receive(:[]).with("Best Bid")
|
29
|
+
campbx.should_receive(:xticker) { hash }
|
30
|
+
client.price(:sell)
|
31
|
+
|
32
|
+
client.instance_variable_set(:@price, nil)
|
33
|
+
hash = Hashie::Mash.new("Best Ask" => 10)
|
34
|
+
hash.should_receive(:[]).with("Best Ask")
|
35
|
+
campbx.should_receive(:xticker) { hash }
|
36
|
+
client.price(:buy)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#trade" do
|
41
|
+
it "calls CampBX" do
|
42
|
+
client.instance_variable_set(:@price, 10)
|
43
|
+
campbx.should_receive(:trade_enter).with("QuickSell",0.01,10)
|
44
|
+
client.trade(:sell)
|
45
|
+
|
46
|
+
client.instance_variable_set(:@price, 11)
|
47
|
+
campbx.should_receive(:trade_enter).with("QuickBuy",0.01,11)
|
48
|
+
client.trade(:buy)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#transfer" do
|
53
|
+
it "calls CampBX correctly" do
|
54
|
+
sell_client = RbtcArbitrage::Clients::BtceClient.new
|
55
|
+
campbx.should_receive(:send_btc).with(sell_client.address, 0.01)
|
56
|
+
client.transfer sell_client
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "#address" do
|
61
|
+
it "calls campbx" do
|
62
|
+
campbx.should_receive(:get_btc_address)
|
63
|
+
client.address
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RbtcArbitrage::Clients::CoinbaseClient do
|
4
|
+
let(:client) { RbtcArbitrage::Clients::CoinbaseClient.new }
|
5
|
+
let(:coinbase) { client.interface }
|
6
|
+
|
7
|
+
it { client.exchange.should == :coinbase }
|
8
|
+
|
9
|
+
describe "#balance" do
|
10
|
+
it "fetches the balance correctly", :vcr do
|
11
|
+
balance = coinbase.balance.to_f
|
12
|
+
expected = [balance, Float::MAX]
|
13
|
+
client.balance.should eql(expected)
|
14
|
+
client.balance.each do |b|
|
15
|
+
b.should be_a(Float)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should warn about USD balance" do
|
20
|
+
client.options[:verbose] = true
|
21
|
+
client.options[:logger].should_receive :warn
|
22
|
+
client.instance_variable_set :@balance, [1, 1]
|
23
|
+
client.balance
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#price" do
|
28
|
+
[:buy, :sell].each do |action|
|
29
|
+
it "fetches price for #{action} correctly", :vcr do
|
30
|
+
client.price(action).should be_a(Float)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
it "calls coinbase", :vcr do
|
35
|
+
client.price(:buy).should == coinbase.buy_price.to_f
|
36
|
+
client.instance_variable_set :@price, nil
|
37
|
+
client.price(:sell).should == coinbase.sell_price.to_f
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#trade" do
|
42
|
+
it "calls coinbase" do
|
43
|
+
coinbase.should_receive(:sell!).with(0.01)
|
44
|
+
client.trade(:sell)
|
45
|
+
|
46
|
+
coinbase.should_receive(:buy!).with(0.01)
|
47
|
+
client.trade(:buy)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#transfer" do
|
52
|
+
it "calls coinbase correctly" do
|
53
|
+
sell_client = RbtcArbitrage::Clients::BtceClient.new
|
54
|
+
coinbase.should_receive(:send_money).with(sell_client.address, 0.01)
|
55
|
+
client.transfer(sell_client)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "#address" do
|
60
|
+
it "calls coinbase correctly" do
|
61
|
+
response = Hashie::Mash.new(address: "hi")
|
62
|
+
coinbase.should_receive(:receive_address) { response }
|
63
|
+
client.address
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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::BtceClient.new
|
49
|
+
MtGox.should_receive(:withdraw!).with(0.01, sell_client.address)
|
50
|
+
client.transfer sell_client
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RbtcArbitrage do
|
4
|
+
describe ".clients" do
|
5
|
+
it "includes clients" do
|
6
|
+
clients = RbtcArbitrage.clients
|
7
|
+
clients.should include(RbtcArbitrage::Clients::MtGoxClient)
|
8
|
+
clients.should include(RbtcArbitrage::Clients::BtceClient)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
require 'codeclimate-test-reporter'
|
4
|
+
|
5
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
6
|
+
SimpleCov::Formatter::HTMLFormatter,
|
7
|
+
Coveralls::SimpleCov::Formatter,
|
8
|
+
# CodeClimate::TestReporter::Formatter
|
9
|
+
]
|
10
|
+
SimpleCov.start do
|
11
|
+
add_filter "/spec/"
|
12
|
+
add_filter "/lib/rbtc_arbitrage/campbx.rb"
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'bundler'
|
16
|
+
require './lib/rbtc_arbitrage'
|
17
|
+
Bundler.require
|
18
|
+
|
19
|
+
VCR.configure do |c|
|
20
|
+
c.cassette_library_dir = 'spec/support/cassettes'
|
21
|
+
c.hook_into :webmock # or :fakeweb
|
22
|
+
c.ignore_localhost = true
|
23
|
+
c.ignore_hosts 'codeclimate.com'
|
24
|
+
c.ignore_request do |request|
|
25
|
+
# true
|
26
|
+
end
|
27
|
+
c.configure_rspec_metadata!
|
28
|
+
end
|
29
|
+
|
30
|
+
RSpec.configure do |config|
|
31
|
+
config.run_all_when_everything_filtered = true
|
32
|
+
config.filter_run :focus
|
33
|
+
config.order = 'random'
|
34
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bitstamp.net/api/balance/
|
6
|
+
body:
|
7
|
+
headers: {}
|
8
|
+
response:
|
9
|
+
status:
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
Date:
|
14
|
+
- Tue, 17 Dec 2013 18:40:02 GMT
|
15
|
+
Server:
|
16
|
+
- Apache
|
17
|
+
Content-Language:
|
18
|
+
- en
|
19
|
+
Expires:
|
20
|
+
- Tue, 17 Dec 2013 18:40:02 GMT
|
21
|
+
Vary:
|
22
|
+
- Accept-Language
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0
|
25
|
+
Last-Modified:
|
26
|
+
- Tue, 17 Dec 2013 18:40:02 GMT
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
Set-Cookie:
|
34
|
+
- incap_ses_124_99025=/U1EcazP+UfdRdBvBoq4AYKasFIAAAAAdb3zOl4ewZCjqVwIQR8HRg==;
|
35
|
+
path=/; Domain=.bitstamp.net
|
36
|
+
- nlbi_99025=6To6TWWds1Vw9zhaItob8gAAAABgpcZ6AsnAXA2RDnqQ2T1z; path=/; Domain=.bitstamp.net
|
37
|
+
- visid_incap_99025=MMLr1fRQQF+jMYOwRSsxz4GasFIAAAAAQUIPAAAAAABoL4fhNvllL6g2wd8gq/Zs;
|
38
|
+
expires=Thu, 17 Dec 2015 17:12:31 GMT; path=/; Domain=.bitstamp.net
|
39
|
+
X-Iinfo:
|
40
|
+
- 6-3497408-3497716 NNNY CT(200 202 0) RT(1387305600895 539) q(0 0 4 0) r(4
|
41
|
+
7) U6
|
42
|
+
X-Cdn:
|
43
|
+
- Incapsula
|
44
|
+
body:
|
45
|
+
encoding: ASCII-8BIT
|
46
|
+
string: '{"btc_reserved": "0", "fee": "0.5000", "btc_available": "0", "usd_reserved":
|
47
|
+
"0", "btc_balance": "0", "usd_balance": "0.00", "usd_available": "0.00"}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Tue, 17 Dec 2013 18:40:03 GMT
|
50
|
+
- request:
|
51
|
+
method: post
|
52
|
+
uri: https://www.bitstamp.net/api/balance/
|
53
|
+
headers: {}
|
54
|
+
response:
|
55
|
+
status:
|
56
|
+
code: 200
|
57
|
+
message: OK
|
58
|
+
headers:
|
59
|
+
Date:
|
60
|
+
- Tue, 17 Dec 2013 18:40:03 GMT
|
61
|
+
Server:
|
62
|
+
- Apache
|
63
|
+
Content-Language:
|
64
|
+
- en
|
65
|
+
Expires:
|
66
|
+
- Tue, 17 Dec 2013 18:40:03 GMT
|
67
|
+
Vary:
|
68
|
+
- Accept-Language
|
69
|
+
Cache-Control:
|
70
|
+
- max-age=0
|
71
|
+
Last-Modified:
|
72
|
+
- Tue, 17 Dec 2013 18:40:03 GMT
|
73
|
+
Connection:
|
74
|
+
- close
|
75
|
+
Transfer-Encoding:
|
76
|
+
- chunked
|
77
|
+
Content-Type:
|
78
|
+
- application/json
|
79
|
+
Set-Cookie:
|
80
|
+
- incap_ses_124_99025=LlOzDxXjiiDdRdBvBoq4AYOasFIAAAAAjKStMu6sRoI8G9vBobzXaw==;
|
81
|
+
path=/; Domain=.bitstamp.net
|
82
|
+
- nlbi_99025=iC3WZwFDbyNNIFu9Itob8gAAAABlF1MNYf5CBe4QsTL4PfH8; path=/; Domain=.bitstamp.net
|
83
|
+
- visid_incap_99025=MMLr1fRQQF+jMYOwRSsxz4GasFIAAAAAQUIPAAAAAABoL4fhNvllL6g2wd8gq/Zs;
|
84
|
+
expires=Thu, 17 Dec 2015 17:12:31 GMT; path=/; Domain=.bitstamp.net
|
85
|
+
X-Iinfo:
|
86
|
+
- 6-3498335-3498462 NNNY CT(193 217 0) RT(1387305602232 162) q(0 0 5 0) r(5
|
87
|
+
7) U6
|
88
|
+
X-Cdn:
|
89
|
+
- Incapsula
|
90
|
+
body:
|
91
|
+
encoding: ASCII-8BIT
|
92
|
+
string: '{"btc_reserved": "0", "fee": "0.5000", "btc_available": "0", "usd_reserved":
|
93
|
+
"0", "btc_balance": "0", "usd_balance": "0.00", "usd_available": "0.00"}'
|
94
|
+
http_version:
|
95
|
+
recorded_at: Tue, 17 Dec 2013 18:40:04 GMT
|
96
|
+
recorded_with: VCR 2.7.0
|