WsKline.fromMap constructor

WsKline.fromMap(
  1. Map m
)

Implementation

WsKline.fromMap(Map m)
    : this.eventType = m['e'],
      this.eventTime = DateTime.fromMillisecondsSinceEpoch(m['E']),
      this.symbol = m['s'],
      this.openTime = DateTime.fromMillisecondsSinceEpoch(m['k']['t']),
      this.open = double.parse(m['k']['o']),
      this.high = double.parse(m['k']['h']),
      this.low = double.parse(m['k']['l']),
      this.close = double.parse(m['k']['c']),
      this.volume = double.parse(m['k']['v']),
      this.closeTime = DateTime.fromMillisecondsSinceEpoch(m['k']['T']),
      this.quoteVolume = double.parse(m['k']['q']),
      this.tradesCount = m['k']['n'],
      this.takerBase = double.parse(m['k']['V']),
      this.takerQuote = double.parse(m['k']['Q']),
      this.interval = m['k']['i'],
      this.firstTradeId = m['k']['f'],
      this.lastTradeId = m['k']['L'],
      this.isKlineClosed = m['k']['x'];