convertJson static method

Ticker convertJson(
  1. Map<String, dynamic> jsonObject
)

Implementation

static Ticker convertJson(Map<String, dynamic> jsonObject) {
  double? ask = double.parse(jsonObject['ask']);
  double? bid = double.parse(jsonObject['bid']);
  double? volume = double.parse(jsonObject['volume']);
  int? tradeId = jsonObject['trade_id'];
  double? price = double.parse(jsonObject['price']);
  double? size = double.parse(jsonObject['size']);
  DateTime? time = DateTime.parse(jsonObject['time']);

  return Ticker(ask, bid, volume, tradeId, price, size, time);
}