---
title: "money.js Exchange Rates: Load Live Rates into fx() Free"
description: "money.js (npm \"money\") converts currencies but ships no rates. Load them free with no key from the ECB table, or real-time for 160+ currencies, using money-rates: the same fx(100).from('USD').to('GBP') API with fx.load() built in."
canonical: https://allratestoday.com/migrate/money-js/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-10-27T16:45:54.504Z
---

# money.js Exchange Rates: Load Live Rates into fx() Free

money.js (npm "money") converts currencies but ships no rates. Load them free with no key from the ECB table, or real-time for 160+ currencies, using money-rates: the same fx(100).from('USD').to('GBP') API with fx.load() built in.

By [Madhushan](https://allratestoday.com/authors/madhushan/), Founder & Lead Developer · Updated 27 Oct 2026

# Exchange rates for money.js, with no app ID

money.js (`npm install money`) is the most installed currency conversion library on npm, with about 80,000 downloads a month. It does the arithmetic, `fx(100).from('USD').to('GBP')`, but it ships no rates: every project has to fetch a feed and copy it into `fx.rates` by hand, usually from a service that needs an app ID. The last release was 0.2.0, in 2014.

  **money-rates is money.js with the rates built in.** Same API, plus `fx.load()`. No key for the ECB table; a free key for real-time rates in 160+ currencies.

## Before and after

Before, with money.js:

```
const fx = require('money');

// money.js has no rates of its own: you fetch a feed and copy it in by hand
const data = await fetch('https://openexchangerates.org/api/latest.json?app_id=YOUR_APP_ID').then(r => r.json());
fx.base = data.base;
fx.rates = data.rates;

fx(100).from('USD').to('GBP');
```

After, with [money-rates](https://www.npmjs.com/package/money-rates):

```
const fx = require('money-rates');   // npm install money-rates

await fx.load();                      // keyless ECB rates, base USD
fx(100).from('USD').to('GBP');        // same API as money.js
```

## Keep money.js, swap only the rates

If money.js is used all over a codebase, leave it alone and fill its rates:

```
const money = require('money');
const { loadInto } = require('money-rates');

await loadInto(money);                // fills money.base and money.rates
money(100).from('USD').to('EUR');
```

## Real-time rates for 160+ currencies

The keyless table is the European Central Bank's, about 30 currencies, updated once per business day. For live mid-market rates, pass a [free API key](https://allratestoday.com/register):

```
await fx.load({ apiKey: process.env.ALLRATESTODAY_API_KEY });
fx(100).from('USD').to('NGN');        // 160+ currencies, refreshed every 60 seconds
```

## Without any package

The keyless endpoint returns `base_code` and `rates` in a shape money.js accepts directly:

```
const r = await fetch('https://allratestoday.com/api/open/latest/USD').then(x => x.json());
fx.base = r.base_code;
fx.rates = r.rates;
```

## What is the same, what is new

| Feature | money.js | money-rates |
| --- | --- | --- |
| `fx(v).from(a).to(b)`, `fx.convert`, arrays | Yes | Yes, same results |
| `fx.rates`, `fx.base`, `fx.settings` | Yes | Yes |
| Cross rates through the base | Yes | Yes, same formula |
| Rates included | No | `fx.load()`: ECB keyless, or live with a key |
| TypeScript types, ESM | No | Yes |
| accounting.js formatting helpers | Optional | No; use `Intl.NumberFormat` |
| Last release | 2014 | 2026 |

## Attribution

Keyless rates are free for any use, commercial included. Where the rates are shown, add a visible link: `<a href="https://allratestoday.com">Exchange rates by AllRatesToday</a>`. `fx.attributionHtml` holds that snippet. Details in the [attribution terms](https://allratestoday.com/open-api/#attribution).

## Frequently asked questions

### Does money.js include exchange rates?

No. money.js (the npm package "money") only does the arithmetic. You set fx.base and fx.rates yourself, usually from an Open Exchange Rates feed that needs an app ID. Its last release was 0.2.0 in 2014.

### Is money-rates a drop-in replacement for money.js?

Yes for the conversion API: fx(value).from().to(), fx.convert(value, {from, to}) with numbers or arrays, fx.rates, fx.base and fx.settings behave the same, cross rates included. It adds fx.load() and fx.loadInto(money) to fetch rates. The accounting.js formatting helpers are not included.

### Are the rates free?

Without a key, fx.load() uses the European Central Bank reference table (about 30 currencies, any base, updated each business day), free for any use including commercial, with a visible link to allratestoday.com where the rates are shown. A free key adds real-time mid-market rates for 160+ currencies.

### Can I keep using money.js?

Yes. Call loadInto(require('money')) from money-rates and it fills money.base and money.rates; the rest of your code is unchanged.

## Install it

`npm install money-rates`, then `await fx.load()`.

 [money-rates on npm](https://www.npmjs.com/package/money-rates) [Get a free API key](https://allratestoday.com/register)

## Related

  [Migration guidesEvery dead free API, one line each](https://allratestoday.com/migrate/) [Open APIKeyless rates and attribution terms](https://allratestoday.com/open-api/) [Open Exchange Rates alternativeFeature and price comparison](https://allratestoday.com/compare/openexchangerates-alternative/) [Exchange rate APIReal-time rates, 160+ currencies](https://allratestoday.com/exchange-rate-api/)
