Skip to content

Commit

Permalink
Changes default trader to campbx
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove committed Dec 23, 2013
1 parent ab6fba8 commit e1f956d
Show file tree
Hide file tree
Showing 16 changed files with 355 additions and 765 deletions.
2 changes: 1 addition & 1 deletion lib/rbtc_arbitrage/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CLI < Thor
option :cutoff, type: :numeric, default: 2, desc: "The minimum profit level required to execute a trade."
option :volume, type: :numeric, default: 0.01, desc: "The amount of bitcoins to trade per transaction."
option :verbose, type: :boolean, default: true, desc: "Whether you wish to log information."
option :buyer, type: :string, default: "bitstamp"
option :buyer, type: :string, default: "campbx"
option :seller, type: :string, default: "mtgox"
option :repeat, type: :numeric, default: nil
def trade
Expand Down
2 changes: 1 addition & 1 deletion lib/rbtc_arbitrage/trader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize config={}
set_key opts, :verbose, true
set_key opts, :live, false
set_key opts, :repeat, nil
exchange = opts[:buyer] || :bitstamp
exchange = opts[:buyer] || :campbx
@buy_client = client_for_exchange(exchange)
exchange = opts[:seller] || :mtgox
@sell_client = client_for_exchange(exchange)
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/btce_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
describe "#transfer" do
it "calls CampBX correctly" do
client.options[:verbose] = true
sell_client = RbtcArbitrage::Clients::BitstampClient.new
sell_client = RbtcArbitrage::Clients::BtceClient.new
client.options[:logger].should_receive(:error)
client.transfer(sell_client)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/campbx_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

describe "#transfer" do
it "calls CampBX correctly" do
sell_client = RbtcArbitrage::Clients::BitstampClient.new
sell_client = RbtcArbitrage::Clients::BtceClient.new
campbx.should_receive(:send_btc).with(sell_client.address, 0.01)
client.transfer sell_client
end
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/coinbase_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

describe "#transfer" do
it "calls coinbase correctly" do
sell_client = RbtcArbitrage::Clients::BitstampClient.new
sell_client = RbtcArbitrage::Clients::BtceClient.new
coinbase.should_receive(:send_money).with(sell_client.address, 0.01)
client.transfer(sell_client)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/mtgox_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

describe "#transfer" do
it "calls MtGox correctly" do
sell_client = RbtcArbitrage::Clients::BitstampClient.new
sell_client = RbtcArbitrage::Clients::BtceClient.new
MtGox.should_receive(:withdraw!).with(0.01, sell_client.address)
client.transfer sell_client
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rbtc_arbitrage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it "includes clients" do
clients = RbtcArbitrage.clients
clients.should include(RbtcArbitrage::Clients::MtGoxClient)
clients.should include(RbtcArbitrage::Clients::BitstampClient)
clients.should include(RbtcArbitrage::Clients::BtceClient)
end
end
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
end

require 'bundler'
require './lib/rbtc_arbitrage'
Bundler.require

VCR.configure do |c|
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1f956d

Please sign in to comment.