GET /v1/fx
Exchange rate
Exchange rate
NBU official rate for any pair with UAH, ECB for the rest, cross rates otherwise. Requires scope read:pricing.
- Автентифікація: заголовок
Authorization: Bearer rv_live_...(API-ключі та scopes) - Потрібний scope:
read:pricing
openapi.json) і подається англійською, як у самому API.Параметри
| Поле | Де | Тип | Обов’язк. | Опис |
|---|---|---|---|---|
base | query | string | так | ISO-4217 base currency, e.g. EUR. |
quote | query | string | так | ISO-4217 quote currency, e.g. UAH. |
date | query | string | ні | Rate date (yyyy-mm-dd). Default: latest. Weekends/holidays return the previous working day (stale: true). |
Відповіді
200
Exchange rate.
application/json · Схема: FxResponse
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
base | string | так | |
quote | string | так | |
rate | number | так | 1 base = rate quote. |
requested_date | string | так | |
effective_date | string | так | |
stale | boolean | так | true if effective_date differs from requested_date. |
source | string | так | nbu | ecb | nbu-cross | identity | mock. |
mode | "live" | "test" | "mock" | так |
400
Invalid request parameters or body (code validation_error).
application/problem+json · Схема: Problem
401
Missing, malformed, unknown, revoked or expired API key (code unauthorized).
application/problem+json · Схема: Problem
403
The API key lacks the scope required by this endpoint (code insufficient_scope).
application/problem+json · Схема: Problem
422
Date in the future or no rate for the pair.
application/problem+json · Схема: Problem
429
Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.
application/problem+json · Схема: Problem
502
Rate provider unavailable.
application/problem+json · Схема: Problem
Приклад
curl -s "https://api.importos.app/v1/fx?base=EUR"e=UAH" \
-H "Authorization: Bearer $IMPORTOS_API_KEY"