FX markets API
Intraday FX prices
Retrieve a point-in-time history of central-bank FX reference prices. Many observations are local-market end-of-day fixings, so you can use the rate published at the relevant close instead of one generic daily rate.
Reference price
Official published FX rate
Point in time
Published reference time in UTC
Best for
Valuation, reporting, charts, and research
Professional subscriber feature. An active subscription and API key are required for every intraday FX price request. View plans.
Endpoint
Use an inclusive UTC timestamp window. With no window parameters, the endpoint returns the most recent 24 hours.
GET https://api.fxmacrodata.com/fx/fixing-timeline/{base}/{quote}
curl "https://api.fxmacrodata.com/fx/fixing-timeline/eur/usd?start_time=2026-07-13T00%3A00%3A00Z&end_time=2026-07-14T00%3A00%3A00Z&api_key=YOUR_API_KEY"
| Parameter | Required | Use |
|---|---|---|
| base | Yes | Base currency in the path, for example eur. |
| quote | Yes | Quote currency in the path, for example usd. |
| start_time | No | Inclusive RFC 3339 UTC start of the chart window. |
| end_time | No | Inclusive RFC 3339 UTC end of the chart window. Defaults to the current time. |
| api_key | Yes | Active Professional subscriber API key. A server-side client can instead use the X-API-Key header. |
Python example
import requests
response = requests.get(
"https://api.fxmacrodata.com/fx/fixing-timeline/eur/usd",
params={
"start_time": "2026-07-13T00:00:00Z",
"end_time": "2026-07-14T00:00:00Z",
"api_key": "YOUR_API_KEY",
},
timeout=30,
)
response.raise_for_status()
for point in response.json()["data"]:
print(point["timestamp"], point["price"])
Chart-ready response
The response keeps its chart data in one small array. Map timestamp to the x-axis and price to the y-axis without additional field selection.
{
"pair": "EUR/USD",
"start_time": "2026-07-13T00:00:00Z",
"end_time": "2026-07-14T00:00:00Z",
"data": [
{"timestamp": "2026-07-13T12:30:00Z", "price": 1.1424},
{"timestamp": "2026-07-13T13:10:00Z", "price": 1.1427}
]
}
Response fields
| Field | Meaning |
|---|---|
| pair | The requested currency pair. |
| start_time | The inclusive UTC start of the returned window. |
| end_time | The inclusive UTC end of the returned window. |
| data | Chronologically ordered price points for the requested window. |
| timestamp | The UTC time for the price point. |
| price | The exchange rate for the requested pair. |
Window behavior and availability
- Without time parameters, the response covers the most recent 24 hours.
- With an explicit UTC window, the response contains every available stored point within that inclusive period.
- Business days, holidays, pair availability, and publication timing affect the number of records.
- An empty
dataarray means no point is available in that window. Do not fill missing periods by carrying a prior value forward.
Response handling
- Price points are returned in ascending timestamp order.
- Keep timestamps in UTC until display time; convert only in the presentation layer when a local zone is needed.
- A malformed or reversed time window returns HTTP 422.
- A missing or invalid Professional key returns HTTP 401 for protected pairs.
When to use intraday prices
Charts and dashboards
Draw a time-ordered price line without parsing metadata or reshaping rows.
Research and reporting
Compare price observations around macro events, policy decisions, and other defined UTC windows.
Historical comparisons
Request a prior window to build repeatable chart views, reports, or event-study inputs.
Use the intraday FX prices coverage page for an overview of currencies, pair availability, point density, and endpoint selection.
How it differs from session rates
Central-bank reference prices can be published on different local-market timetables. The intraday timeline returns every available point in the requested window, while the session-rate endpoint reports one rate for a selected Sydney, Tokyo, London, or New York session close.
Use this endpoint when you need the official reference price at a point in time, including local-market end-of-day fixings where available. It is not a live executable FX, bid, or ask feed.