Class: BinanceClient::OrderFill

Inherits:
BaseModel show all
Defined in:
lib/binance_client/models/order_fill.rb

Class Method Summary collapse

Class Method Details

.new_from_raw_hash(raw_hash) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/binance_client/models/order_fill.rb', line 10

def self.new_from_raw_hash(raw_hash)
  self.new(
    price: raw_hash["price"],
    qty: raw_hash["qty"],
    commission: raw_hash["commission"],
    commission_asset: raw_hash["commissionAsset"],
    trade_id: raw_hash["tradeId"],
  )
end