def parse_order(self, order, market=None):
    status = self.safe_string(order, 'status')
    symbol = None
    marketId = self.safe_string(order, 'symbol')
    if (marketId in self.markets_by_id):
        market = self.markets_by_id[marketId]
    else:
        baseId = self.safe_string(order, 'base')
        quoteId = self.safe_string(order, 'quote')
        if ((baseId is not None) and (quoteId is not None)):
            base = self.safe_currency_code(baseId)
            quote = self.safe_currency_code(quoteId)
            symbol = ((base + '/') + quote)
    if ((symbol is None) and (market is not None)):
        symbol = market['symbol']
    timestamp = self.safe_integer(order, 'timestamp')
    datetime = self.safe_string(order, 'datetime')
    lastTradeTimestamp = self.safe_integer(order, 'lastTradeTimestamp')
    price = self.safe_number(order, 'price')
    amount = self.safe_number(order, 'amount')
    filled = self.safe_number(order, 'filled')
    remaining = self.safe_number(order, 'remaining')
    cost = self.safe_number(order, 'cost')
    average = self.safe_number(order, 'average')
    id = self.safe_string(order, 'id')
    type = self.safe_string(order, 'type')
    side = self.safe_string(order, 'side')
    feeData = self.safe_value(order, 'fee')
    feeCost = self.safe_number(feeData, 'cost')
    feeRate = self.safe_number(feeData, 'rate')
    feeCode = self.safe_string(feeData, 'code')
    feeCurrency = self.safe_currency_code(feeCode)
    fee = {'currency': feeCurrency, 'cost': feeCost, 'rate': feeRate}
    return {'info': order, 'id': id, 'clientOrderId': None, 'timestamp': timestamp, 'datetime': datetime, 'lastTradeTimestamp': lastTradeTimestamp, 'symbol': symbol, 'type': type, 'timeInForce': None, 'postOnly': None, 'side': side, 'price': price, 'stopPrice': None, 'amount': amount, 'cost': cost, 'average': average, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': None}
def parse_order(self, order, market=None):
    status = self.safe_string(order, 'status')
    symbol = None
    marketId = self.safe_string(order, 'symbol')
    if (marketId in self.markets_by_id):
        market = self.markets_by_id[marketId]
    else:
        baseId = self.safe_string(order, 'base')
        quoteId = self.safe_string(order, 'quote')
        if ((baseId is not None) and (quoteId is not None)):
            base = self.safe_currency_code(baseId)
            quote = self.safe_currency_code(quoteId)
            symbol = ((base + '/') + quote)
    if ((symbol is None) and (market is not None)):
        symbol = market['symbol']
    timestamp = self.safe_integer(order, 'timestamp')
    datetime = self.safe_string(order, 'datetime')
    lastTradeTimestamp = self.safe_integer(order, 'lastTradeTimestamp')
    price = self.safe_number(order, 'price')
    amount = self.safe_number(order, 'amount')
    filled = self.safe_number(order, 'filled')
    remaining = self.safe_number(order, 'remaining')
    cost = self.safe_number(order, 'cost')
    average = self.safe_number(order, 'average')
    id = self.safe_string(order, 'id')
    type = self.safe_string(order, 'type')
    side = self.safe_string(order, 'side')
    feeData = self.safe_value(order, 'fee')
    feeCost = self.safe_number(feeData, 'cost')
    feeRate = self.safe_number(feeData, 'rate')
    feeCode = self.safe_string(feeData, 'code')
    feeCurrency = self.safe_currency_code(feeCode)
    fee = {'currency': feeCurrency, 'cost': feeCost, 'rate': feeRate}
    return {'info': order, 'id': id, 'clientOrderId': None, 'timestamp': timestamp, 'datetime': datetime, 'lastTradeTimestamp': lastTradeTimestamp, 'symbol': symbol, 'type': type, 'timeInForce': None, 'postOnly': None, 'side': side, 'price': price, 'stopPrice': None, 'amount': amount, 'cost': cost, 'average': average, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': None}