npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

live-currency-rates

v1.1.1

Published

Convert currencies with live exchange rates. Fluent API: Convert(100).from('USD').to('EUR'). Multiple providers (free, no key by default) — Frankfurter, fawazahmed0, AllRatesToday. Zero dependencies.

Readme

live-currency-rates

Convert currencies with live exchange rates. Simple, fluent API. Multiple providers — use a free one (no key) or bring your own.

npm zero dependencies TypeScript License

Install

npm install live-currency-rates

Quick Start (no key)

import { Convert } from 'live-currency-rates';

const result = await Convert(100).from('USD').to('EUR');
console.log(result.amount); // 92.45

By default, the package uses the free Frankfurter provider (ECB data) — no signup, no API key.

Providers

Pick a provider based on your needs:

| Provider | Key? | Currencies | Source | Notes | | ------------- | ----- | ---------- | ------------------------- | ----------------------------- | | frankfurter | no | ~30 | European Central Bank | Default. Daily updates. | | fawaz | no | 200+ | fawazahmed0/currency-api | Includes crypto. CDN-hosted. | | allrates | yes | 160+ | AllRatesToday (Reuters) | Real-time mid-market rates. |

Choose a provider with setup():

import { setup, Convert } from 'live-currency-rates';

// Free, no key — 200+ currencies including crypto
setup({ provider: 'fawaz' });

// AllRatesToday — get a free key at https://allratestoday.com/register
setup({ apiKey: 'art_live_...' });

API

Convert(amount).from('XXX').to('YYY')

const result = await Convert(250).from('GBP').to('JPY');
console.log(`250 GBP = ${result.amount} JPY`);
console.log(`Rate: ${result.rate}`);

Returns: { amount, rate, from, to, originalAmount }

Rate('XXX').to('YYY')

import { Rate } from 'live-currency-rates';

const { rate } = await Rate('USD').to('EUR');
console.log(`1 USD = ${rate} EUR`);

Rates('XXX', ['YYY', 'ZZZ'])

import { Rates } from 'live-currency-rates';

const rates = await Rates('USD', ['EUR', 'GBP', 'JPY']);
// { EUR: 0.92, GBP: 0.78, JPY: 149.5 }

Omit the target list to get all available rates for the base currency.

Symbols()

import { Symbols } from 'live-currency-rates';

const symbols = await Symbols();
// { USD: 'United States Dollar', EUR: 'Euro', ... }

setup(config)

setup({
  provider: 'frankfurter' | 'fawaz' | 'allrates',
  apiKey: 'art_live_...',   // only for provider: 'allrates'
  baseUrl: '...',           // optional override
  timeout: 10000,           // ms, default 10000
});

CommonJS

const { Convert } = require('live-currency-rates');

Convert(100).from('USD').to('EUR').then(r => console.log(r.amount));

License

MIT