Skip to content

Get current exchange rates from a base currency

GET
/exchange-rates
curl --request GET \
--url 'http://localhost:8000/api/v1/exchange-rates?base=USD&targets=EUR%2CGBP%2CJPY&target=EUR' \
--header 'Authorization: Bearer <token>'

Returns rates from the base currency to each requested target, honoring the authenticated user’s manual exchange rates. Targets with no available rate are listed under “unavailable” rather than returned as a rate.

base
required
string
Example
USD
targets
string
Example
EUR,GBP,JPY

Comma-separated target currency codes. Use this or “target”.

target
string
Example
EUR

A single target currency code. Use this or “targets”.

Rates retrieved

Media type application/json
object
data
object
base
string
rates
object
unavailable
Array<string>
Example
{
"data": {
"base": "USD",
"rates": {
"EUR": 0.92,
"GBP": 0.79
},
"unavailable": [
"JPY"
]
}
}

Unauthenticated

Validation error