def parse_order_book(self, orderbook, timestamp=None, bids_key='bids', asks_key='asks', price_key=0, amount_key=1):
    return {'bids': self.sort_by((self.parse_bids_asks(orderbook[bids_key], price_key, amount_key) if ((bids_key in orderbook) and isinstance(orderbook[bids_key], list)) else []), 0, True), 'asks': self.sort_by((self.parse_bids_asks(orderbook[asks_key], price_key, amount_key) if ((asks_key in orderbook) and isinstance(orderbook[asks_key], list)) else []), 0), 'timestamp': timestamp, 'datetime': (self.iso8601(timestamp) if (timestamp is not None) else None), 'nonce': None}
def parse_order_book(self, orderbook, timestamp=None, bids_key='bids', asks_key='asks', price_key=0, amount_key=1):
    return {'bids': self.sort_by((self.parse_bids_asks(orderbook[bids_key], price_key, amount_key) if ((bids_key in orderbook) and isinstance(orderbook[bids_key], list)) else []), 0, True), 'asks': self.sort_by((self.parse_bids_asks(orderbook[asks_key], price_key, amount_key) if ((asks_key in orderbook) and isinstance(orderbook[asks_key], list)) else []), 0), 'timestamp': timestamp, 'datetime': (self.iso8601(timestamp) if (timestamp is not None) else None), 'nonce': None}