diff --git a/Gemfile.lock b/Gemfile.lock index 8bd0f4a..bf4fa9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,6 +10,7 @@ PATH faraday (= 0.8.8) pony rake (= 10.1.1) + stathat tco (= 0.1.0) thor @@ -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) diff --git a/lib/rbtc_arbitrage/trader/notifier.rb b/lib/rbtc_arbitrage/trader/notifier.rb index f6cb09f..2b6bdeb 100644 --- a/lib/rbtc_arbitrage/trader/notifier.rb +++ b/lib/rbtc_arbitrage/trader/notifier.rb @@ -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