toJson method

Map<String, dynamic> toJson()

Converts a Trade to a JSON object.

Implementation

Map<String, dynamic> toJson() => {
      'tradeId': tradeId,
      'productId': productId,
      'price': price,
      'size': size,
      'time': time?.toIso8601String(),
      'side': side,
      'bid': bid,
      'ask': ask,
    };