Order.fromMap constructor
Order.fromMap(
- Map m
Implementation
Order.fromMap(Map m)
: clientOrderId = m['clientOrderId'],
cumQty = double.parse(m['cumQty']),
time = m['time'] ?? 0,
cumQuote = double.parse(m['cumQuote']),
executedQty = double.parse(m['executedQty']),
orderId = m['orderId'],
avgPrice = double.parse(m['avgPrice']),
origQty = double.parse(m['origQty']),
price = double.parse(m['price']),
reduceOnly = m['reduceOnly'],
side = (m['side'] as String).toSideEnum(),
positionSide = (m['positionSide'] as String).toPositionSideEnum(),
status = (m['status'] as String).toOrderStatusEnum(),
stopPrice = double.parse(m['stopPrice'] ?? "0"),
closePosition = m['closePosition'] ?? false,
symbol = m['symbol'],
timeInForce = (m['timeInForce'] as String).toTimeInForceEnum(),
type = (m['type'] as String).toOrderTypeEnum(),
origType = (m['origType'] as String).toOrderTypeEnum(),
activatePrice = double.parse(m['activatePrice'] ?? "0"),
priceRate = double.parse(m['priceRate'] ?? "0"),
updateTime = m['updateTime'],
workingType = m['workingType'],
priceProtect = m['priceProtect'] ?? false;