Oil price API: currency rates
Currency ratesUnits of a currency per US dollar, day by day.
PlansEvery plan
Cost1 call per request
ReturnsUp to 5,000 days
UpdatedDaily
What it is for
Units of a currency per US dollar, day by day: the rates behind every conversion in the API.
Without from you get the latest days, as many as limit.
Good for
- Converting prices yourself
- Showing a rate next to a price
- Checking a conversion the API made
convertParameters 4 in the query
| Name | Where and type | Required | What it does | Example |
|---|---|---|---|---|
currency | query ISO 4217 | required | Convert every price to this currency on its own day, such as usd. | eur |
from | query date | optional | First date, YYYY-MM-DD. | 2024-01-01 |
to | query date | optional | Last date, YYYY-MM-DD. | 2024-12-31 |
limit | query integer | default 30 | Most recent days when no from is given. Up to 5,000. | 3 |
Try it runs against the live API with your key
No key yet? Get a free one; it is saved in this browser for every page.
The answer 200, application/json
| Field | Type | What it holds | Example |
|---|---|---|---|
currency | string | Three letter currency code | "EUR" |
values | array | The points, oldest first | {"date":"2026-10-27","per_usd":0.8968... |
Example answer real, from what we hold now; long lists cut to three
GET /v1/fx?currency=eur&limit=3{ "data": { "currency": "EUR", "interval": "day", "values": [ { "date": "2026-10-27", "per_usd": 0.89686098654709 }, { "date": "2026-10-28", "per_usd": 0.89823048594269 }, { "date": "2026-10-29", "per_usd": 0.8984725965858 } ] }, "meta": { "count": 3 } }
Errors every error has the same shape
| HTTP | Code | When | What to do |
|---|---|---|---|
| 401 | unauthorized | No key, or not a valid one | Send your key in the X-API-Key header; your account page shows it. |
| 400 | bad_request | A value is wrong or a required one is missing | The message names the parameter and the form it takes. |
| 422 | unknown_parameter | A parameter this endpoint does not take | Take it out; the parameters this endpoint takes are listed above. |
| 429 | rate_limited | Too many calls this minute | Wait the seconds in the Retry-After header, then call again. |
| 429 | quota_exceeded | Today's calls are used up | Wait for the day to reset at midnight UTC, or move to a larger plan. |
Dates and times are UTC. A point's date is the day its price took effect, or the first day of its week or month for weekly and monthly series. Conversions use each day's own rate, so a converted series moves with both the price and the exchange rate.
Related
List benchmarksCrude and product benchmarks with their latest price.GET /v1/benchmarksBenchmark historyOne benchmark day by day, or averaged by week, month or year.GET /v1/benchmarks/{benchmark}Compare countries in dollarsPut any countries side by side in US dollars a litre, each at its own day's rate.Recipe