Skip to content

GET /v1/fx/time_series

GET /v1/fx/time_series

Returns recent and historical FX rates for one or more currency pairs. The endpoint is intended for currency conversion in portfolio totals and multi-currency reports.

Request

GET /v1/fx/time_series?pair=USD/EUR HTTP/1.1
Host: api.oneapi.finance
Authorization: Bearer oa_live_<your_key>

Query parameters

ParamTypeRequiredNotes
pairstringone ofSingle pair, e.g. USD/EUR. The slash is significant.
pairsstringone ofComma-separated pairs, max 10. e.g. USD/EUR,GBP/JPY.
start_dateISO datenoInclusive lower bound.
end_dateISO datenoInclusive upper bound. Default now.
outputsizeintnoDefault 30. Cap 5,000.

Response

{
"rates": {
"USD/EUR": {
"pair": "USD/EUR",
"current": 0.9241,
"previous": 0.9215,
"history": [
{ "datetime": "2026-05-02T00:00:00Z", "open": 0.9215, "high": 0.9251, "low": 0.9202, "close": 0.9241 },
{ "datetime": "2026-05-01T00:00:00Z", "open": 0.9201, "high": 0.9226, "low": 0.9189, "close": 0.9215 }
]
}
}
}

Field reference

Top level:

FieldTypeNotes
ratesobjectMap of pair to per-pair object.

Per-pair object:

FieldTypeNotes
pairstringEcho of the request.
currentnumber | nullMost recent close rate.
previousnumber | nullClose rate from the prior day.
historyarray | nullDaily OHLC bars, descending. Null if you did not request a window.

History entry:

FieldTypeNotes
datetimestringISO 8601 UTC.
opennumber | null
highnumber | null
lownumber | null
closenumber | null

The wire-format model is oneapi_core.responses.fx.FxResponse.

What “rate” means

USD/EUR is the price of 1 USD in EUR. To convert a USD amount to EUR, multiply by the rate. To convert EUR to USD, divide.

amount_eur = amount_usd * rates["USD/EUR"]["current"]
amount_usd = amount_eur / rates["USD/EUR"]["current"]

We always quote BASE/QUOTE directly. The reverse direction (EUR/USD) is a separate pair you can also request, but using 1 / rate of the forward pair gives the same answer to ~5 decimal places.

Examples

Terminal window
# Current rate only
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/fx/time_series?pair=USD/EUR&outputsize=1"
# 90 days of history for two pairs
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/fx/time_series?pairs=USD/EUR,GBP/JPY&outputsize=90"

Errors

StatuscodeWhen
400bad_requestMalformed pair (missing slash), or both pair and pairs.
401unauthenticatedMissing or invalid API key.
404not_foundPair not supported.
429rate_limitSee rate limits.

See also