Skip to content

how to import one exchange esm

github-actions[bot] edited this page Jun 11, 2026 · 2 revisions
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();

Clone this wiki locally