toCBJson method
Converts an Order to a Coinbase JSON object.
Implementation
Map<String, dynamic> toCBJson() => {
'order_id': orderId,
'product_id': productId,
'user_id': userId,
'order_configuration': orderConfiguration?.toCBJson(),
'side': side?.toCB(),
'client_order_id': clientOrderId,
'status': status?.toCB(),
'time_in_force': timeInForce?.toCB(),
'created_time': createdTime?.toIso8601String(),
'completion_percentage': completionPercentage,
'filled_size': filledSize,
'average_filled_price': averageFilledPrice,
'fee': fee,
'number_of_fills': numberOfFills,
'filled_value': filledValue,
'pending_cancel': pendingCancel,
'size_in_quote': sizeInQuote,
'total_fees': totalFees,
'size_inclusive_of_fees': sizeInclusiveOfFees,
'total_value_after_fees': totalValueAfterFees,
'trigger_status': triggerStatus?.toCB(),
'order_type': orderType?.toCB(),
'reject_reason': rejectReason?.toCB(),
'settled': settled,
'product_type': productType?.toCB(),
'reject_message': rejectMessage,
'cancel_message': cancelMessage
};