def fetch_order_book(self, symbol, limit=None, params={}):
    self.load_markets()
    market = self.market(symbol)
    method = (market['type'] + 'GetInstrumentsInstrumentId')
    method += ('Depth' if (market['type'] == 'swap') else 'Book')
    request = {'instrument_id': market['id']}
    if (limit is not None):
        request['size'] = limit
    response = getattr(self, method)(self.extend(request, params))
    timestamp = self.parse8601(self.safe_string(response, 'timestamp'))
    return self.parse_order_book(response, timestamp)
def fetch_order_book(self, symbol, limit=None, params={}):
    self.load_markets()
    market = self.market(symbol)
    method = (market['type'] + 'GetInstrumentsInstrumentId')
    method += ('Depth' if (market['type'] == 'swap') else 'Book')
    request = {'instrument_id': market['id']}
    if (limit is not None):
        request['size'] = limit
    response = getattr(self, method)(self.extend(request, params))
    timestamp = self.parse8601(self.safe_string(response, 'timestamp'))
    return self.parse_order_book(response, timestamp)