---
title: "Free Forex API: Data APIs vs Trading APIs and What Free Actually Gets You"
description: "A free forex API can mean an FX rate data API or a broker trading API. What each returns, which one your project needs, and what free plans limit."
canonical: https://allratestoday.com/blog/forex-data-api-vs-forex-trading-api/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-11-11T15:23:38.722Z
---

Search for a **free forex API** and you get two kinds of product mixed together. One kind gives you exchange rates: a number per currency pair, refreshed on a schedule. The other kind is a broker's trading interface: live bid and ask prices, orders, positions and a demo account. Both are called "forex APIs". They solve different problems, and picking the wrong one costs you a rewrite.

This guide explains what each one returns, which one you need, and what "free" usually means in each category.

## Two products under one name

|  | Forex data API | Forex trading API |
| --- | --- | --- |
| Who runs it | A data provider, or a central bank | A broker |
| What you get | Rates per currency pair with a timestamp | Bid/ask quotes, orders, fills, positions, balances |
| Rate type | Mid-market, or an official reference rate | The broker's own dealing prices |
| Delivery | REST, usually JSON or CSV | REST for orders, streaming for prices |
| Account needed | An API key | A broker account (live or demo) |
| Typical use | Pricing, conversion, reporting, accounting | Algorithmic trading, trading apps |

The short version: if your code shows prices or converts amounts, you need a data API. If your code buys and sells currency, you need a trading API.

## What a forex data API returns

A data API answers "what is one unit of currency A worth in currency B, right now or on a given date". The answer is a single rate and a time. A typical call:

```
curl "https://allratestoday.com/api/v1/rates?source=USD&target=EUR,GBP,JPY" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
[
  {"rate":0.9215,"source":"USD","target":"EUR","time":"2026-04-03T12:00:00Z"},
  {"rate":0.7893,"source":"USD","target":"GBP","time":"2026-04-03T12:00:00Z"},
  {"rate":153.47,"source":"USD","target":"JPY","time":"2026-04-03T12:00:00Z"}
]
```

There is no spread, no order book and no account balance. The rate is a mid-market figure: halfway between buying and selling prices in the market. That is the right number to show a price, convert a cart, or report a value. It is not a price anyone will trade with you at.

Data APIs differ mainly in four things:

