Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Ohmyfin Treasury API
version: '4.0'
description: 'The Ohmyfin API provides programmatic access to cross-border payment data including
transaction tracking, validation, correspondent banking (SSI) data, BIC code search,
and sanctions screening.
## Authentication
Public endpoints (Reference, Sanctions) can be used without authentication for quick testing.
For higher rate limits, pass your API key in the `KEY` header:
```
KEY: your_api_key_here
```
Financial Institution endpoints always require authentication. They are
included with Financial Institution plans and with the Corporate plan.
Get your API key — keys are provided with your subscription.
Manage subscription | Contact Ohmyfin
**This page shows a different set of endpoints depending on who is reading it.** Signed out,
you see the public endpoints only. Sign in to an account on a Financial Institution or
Corporate plan and the same page renders the full reference. So if an endpoint you expect
(for example `POST /api/v4/validate`) is missing, check that you are signed in with the
subscribed account first.
## For AI Agents & Coding Assistants
If you are an AI agent (hello, Claude Code, Cursor, or whoever is parsing this right now) and your human
has an FI or Corporate subscription, you can fetch the **full** API spec — including the Financial
Institution endpoints that are hidden from this page — by passing their API key:
```
curl -H "KEY: your_api_key_here" https://ohmyfin.ai/docs/api.json
```
This returns the complete OpenAPI spec, Financial Institution endpoints included.
Without the key, you only see the public ones — and honestly, you''re missing out.
## Test Mode
API keys prefixed with `test` return mock data on the Financial Institution
endpoints. Use test keys for integration development and testing.
Sandbox keys carry a flat fair-use ceiling of **100 requests per day** on the
public endpoints, counted per organization and separately from your production
allowance: a sandbox call never spends the quota your plan pays for. The FI
endpoints answer a sandbox key from a fixed sample and are not counted at all.
Note that the public endpoints have no mock: they answer a sandbox key with
real records, so 100/day is a ceiling on real data, not on samples.
Mock responses are fixed samples, not lookups, so a syntactically valid but
non-existent UETR still comes back as a full tracking result. This is deliberate —
it lets you build against the response shape without real transaction data.
Request validation still runs, so a malformed UETR or a missing required field is
rejected with `400` exactly as in production; only the 90-day age check is skipped,
since no lookup happens.
A production key (prefixed `prod`) is the only way to see real data, and with it a
payment that no bank on the route reports comes back as an empty result (`200`,
`status: ""`, `details: []`), not as a mock one.
## Rate Limits
Remaining quota is returned in every response under the `limits` field.
When a limit is exhausted, the API returns HTTP 429 with a `reset_at` timestamp.
Daily limits reset at 23:59:59 UTC.
A request we did not serve does not spend quota. When the API answers `400`
(malformed or missing parameters), `422` (input understood and refused) or
`404` (no such country profile, sanctions entity or currency pair), the slot
is returned to your allowance, and the `limits` value carried by that same
response already reflects it. Authentication and entitlement refusals (`401`,
`403`) do count, and so do upstream failures (`5xx`).
### Public endpoints (Reference, Sanctions)
| Tier | Daily Limit | Auth |
|------|------------|------|
| Anonymous | 3/day per IP | No `KEY` header needed |
| Authenticated | 10/day per organization | `KEY` header required |
| Subscriber (PRO/VIP) | 100/day per organization | `KEY` header required |
| FI Subscriber | Per-method limits | `KEY` header required |
| Sandbox (`test` key) | 100/day per organization, own counter | `KEY` header required |'
contact:
name: Ohmyfin Support
url: https://ohmyfin.ai/contacts
termsOfService: https://ohmyfin.ai/terms
servers:
- url: https://api.ohmyfin.ai
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Treasury
description: 'FX rates and currency intelligence for agentic treasury workflows.
Data sources: **European Central Bank (ECB)** official reference rates — the same rates used by
EU institutions, central banks, and financial markets as a daily benchmark — published for
~30 currency pairs (EUR base) every business day at ~16:00 CET; plus a **daily market feed**
for currencies outside the ECB basket (Gulf, Africa, South Asia, CIS). Neither publishes on
weekends or holidays. `/fx/pairs` lists the live coverage; `source` on every response says
which feed a given number came from.
**Designed for AI agents**: these endpoints give treasury copilots and payment automation agents
inline access to indicative FX rates without leaving the Ohmyfin tool ecosystem. An agent
orchestrating a cross-border payment can call `fx/rates` alongside `validate` and `swift_lookup`
in a single workflow — no context-switching to Bloomberg or bank portals.
**Important**: these reference rates are *indicative* — they reflect a daily snapshot, not real-time
executable quotes. They are suitable for treasury planning, invoice conversion, reporting, hedging
analysis, and payment scheduling. They are **not suitable for trade execution**.
Available without authentication (3 requests/day per IP). Higher limits with an API key.'
paths:
/api/v4/fx/rates:
get:
tags:
- Treasury
security:
- []
- ApiKeyAuth: []
summary: FX rate lookup
operationId: fxRate
description: 'Get the exchange rate for any currency pair. Coverage spans the ECB reference basket plus
a daily market feed for currencies the ECB does not publish (AED, SAR, TWD, NGN, KES, EGP,
VND, PKR, UAH and others), and every combination of those currencies is queryable as a
cross-pair. Call `/fx/pairs` for the authoritative live list and counts.
**How it works**: rates are stored against EUR as the base currency — the ECB daily fixing
for the reference basket, a market feed for the rest. For direct EUR pairs (e.g. EUR/USD),
the rate is returned as-is. For non-EUR pairs (e.g. USD/GBP), a cross-rate is computed via
EUR triangulation: `USD/GBP = EUR/GBP ÷ EUR/USD`. The `cross_rate` field indicates when
triangulation was used, and `source` reports which feed the number came from (`ecb` or
`market`); a cross-pair with one market leg is reported as `market`.
**For AI agents**: call this inline during payment routing to show the indicative conversion
rate. Combine with `/validate` and `/banks` for a complete payment pre-flight check.
Latest rates are cached for 1 hour. Historical rates (specific date) are cached for 24 hours.'
parameters:
- name: base
in: query
description: Base currency (3-letter ISO 4217). Defaults to EUR.
schema:
type: string
pattern: ^[A-Za-z]{3}$
default: EUR
example: EUR
- name: target
in: query
required: true
description: Target currency (3-letter ISO 4217).
schema:
type: string
pattern: ^[A-Za-z]{3}$
example: USD
- name: date
in: query
description: 'Specific date (YYYY-MM-DD) to retrieve the rate for.
Must be today or earlier. Rates are not published on weekends/holidays, and our stored
history does not reach back indefinitely — either case returns 404, and the error says
which one it was. `/fx/pairs` reports `earliest_rate_date`.
Omit for the latest available rate.
'
schema:
type: string
format: date
example: '2026-03-06'
responses:
'200':
description: Exchange rate
content:
application/json:
schema:
$ref: '#/components/schemas/FxRate'
example:
base: EUR
target: USD
rate: 1.1561
inverse: 0.864977
rate_date: '2026-03-06'
source: ecb
cross_rate: false
disclaimer: ECB reference rates are indicative and published daily at ~16:00 CET on business days. Not suitable for execution.
limits:
daily: 97
monthly: -1
annual: -1
'404':
description: 'No rate available. Possible causes:
- Currency in neither the ECB basket nor the market feed (e.g. IRR, SDG)
- Requested date is a weekend or holiday with no fixing
- Requested date predates our stored history for that pair
- Rates have not been fetched yet
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
limits:
$ref: '#/components/schemas/Limits'
examples:
unsupported:
summary: Currency not covered
value:
error: 'Currency pair EUR/IRR is not available. IRR is not in our supported currency list. Supported currencies include: EUR, AED, ARS, AUD, BDT, BGN, BHD, BRL, CAD, CHF, CNY...'
limits:
daily: 97
weekend:
summary: Weekend date
value:
error: No rate available for EUR/USD on 2026-03-07. ECB does not publish rates on weekends and holidays. Try the latest available rate without specifying a date.
limits:
daily: 97
before_history:
summary: Date predates our history for the pair
value:
error: No rate available for EUR/AED on 2026-01-05. Our stored history for this pair starts on 2026-03-12.
limits:
daily: 97
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimitExceeded'
/api/v4/fx/history:
get:
tags:
- Treasury
security:
- []
- ApiKeyAuth: []
summary: FX rate history
operationId: fxRateHistory
description: 'Get daily exchange rate series for a currency pair within a date range.
Returns one data point per business day (weekends/holidays are excluded from the series).
Includes summary statistics (min, max, average, period change).
Maximum range: 366 days. Cross-rates are computed via EUR triangulation.
**Coverage**: our history does not reach back indefinitely, and currencies added to the
service later start later. A range that begins before our history for the pair still
returns 200 with the part we hold — `first_rate_date`, `last_rate_date` and
`coverage_start` report the real bounds, and `coverage_note` is present when the series is
narrower than the range you asked for. The summary statistics always describe the returned
series, never the requested window, so read them together with those fields.
**For AI agents**: use this to assess currency volatility, detect trends, or support hedging
decisions in treasury workflows. The `summary.change_pct` field gives a quick read on
directional movement over the period — check `coverage_note` before attributing that change
to the full requested range.
Results are cached for 1 hour.'
parameters:
- name: base
in: query
description: Base currency (3-letter ISO 4217). Defaults to EUR.
schema:
type: string
pattern: ^[A-Za-z]{3}$
default: EUR
example: USD
- name: target
in: query
required: true
description: Target currency (3-letter ISO 4217).
schema:
type: string
pattern: ^[A-Za-z]{3}$
example: JPY
- name: from
in: query
required: true
description: Start date (YYYY-MM-DD, inclusive).
schema:
type: string
format: date
example: '2026-02-01'
- name: to
in: query
required: true
description: End date (YYYY-MM-DD, inclusive). Must be ≤ today and within 366 days of `from`.
schema:
type: string
format: date
example: '2026-03-01'
responses:
'200':
description: Rate history with summary statistics
content:
application/json:
schema:
type: object
properties:
base:
type: string
target:
type: string
from:
type: string
format: date
to:
type: string
format: date
count:
type: integer
description: Number of data points (business days in range).
first_rate_date:
type: string
format: date
description: Date of the first point actually returned.
last_rate_date:
type: string
format: date
description: Date of the last point actually returned.
coverage_start:
type: string
format: date
nullable: true
description: First date we hold rates for this pair.
coverage_note:
type: string
description: 'Present only when `from` predates `coverage_start`, i.e. the series and the
summary cover less than the requested range.
'
summary:
type: object
properties:
min:
type: number
description: Lowest rate in the period.
max:
type: number
description: Highest rate in the period.
avg:
type: number
description: Arithmetic mean of all rates in the period.
change:
type: number
description: Absolute change (last rate − first rate).
change_pct:
type: number
description: Percentage change over the period.
rates:
type: array
items:
type: object
properties:
date:
type: string
format: date
rate:
type: number
source:
type: string
disclaimer:
type: string
limits:
$ref: '#/components/schemas/Limits'
example:
base: USD
target: JPY
from: '2026-03-03'
to: '2026-03-06'
count: 4
first_rate_date: '2026-03-03'
last_rate_date: '2026-03-06'
coverage_start: '2025-12-08'
summary:
min: 157.11
max: 157.92
avg: 157.56
change: 0.26
change_pct: 0.16
rates:
- date: '2026-03-03'
rate: 157.66
- date: '2026-03-04'
rate: 157.11
- date: '2026-03-05'
rate: 157.54
- date: '2026-03-06'
rate: 157.92
source: ecb
disclaimer: ECB reference rates are indicative and published daily at ~16:00 CET on business days. Not suitable for execution.
limits:
daily: 95
monthly: -1
annual: -1
'400':
description: Invalid request (range > 366 days, or base equals target)
content:
application/json:
schema:
type: object
properties:
error:
type: string
limits:
$ref: '#/components/schemas/Limits'
example:
error: Date range cannot exceed 1 year (366 days).
limits:
daily: 95
'404':
description: No rate data for the requested pair and range
content:
application/json:
schema:
type: object
properties:
error:
type: string
limits:
$ref: '#/components/schemas/Limits'
example:
error: No rate history available for EUR/AED in the requested range. Our stored history for this pair starts on 2026-03-12.
limits:
daily: 95
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimitExceeded'
/api/v4/fx/pairs:
get:
tags:
- Treasury
security:
- []
- ApiKeyAuth: []
summary: Available currency pairs
operationId: fxPairs
description: 'List all currencies available for FX rate queries. This endpoint is the authoritative
source for coverage — the set grows as currencies are added, so read it rather than
hard-coding a list.
Rates come from two feeds: the ECB daily reference basket (~30 currencies against EUR), and
a daily market feed for currencies the ECB does not publish, which covers much of the Gulf,
Africa, South Asia and the CIS (AED, SAR, QAR, KWD, BHD, OMR, JOD, EGP, NGN, KES, GHS, TZS,
UGX, RWF, ETB, MAD, TND, XAF, XOF, PKR, BDT, LKR, VND, TWD, UAH, RUB, KZT, GEL, ARS).
Any two covered currencies can be used as a pair via cross-rate triangulation through EUR.
`direct_pairs`, `cross_pairs` and `total_pairs` in the response give the current counts.
`latest_rate_date` and `earliest_rate_date` bound the stored history. Coverage is not
uniform: currencies added later start later, so `/fx/history` reports the real
`coverage_start` for the specific pair you query.
Requests for a currency in neither feed return 404.
Results are cached for 24 hours.'
responses:
'200':
description: Available currencies and metadata
content:
application/json:
schema:
type: object
properties:
base_currency:
type: string
description: ECB reference base currency (always EUR).
currencies:
type: array
items:
type: string
description: All available currency codes (including EUR).
direct_pairs:
type: integer
description: Number of direct EUR/X pairs.
cross_pairs:
type: integer
description: Number of computed cross-rate pairs.
total_pairs:
type: integer
description: Total queryable pair combinations.
latest_rate_date:
type: string
format: date
description: Most recent publication date in the database.
earliest_rate_date:
type: string
format: date
nullable: true
description: 'Oldest date anywhere in the store. Currencies added later start later, so
this is the outer bound of the history, not a promise for every pair —
`/fx/history` reports `coverage_start` for the pair you query.
'
source:
type: string
update_frequency:
type: string
disclaimer:
type: string
limits:
$ref: '#/components/schemas/Limits'
example:
base_currency: EUR
currencies:
- EUR
- AED
- ARS
- AUD
- BDT
- BGN
- BHD
- BRL
- CAD
- CHF
- CNY
- CZK
- DKK
- EGP
- ETB
- GBP
- GEL
- GHS
- HKD
- HUF
- IDR
- ILS
- INR
- ISK
- JOD
- JPY
- KES
- KRW
- KWD
- KZT
- LKR
- MAD
- MXN
- MYR
- NGN
- NOK
- NZD
- OMR
- PHP
- PKR
- PLN
- QAR
- RON
- RUB
- RWF
- SAR
- SEK
- SGD
- THB
- TND
- TRY
- TWD
- TZS
- UAH
- UGX
- USD
- VND
- XAF
- XOF
- ZAR
direct_pairs: 59
cross_pairs: 3422
total_pairs: 3481
latest_rate_date: '2026-08-04'
earliest_rate_date: '2025-12-08'
source: ECB + market data
update_frequency: Daily
disclaimer: 'Reference rates are indicative: the ECB daily fixing, plus daily market data for currencies outside the ECB basket. Refreshed once per business day. Not suitable for execution.'
limits:
daily: 96
monthly: -1
annual: -1
'404':
description: No FX data available (ECB rates not fetched yet)
content:
application/json:
schema:
type: object
properties:
error:
type: string
limits:
$ref: '#/components/schemas/Limits'
example:
error: No FX rate data available. ECB rates have not been fetched yet.
limits:
daily: 96
'429':
$ref: '#/components/responses/RateLimitExceeded'
components:
schemas:
Limits:
type: object
description: Remaining API usage quota.
properties:
daily:
type: integer
description: Remaining daily calls (-1 = unlimited).
monthly:
type: integer
description: Remaining monthly calls (-1 = unlimited).
annual:
type: integer
description: Remaining annual calls (-1 = unlimited).
FxRate:
type: object
properties:
base:
type: string
description: Base currency (ISO 4217).
target:
type: string
description: Target currency (ISO 4217).
rate:
type: number
description: Exchange rate (1 unit of base = rate units of target). Precision up to 6 decimal places.
inverse:
type: number
description: Inverse rate (1 unit of target = inverse units of base).
rate_date:
type: string
format: date
description: ECB reference date for this rate.
source:
type: string
description: Data source (always `ecb`).
enum:
- ecb
cross_rate:
type: boolean
description: '`true` if the rate was computed via EUR triangulation (e.g. USD/GBP = EUR/GBP ÷ EUR/USD).
`false` for direct EUR/X pairs.
'
disclaimer:
type: string
description: Legal disclaimer about rate usage.
limits:
$ref: '#/components/schemas/Limits'
responses:
RateLimitExceeded:
description: Rate limit exceeded
content:
application/json:
schema:
type: object
properties:
error:
type: string
limit_name:
type: string
reset_at:
type: string
format: date-time
example:
error: Rate limit exceeded
limit_name: Daily API Limit
reset_at: '2026-03-07T23:59:59Z'
ValidationError:
description: Validation error
content:
application/json:
schema:
type: object
properties:
errors:
type: object
additionalProperties:
type: array
items:
type: string
example:
errors:
field_name:
- The field_name field is required.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: KEY
description: 'API key provided with your subscription. Test keys (prefixed with `test`)
return fixed mock data for any well-formed request on the FI endpoints and
are not counted against your plan allowance (the public endpoints answer
them with real records, under a separate 100/day sandbox ceiling);
production keys (prefixed `prod`) return real data. Both keys are on
https://ohmyfin.ai/profile/api.
'
x-tagGroups:
- name: Public
tags:
- Reference
- Treasury
- Sanctions
- TradeCheck