Get Exchange Rate

After establishing a connection, you can easily fetch the BSV exchange rate in USD.

Rates are cached for 5 minutes

const wallet = initProvider(); // see "Detecting the Provider"
try {
    const rate = await wallet.getExchangeRate();
    console.log(rate);
    // 55.21
} catch (err) {
    console.log(err);
}

Last updated