Sha256: baa2c4ec11130c713e545f47c3fc52c7d2f254eff62c042a4a4150d3a61f1877

Contents?: true

Size: 273 Bytes

Versions: 12

Compression:

Stored size: 273 Bytes

Contents

require 'mtgox/order'

module MtGox
  class Trade < Order

    def initialize(trade={})
      self.id     = trade['tid'].to_i
      self.date   = Time.at(trade['date'].to_i)
      self.amount = trade['amount'].to_f
      self.price  = trade['price'].to_f
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
mtgox-0.9.1 lib/mtgox/trade.rb
mtgox-0.9.0 lib/mtgox/trade.rb
mtgox-0.8.2 lib/mtgox/trade.rb
mtgox-0.8.1 lib/mtgox/trade.rb
mtgox-0.8.0 lib/mtgox/trade.rb
mtgox-0.7.5 lib/mtgox/trade.rb
mtgox-0.7.4 lib/mtgox/trade.rb
mtgox-0.7.3 lib/mtgox/trade.rb
mt_gox-0.7.3 lib/mtgox/trade.rb
mtgox-0.7.2 lib/mtgox/trade.rb
mtgox-0.7.1 lib/mtgox/trade.rb
mtgox-0.7.0 lib/mtgox/trade.rb