Files
ritmex-bot/docs/ccxt/wiki/examples/js/fetch-from-many-exchanges-simultaneously.md
T
2025-10-03 15:28:16 +08:00

514 B



import ccxt from '../../js/ccxt.js';
import log from 'ololog';

const symbol = 'ETH/BTC'
const exchanges = [ 'coinbasepro', 'hitbtc2', 'poloniex' ]

;(async () => {

   const result = await Promise.all (exchanges.map (async id => {

       const exchange = new ccxt[id] ()
       const ticker = await exchange.fetchTicker (symbol)
       return exchange.extend ({ 'exchange': id }, ticker)

   }))

   log (result);

}) ()