Skip to content

Commit

Permalink
Use non-async API for stathat notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jordoh committed Apr 15, 2014
1 parent 1c35180 commit d1d206d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PATH
faraday (= 0.8.8)
pony
rake (= 10.1.1)
stathat
tco (= 0.1.0)
thor

Expand Down Expand Up @@ -139,6 +140,7 @@ GEM
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
slop (3.4.7)
stathat (0.1.7)
tco (0.1.0)
term-ansicolor (1.2.2)
tins (~> 0.8)
Expand Down
4 changes: 2 additions & 2 deletions lib/rbtc_arbitrage/trader/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def notify
if (stathat_api_key = ENV['STATHAT_API_KEY']).present?
options[:logger].info "Notifying #{ stathat_api_key } via stathat"

StatHat::API.ez_post_value("#{@buy_client.exchange}_to_#{@sell_client.exchange}_percent", stathat_api_key, @percent)
StatHat::API.ez_post_value("#{@buy_client.exchange}_to_#{@sell_client.exchange}_profit", stathat_api_key, @received - @paid)
StatHat::SyncAPI.ez_post_value("#{@buy_client.exchange}_to_#{@sell_client.exchange}_percent", stathat_api_key, @percent)
StatHat::SyncAPI.ez_post_value("#{@buy_client.exchange}_to_#{@sell_client.exchange}_profit", stathat_api_key, @received - @paid)
end
end

Expand Down

0 comments on commit d1d206d

Please sign in to comment.