class CoinSync::Importers::KucoinAPI::HistoryEntry

Attributes

amount[RW]
coin_type[RW]
coin_type_pair[RW]
created_at[RW]
deal_value[RW]
direction[RW]
fee[RW]

Public Class Methods

new(hash) click to toggle source
# File lib/coinsync/importers/kucoin_api.rb, line 24
def initialize(hash)
  @created_at = Time.at(hash['createdAt'] / 1000)
  @amount = BigDecimal.new(hash['amount'], 0)
  @direction = hash['direction']
  @coin_type = CryptoCurrency.new(hash['coinType'])
  @coin_type_pair = CryptoCurrency.new(hash['coinTypePair'])
  @deal_value = BigDecimal.new(hash['dealValue'], 0)
  @fee = BigDecimal.new(hash['fee'], 0)
end