FX reference rates
Daily and historical USD exchange rates per unit of base currency.
/api/v1/fx/ratesAPI key1 credit per request Use a key with access to this operation.
Parameters
base_currencystringComma-separated 3-letter currency codes (e.g. GBP,EUR,JPY)
latest_onlybooleanReturn only the most recent rate per currency
Optional parameters (6)
startstringFirst date to include, as an ISO date (YYYY-MM-DD).
endstringLast date to include, as an ISO date (YYYY-MM-DD).
limitinteger, 1 to 10,000Maximum number of rows to return.
cursorstringOpaque continuation. Pass it unchanged with the original filters and snapshot_id.
snapshot_idstringPin the request to one immutable snapshot so a read across several pages stays consistent.
formatjson | csvReturn a JSON page or UTF-8 CSV rows.
Response
Each row has these fields. Rows arrive in data, next to schema_version, snapshot_id, total_count, next_cursor, provenance.
datestringThe trading day or observation date, YYYY-MM-DD.
base_currencystringThe currency being priced.
quote_currencystringThe currency prices are quoted in. London listings quote in pence, shown as GBp.
usd_per_unitnumberHow many US dollars one unit of the base currency buys.
Research questions
How many US dollars did one euro, pound or yen buy?
GET https://api.quantset.dev/api/v1/fx/rates?base_currency=EUR,GBP,JPY&latest_only=trueRead base_currency and usd_per_unit for each returned date. Multiply an amount in base currency by that rate to obtain USD.
Which exchange rate should I apply to a yen-denominated observation?
GET https://api.quantset.dev/api/v1/fx/rates?base_currency=JPY&start=2024-06-03&end=2024-06-07Join the financial observation to the intended rate date and multiply yen by usd_per_unit. State the date used if no same-day rate exists.
Reading the results
If one euro equals 1.10 USD, EUR 100 converts to USD 110. Divide by that same rate for the reverse direction.
Coverage and limits
Only observed currency/date pairs are available. For a historical valuation, use a rate available for the intended date and retain its actual observation date.
Related guides
CSV, spreadsheets and agents
The same rows as a spreadsheet-ready table. Add format=csv to the request.
curl "https://api.quantset.dev/api/v1/fx/rates?base_currency=EUR,GBP,JPY&latest_only=true&format=csv" -H "X-API-Key: YOUR_API_KEY"
Or pull it straight into Google Sheets with one formula. Excel and larger pulls
=IMPORTDATA("https://api.quantset.dev/api/v1/fx/rates?base_currency=EUR,GBP,JPY&latest_only=true&format=csv&apikey=YOUR_API_KEY")AI agents call this endpoint over HTTP, or read its Markdown version. Connect Claude, ChatGPT, Cursor or your own agent
Errors
| Status | Code | What to do |
|---|---|---|
| 400 | conflicting_credentials | Supply one credential. |
| 401 | invalid_credentials | Supply a valid API key. |
| 402 | insufficient_credits | Reduce the request ceiling or refill your credits. |
| 403 | insufficient_access | Your key does not have the required access. |
| 409 | snapshot_changed | Start the read again with the current snapshot. |
| 413 | export_too_large | Reduce the page size before requesting CSV again. |
| 422 | invalid_parameter | Correct the named parameter and retry. |
| 429 | rate_limited | Wait for Retry-After seconds. |
| 500 | internal_error | The request could not be completed. |
| 503 | temporarily_unavailable | Retry safe reads after a short delay. |
Questions
- What does FX reference rates cost?
- 1 credit for each successful request. A request that fails costs nothing.
- Which plan includes it?
- Every account. Free credits, credit packs and subscriptions all read this data.
- How do I read more than one page?
- When next_cursor is not null, send it back as cursor together with the same snapshot_id, and repeat until it is null.
- Can I get it as CSV or in a spreadsheet?
- Yes. Add format=csv to the request. In Google Sheets, put that URL inside IMPORTDATA with a data-only key in apikey.
- Can an AI agent use this?
- Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.
- What does null mean in the response?
- The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.
More in macro and fx
GET /api/v1/treasuryH.15 Treasury curve, real yields & spreadsGET /api/v1/macro/treasury-yieldsUS inflation pack (CPI, Core CPI, PCE, PPI & breakevens)GET /api/v1/macro/inflationUS labor market pack (Payrolls, Unemployment, JOLTS & Claims)GET /api/v1/macro/laborUS GDP, corporate profits & activity packGET /api/v1/macro/gdpGlobal central bank policy rates (10 central banks)GET /api/v1/macro/central-bank-ratesList macro seriesGET /api/v1/macro/seriesEconomic indicatorsGET /api/v1/macro/indicators