Skip to content

Commit

Permalink
include bid/ask in logger
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove committed Apr 6, 2014
1 parent 758f0b5 commit beee273
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rbtc_arbitrage (2.2.0)
rbtc_arbitrage (2.2.1)
activemodel (>= 3.1)
activesupport (>= 3.1)
btce (= 0.2.4)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Valid exchanges for the `--buyer` and `--seller` option are `bitstamp`, `campbx`
The output will look like this:

~~~
I, [APR 5 2014 2:59:02 PM -0700#35172] INFO -- : Fetching exchange rates
I, [APR 5 2014 2:59:13 PM -0700#35172] INFO -- : Bitstamp: $455.51
I, [APR 5 2014 2:59:13 PM -0700#35172] INFO -- : Campbx: $446.27
I, [APR 5 2014 2:59:13 PM -0700#35172] INFO -- : buying 0.01 btc at Bitstamp for $4.58
I, [APR 5 2014 2:59:13 PM -0700#35172] INFO -- : selling 0.01 btc at Campbx for $4.44
I, [APR 5 2014 2:59:13 PM -0700#35172] INFO -- : profit: $-0.15 (-3.2%) is below cutoff of 2%.
I, [APR 6 2014 7:14:33 AM -0700#52261] INFO -- : Fetching exchange rates
I, [APR 6 2014 7:14:37 AM -0700#52261] INFO -- : Bitstamp (Ask): $455.0
I, [APR 6 2014 7:14:37 AM -0700#52261] INFO -- : Campbx (Bid): $455.05
I, [APR 6 2014 7:14:37 AM -0700#52261] INFO -- : buying 0.01 btc at Bitstamp for $4.58
I, [APR 6 2014 7:14:37 AM -0700#52261] INFO -- : selling 0.01 btc at Campbx for $4.52
I, [APR 6 2014 7:14:37 AM -0700#52261] INFO -- : profit: $-0.05 (-1.18%) is below cutoff of 2%.
~~~

### Environment Variables
Expand Down
4 changes: 2 additions & 2 deletions lib/rbtc_arbitrage/trader/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def logger
def log_info
lower_ex = @buy_client.exchange.to_s.capitalize
higher_ex = @sell_client.exchange.to_s.capitalize
logger.info "#{lower_ex}: $#{color(buyer[:price].round(2))}"
logger.info "#{higher_ex}: $#{color(seller[:price].round(2))}"
logger.info "#{lower_ex} (Ask): $#{color(buyer[:price].round(2))}"
logger.info "#{higher_ex} (Bid): $#{color(seller[:price].round(2))}"
logger.info log_string("buying", lower_ex, @paid)
logger.info log_string("selling", higher_ex, @received)

Expand Down
2 changes: 1 addition & 1 deletion lib/rbtc_arbitrage/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RbtcArbitrage
VERSION = "2.2.0"
VERSION = "2.2.1"
end

0 comments on commit beee273

Please sign in to comment.