Skip to content

Commit

Permalink
update rspec test
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvisLYC committed May 3, 2019
1 parent 45e07b2 commit 644d946
Show file tree
Hide file tree
Showing 5 changed files with 1,468 additions and 1,762 deletions.
5 changes: 3 additions & 2 deletions lib/cryptoexchange/exchanges/bitopro/services/trades.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'pry'
module Cryptoexchange::Exchanges
module Bitopro
module Services
Expand All @@ -12,12 +13,12 @@ def ticker_url(market_pair)
end

def adapt(output, market_pair)
output.collect do |trade|
output["data"].collect do |trade|

tr = Cryptoexchange::Models::Trade.new
tr.base = market_pair.base
tr.target = market_pair.target
tr.market = Bitopro::Market::NAME

tr.price = trade['price']
tr.amount = trade['amount']
tr.timestamp = trade['timestamp'].to_i / 1000
Expand Down
Loading

0 comments on commit 644d946

Please sign in to comment.