- **Update frequency.** Daily, hourly, or every minute. Some free plans update once a day.
- **Coverage.** How many currencies, and whether exotic pairs are included.
- **History.** Whether you can get past dates, and how far back.
- **Source.** Whether the rate is a market mid rate or an official rate from a central bank or tax authority. Official rates matter for invoices, VAT, customs and audits, because rules name the institution whose rate you must use. See the [central bank rates API](https://allratestoday.com/central-bank-rates-api/) for how that works.

## What a forex trading API returns

A trading API is the programmatic side of a brokerage account. Brokers such as OANDA and Interactive Brokers offer them. The details differ by broker, but the shape is similar:

- **Streaming prices.** A long-lived HTTP stream or socket that pushes a new bid and ask every time the broker's price for an instrument changes.
- **Orders.** Endpoints to place market, limit and stop orders, and to modify or cancel them.
- **Account state.** Positions, open trades, margin, balance and transaction history.
- **Demo accounts.** Most retail brokers let you open a practice account with simulated money, and the same API works against it.

The prices are the broker's, for the instruments it offers. They include its spread. Two brokers can quote different prices for the same pair at the same moment, and neither is "the" exchange rate.

Trading APIs also come with obligations that data APIs do not: an account with identity checks for live trading, the broker's terms on how quote data may be used, and in some regions restrictions on retail forex trading itself.

## Which one do you need?

Answer one question: will your code place trades?

**You need a data API if you are:**

- Showing prices in several currencies on a shop or a SaaS pricing page.
- Converting amounts in an invoice, an expense tool or a travel app.
- Building a dashboard or report with values in one reporting currency.
- Applying the rate a tax or accounting rule names, such as a central bank's daily rate.

**You need a trading API if you are:**

- Running an automated trading strategy.
- Building a trading app on top of a broker account.
- Backtesting against a specific broker's prices and then going live with it.

Some projects need both. A trading app can use the broker stream for live quotes and a data API for portfolio reporting in the user's home currency, or for official rates in tax reports.

A common mistake is to use a broker demo account as a free rate feed for a website. It works until it does not: demo access can be reset or withdrawn, the terms usually restrict use of the data outside the platform, and you are pricing products with one broker's dealing prices instead of a mid-market rate.

## What a free forex API usually limits

"Free" means different things in the two categories.

**Free data APIs** limit volume and freshness. At the time of writing:

| Provider | Free allowance | Update frequency on free | Notes |
| --- | --- | --- | --- |
| ExchangeRate-API | 1,500 requests/month | Daily | Terms describe the rates as for informational or illustrative purposes |
| Open Exchange Rates | 1,000 requests/month | Hourly | USD base only |
| Fixer | 100 requests/month | Hourly | Non-commercial; base switching on paid plans |
| currencylayer | 100 requests/month | Daily | Non-commercial |
| Frankfurter | No quota | Daily, per source | Open source, no key, central bank sources |

The usual limits to check are:

- **Monthly request quota.** Easy to burn if every page view triggers a call. Cache on your server.
- **Update frequency.** A daily rate can be more than 24 hours old by the time you use it.
- **Base currency.** Some free plans fix the base to USD, so you compute cross rates yourself.
- **History.** Often paid only.
- **Commercial use.** Several free plans exclude it.
- **HTTPS, formats and support.** Older free tiers restricted some of these.

**Free trading APIs** are usually free in a different way. The demo account costs nothing, and the API is the same as for live trading. The limits are rate limits on calls, the number of instruments you can stream at once, and the fact that the money is not real. Live use means funding an account and paying the broker's spreads and fees.

For a side-by-side of the data APIs, see the [free currency API comparison](https://allratestoday.com/blog/best-free-currency-exchange-api-2026/).

## Where AllRatesToday fits

AllRatesToday is a data API, not a broker. It does not take orders and does not stream bid and ask prices. It serves:

- **Mid-market rates** for 160+ currencies, refreshed every 60 seconds on every plan, including Free.
- **Official rates** from [123 central banks and 6 tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/), each with the institution's own rate date.
- **REST over HTTPS** only, with JSON, and CSV, XML or XLSX on table endpoints.

The free plan is for personal projects, testing and prototypes. It includes the latest rates and central bank latest tables, at 10 requests per minute. History and commercial use start on the Small plan at €4.99 a month. Details are on the [pricing page](https://allratestoday.com/pricing/).

In Node, one call covers several pairs and counts as one request:

```
const res = await fetch(
  "https://allratestoday.com/api/v1/rates?source=USD&target=EUR,GBP,JPY,CAD",
  { headers: { Authorization: `Bearer ${process.env.ALLRATES_API_KEY}` } }
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const rows = await res.json();            // always an array
const eur = rows.find(r => r.target === "EUR").rate;
```

Note the array. Reading `res.rate` instead of `rows[0].rate` is the most common bug with this endpoint.

## A checklist before you pick

1. Write down whether you need to trade or only to price and convert.
2. Decide how fresh the rate must be: daily, hourly or every minute.
3. Check whether a rule names a specific official rate for your use case.
4. Count your real request volume after server-side caching.
5. Read the free plan's terms for commercial use.
6. Check what happens when you go over: errors, overage fees, or a forced upgrade.

If you need to trade, start with your broker's demo account and its API docs. If you need rates, start with a data API and a cache. The [guide to choosing an exchange rate API](https://allratestoday.com/blog/how-to-choose-exchange-rate-api/) goes through the data side in more detail.

## FAQ

### Is there a free forex API?

Yes, in both categories. Rate data APIs usually have a free plan with a request allowance and slower updates. Broker trading APIs usually let you use a demo or practice account for free, with simulated money and the broker's own prices.

### What is the difference between a forex data API and a forex trading API?

A data API returns exchange rates: a mid-market or official rate per currency pair, with a timestamp. A trading API is the interface to a broker account: it streams that broker's bid and ask prices and lets you place, change and cancel orders.

### Can I use a broker demo account to price my products?

It is a poor fit. Demo prices are the broker's dealing prices for its own instruments, demo terms usually restrict other uses, and the account exists to test trading, not to feed a storefront or invoices.

### Do I need WebSocket streaming for currency conversion?

No. Prices in a shop, an invoice or a dashboard do not change between ticks. A REST call every minute or every few minutes, cached on your server, is enough. Streaming matters when you are trading.

### Does a free forex API allow commercial use?

Often not. Several free plans are for personal or non-commercial use only. Read the terms before you put the rates in a product that earns money.

## Forex rate data over plain REST

Mid-market rates for 160+ currencies refreshed every 60 seconds, plus official rates from [123 central banks and 6 tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/). Start with a free API key.

 [Get a free API key](https://allratestoday.com/register)

## Related Articles

- [Free currency API comparison for 2026](https://allratestoday.com/blog/best-free-currency-exchange-api-2026/)
- [Best real-time forex APIs](https://allratestoday.com/blog/best-realtime-forex-api-2026/)
- [Free vs paid exchange rate APIs](https://allratestoday.com/blog/free-vs-paid-exchange-rate-apis/)
- [Mid-market vs retail exchange rates](https://allratestoday.com/blog/mid-market-vs-retail-exchange-rates/)
- [How often are exchange rates updated](https://allratestoday.com/blog/how-often-are-exchange-rates-updated/)
- [Forex API](https://allratestoday.com/forex-api/)
