Menu

Historical Exchange Rate API: A Rate on a Date, a Daily Range, and Official Central Bank History
📰

Historical Exchange Rate API: A Rate on a Date, a Daily Range, and Official Central Bank History

DEV Community: api·Exchange Rate API·5 days ago
#1cJ1lqev
#devtoapi#devto#dev#date#allratestoday
Long article (688 words) — no AI summary yet.
Reading 0:00
15s threshold

Historical exchange rates come up in three situations:

One date. "What was USD/EUR on the invoice date, 14 March?"

A range. "Give me daily GBP/USD for the last year for a chart or a backtest."

An official series. "Revalue at the ECB (or Fed, or RBI) rate for each month-end since 2020."

AllRatesToday's API covers all three. Historical data is on the paid plans (from a few euros a month); the examples use a key from your dashboard .

1. The rate on a past date

Add time to the same endpoint you use for live rates:

curl "https://allratestoday.com/api/v1/rates?source=USD&target=EUR&time=2026-03-14" \ -H "Authorization: Bearer art_live_your_key"

Enter fullscreen mode

Exit fullscreen mode

This returns the mid-market rate at that date, in the same array shape as the live call.

2. A daily range

Use from and to for a daily series of one pair:

import requests

H = { "Authorization" : "Bearer art_live_your_key" }

r = requests .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.