class CoinSync::Importers::BittrexCSV::HistoryEntry
Constants
- TIME_FORMAT
Attributes
asset[RW]
commission[RW]
currency[RW]
limit[RW]
price[RW]
quantity[RW]
time_closed[RW]
time_opened[RW]
type[RW]
uuid[RW]
Public Class Methods
new(line)
click to toggle source
# File lib/coinsync/importers/bittrex_csv.rb, line 20 def initialize(line) @uuid = line[0] @currency, @asset = line[1].split('-').map { |c| CryptoCurrency.new(c) } @type = line[2] @quantity = BigDecimal.new(line[3]) @limit = BigDecimal.new(line[4]) @commission = BigDecimal.new(line[5]) @price = BigDecimal.new(line[6]) @time_opened = Time.strptime(line[7] + ' +0000', TIME_FORMAT) @time_closed = Time.strptime(line[8] + ' +0000', TIME_FORMAT) end