Back to Ccxt

How To Import One Exchange Esm

wiki/examples/ts/how-to-import-one-exchange-esm.md

4.5.52368 B
Original Source
javascript
import { binance } from '../../js/ccxt.js';

async function example () {
   const exchange = new binance ({});
   const ob = await exchange.fetchOrderBook ('BTC/USDT', 3);
   const asks = ob['asks'];
   const bids = ob['bids'];
   console.log (asks);
   console.log (bids);
}
example ();