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

Method fetchRestOrderBookSafe

js/src/base/Exchange.js:2717–2731  ·  view source on GitHub ↗
(symbol, limit = undefined, params = {})

Source from the content-addressed store, hash-verified

2715 throw new NotSupported(this.id + ' fetchMarginModes () is not supported yet');
2716 }
2717 async fetchRestOrderBookSafe(symbol, limit = undefined, params = {}) {
2718 const fetchSnapshotMaxRetries = this.handleOption('watchOrderBook', 'maxRetries', 3);
2719 for (let i = 0; i < fetchSnapshotMaxRetries; i++) {
2720 try {
2721 const orderBook = await this.fetchOrderBook(symbol, limit, params);
2722 return orderBook;
2723 }
2724 catch (e) {
2725 if ((i + 1) === fetchSnapshotMaxRetries) {
2726 throw e;
2727 }
2728 }
2729 }
2730 return undefined;
2731 }
2732 async watchOrderBook(symbol, limit = undefined, params = {}) {
2733 throw new NotSupported(this.id + ' watchOrderBook() is not supported yet');
2734 }

Callers 5

loadOrderBookMethod · 0.95

Calls 2

handleOptionMethod · 0.95
fetchOrderBookMethod · 0.95

Tested by

no test coverage detected