def parse_order(self, order, market=None):
    multiplier = 100000000
    side = ('buy' if (order['orderSide'] == 'Bid') else 'sell')
    type = ('limit' if (order['ordertype'] == 'Limit') else 'market')
    timestamp = self.safe_integer(order, 'creationTime')
    if (market is None):
        market = self.market(((order['instrument'] + '/') + order['currency']))
    status = 'open'
    if ((order['status'] == 'Failed') or (order['status'] == 'Cancelled') or (order['status'] == 'Partially Cancelled') or (order['status'] == 'Error')):
        status = 'canceled'
    elif ((order['status'] == 'Fully Matched') or (order['status'] == 'Partially Matched')):
        status = 'closed'
    price = (self.safe_float(order, 'price') / multiplier)
    amount = (self.safe_float(order, 'volume') / multiplier)
    remaining = (self.safe_float(order, 'openVolume', 0.0) / multiplier)
    filled = (amount - remaining)
    trades = self.parse_my_trades(order['trades'], market)
    numTrades = len(trades)
    cost = (filled * price)
    average = None
    lastTradeTimestamp = None
    if (numTrades > 0):
        cost = 0
        for i in range(0, numTrades):
            trade = trades[i]
            cost = self.sum(cost, trade[i]['cost'])
        if (filled > 0):
            average = (cost / filled)
        lastTradeTimestamp = trades[(numTrades - 1)]['timestamp']
    id = self.safe_string(order, 'id')
    return {'info': order, 'id': id, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'lastTradeTimestamp': lastTradeTimestamp, 'symbol': market['symbol'], 'type': type, 'side': side, 'price': price, 'cost': cost, 'amount': amount, 'filled': filled, 'remaining': remaining, 'average': average, 'status': status, 'trades': trades, 'fee': None}
def parse_order(self, order, market=None):
    multiplier = 100000000
    side = ('buy' if (order['orderSide'] == 'Bid') else 'sell')
    type = ('limit' if (order['ordertype'] == 'Limit') else 'market')
    timestamp = self.safe_integer(order, 'creationTime')
    if (market is None):
        market = self.market(((order['instrument'] + '/') + order['currency']))
    status = 'open'
    if ((order['status'] == 'Failed') or (order['status'] == 'Cancelled') or (order['status'] == 'Partially Cancelled') or (order['status'] == 'Error')):
        status = 'canceled'
    elif ((order['status'] == 'Fully Matched') or (order['status'] == 'Partially Matched')):
        status = 'closed'
    price = (self.safe_float(order, 'price') / multiplier)
    amount = (self.safe_float(order, 'volume') / multiplier)
    remaining = (self.safe_float(order, 'openVolume', 0.0) / multiplier)
    filled = (amount - remaining)
    trades = self.parse_my_trades(order['trades'], market)
    numTrades = len(trades)
    cost = (filled * price)
    average = None
    lastTradeTimestamp = None
    if (numTrades > 0):
        cost = 0
        for i in range(0, numTrades):
            trade = trades[i]
            cost = self.sum(cost, trade[i]['cost'])
        if (filled > 0):
            average = (cost / filled)
        lastTradeTimestamp = trades[(numTrades - 1)]['timestamp']
    id = self.safe_string(order, 'id')
    return {'info': order, 'id': id, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'lastTradeTimestamp': lastTradeTimestamp, 'symbol': market['symbol'], 'type': type, 'side': side, 'price': price, 'cost': cost, 'amount': amount, 'filled': filled, 'remaining': remaining, 'average': average, 'status': status, 'trades': trades, 'fee': None}