<h2></h2>
<div>Last: <span></span></div>
const elTitle = document.querySelector('h2');
const elText = document.querySelector('div > span');

const PAIR = 'BTC/USDT';

const exchange = new ccxt.binance ();
const update = async () => {
  const { last } = await exchange.fetchTicker(PAIR);
  elTitle.innerText = PAIR;
  elText.innerText = last;
  
  setTimeout(update, 5000);
};

update();

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/ccxt@2.4.73/dist/ccxt.browser.js