OrderBookResponse.fromJson constructor

OrderBookResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory OrderBookResponse.fromJson(Map<String, dynamic> json) =>
    new OrderBookResponse(
        json['base'] == null
            ? null
            : Asset.fromJson(json['base'] as Map<String, dynamic>),
        json['counter'] == null
            ? null
            : Asset.fromJson(json['counter'] as Map<String, dynamic>),
        (json['asks'] as List)
            ?.map((e) => e == null
                ? null
                : new Row.fromJson(e as Map<String, dynamic>))
            ?.toList(),
        (json['bids'] as List)
            ?.map((e) => e == null
                ? null
                : new Row.fromJson(e as Map<String, dynamic>))
            ?.toList())
      ..rateLimitLimit = convertInt(json['rateLimitLimit'])
      ..rateLimitRemaining = convertInt(json['rateLimitRemaining'])
      ..rateLimitReset = convertInt(json['rateLimitReset']);