Class: MtGox::Trade

Inherits:
Order show all
Defined in:
lib/mtgox/trade.rb

Instance Attribute Summary

Attributes inherited from Order

#date, #id

Attributes inherited from Offer

#amount, #price, #timestamp

Instance Method Summary collapse

Constructor Details

#initialize(trade = {}) ⇒ Trade

Returns a new instance of Trade.



6
7
8
9
10
11
# File 'lib/mtgox/trade.rb', line 6

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