Class: Bitfinex::Models::Trade

Inherits:
Model
  • Object
show all
Defined in:
lib/models/trade.rb

Constant Summary collapse

BOOL_FIELDS =
[]
FIELDS =
{
  id: 0,
  symbol: 1,
  mts_create: 2,
  order_id: 3,
  exec_amount: 4,
  exec_price: 5,
  order_type: 6,
  order_price: 7,
  maker: 8,
  fee: 9,
  fee_currency: 10
}

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#apply, #serialize

Constructor Details

#initialize(data) ⇒ Trade

Returns a new instance of Trade.



25
26
27
# File 'lib/models/trade.rb', line 25

def initialize (data)
  super(data, FIELDS, BOOL_FIELDS)
end

Class Method Details

.unserialize(data) ⇒ Object



29
30
31
# File 'lib/models/trade.rb', line 29

def self.unserialize (data)
  return Model.unserialize(data, FIELDS, BOOL_FIELDS)
end