MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_order_book

Method fetch_order_book

python/ccxt/bit2c.py:365–382  ·  view source on GitHub ↗

fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data https://bit2c.co.il/home/api#orderb :param str symbol: unified symbol of the market to fetch the order book for :param int [limit]: the maximum amount of order book entrie

(self, symbol: str, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

363 return self.parse_balance(response)
364
365 def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
366 """
367 fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
368
369 https://bit2c.co.il/home/api#orderb
370
371 :param str symbol: unified symbol of the market to fetch the order book for
372 :param int [limit]: the maximum amount of order book entries to return
373 :param dict [params]: extra parameters specific to the exchange API endpoint
374 :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/?id=order-book-structure>`
375 """
376 self.load_markets()
377 market = self.market(symbol)
378 request = {
379 'pair': market['id'],
380 }
381 orderbook = self.publicGetExchangesPairOrderbook(self.extend(request, params))
382 return self.parse_order_book(orderbook, symbol)
383
384 def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
385 symbol = self.safe_symbol(None, market)

Callers

nothing calls this directly

Calls 5

load_marketsMethod · 0.45
marketMethod · 0.45
extendMethod · 0.45
parse_order_bookMethod · 0.45

Tested by

no test coverage detected