Free Forex API: Data APIs vs Trading APIs and What Free Actually Gets You

Reviewed by Madhushan, Fintech Developer — November 2026

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 APIForex trading API
Who runs itA data provider, or a central bankA broker
What you getRates per currency pair with a timestampBid/ask quotes, orders, fills, positions, balances
Rate typeMid-market, or an official reference rateThe broker's own dealing prices
DeliveryREST, usually JSON or CSVREST for orders, streaming for prices
Account neededAn API keyA broker account (live or demo)
Typical usePricing, conversion, reporting, accountingAlgorithmic 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:

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:

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:

You need a trading API if you are:

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:

ProviderFree allowanceUpdate frequency on freeNotes
ExchangeRate-API1,500 requests/monthDailyTerms describe the rates as for informational or illustrative purposes
Open Exchange Rates1,000 requests/monthHourlyUSD base only
Fixer100 requests/monthHourlyNon-commercial; base switching on paid plans
currencylayer100 requests/monthDailyNon-commercial
FrankfurterNo quotaDaily, per sourceOpen source, no key, central bank sources

The usual limits to check are:

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.

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:

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.

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 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. Start with a free API key.

Get a free API key

Related Articles