DerivativeExchange.fromJson constructor
Constructs a DerivativeExchange instance from a JSON map.
json
is a map containing the exchange data.
Implementation
DerivativeExchange.fromJson(Map<String, dynamic> json)
: this.id = Convert.toStr(json['id'], ''),
this.name = Convert.toStr(json['name'], ''),
this.openInterestBtc = Convert.toDoubleN(json['open_interest_btc']),
this.tradeVolume24hBtc =
Convert.toDouble(json['trade_volume_24h_btc'], 0),
this.numberOfPerpetualPairs =
Convert.toInt(json['number_of_perpetual_pairs'], 0),
this.numberOfFuturesPairs =
Convert.toInt(json['number_of_futures_pairs'], 0),
this.image = Convert.toStr(json['image'], ''),
this.yearEstablished = Convert.toInt(json['year_established'], 0),
this.country = Convert.toStrN(json['country']),
this.description = Convert.toStr(json['description'], ''),
this.url = Convert.toStr(json['url'], '');