Exchange Rates API
ISO 4217
Single + Bulk
Real-Time Rates

Convert currency. At the live rate.

Convert any amount between ISO 4217 currencies with live exchange-rate data. Single conversions or bulk batches up to 100, each with the rate and update timestamp.

ISO 4217 · currency codes100 · conversions per batchrate + time · on every resultGET + POST · bulk

Convert at the live rate.

This calls the live Exchange Rates API. Pick currencies and an amount; the response returns the applied rate, the converted amount, and when the rate was last updated.

Request builder
Base, target, and amount in. Converted value out.
GET /api/exchange
Bulk conversions
POST /api/bulk-exchange with a conversions array (up to 100) to convert many pairs in one call, with a per-batch summary of successes and failures.
Output preview
Live response from the API, plus the exact request to reproduce it.

Fetching live rate...

Why Exchange Rates API

Currency conversion you can audit.

Live conversion

Convert any amount between ISO 4217 currencies using current upstream exchange-rate data.

Rate transparency

Every result returns the applied exchangeRate and a formatted convertedAmount, so the math is auditable.

Freshness timestamps

A lastUpdated Unix timestamp on each conversion tells you exactly when the underlying rate was published.

Bulk conversions

Convert up to 100 pairs per request via GET query payload or a POST body, with a summary of successes and failures.

Per-item results

Bulk responses report each conversion independently, with item-level errors and indexes so one bad pair never fails the batch.

Structured errors

Missing parameters, unsupported currencies, and oversized batches all return clear errors with correlation IDs.

/api/v1/exchange-rates-and-currency

Endpoints, at a glance.

One GET for single conversions, plus GET and POST bulk endpoints for batching up to 100 pairs. Routes are self-prefixed under /api.
GET/api/v1/exchange-rates-and-currency/api/exchange

Single conversion

Requires base, target, and amount. Returns the rate, converted amount, and timestamp.

PRIMARY
GET/api/v1/exchange-rates-and-currency/api/bulk-exchange

Bulk via GET

Pass a JSON array string in conversions to convert many pairs, up to 100, in one call.

POST/api/v1/exchange-rates-and-currency/api/bulk-exchange

Bulk via POST

Send a conversions array in the JSON body for larger, cleaner batch requests.

GET/health

Service health

Status, service name, version, uptime, and environment.

GET/metrics

Prometheus metrics

Request counts, duration histograms, and conversion counters.

ParameterTypeRequiredDescription
basestringsingleSource currency code (ISO 4217), e.g. USD.
targetstringsingleTarget currency code (ISO 4217), e.g. EUR.
amountnumbersingleAmount to convert.
conversionsstring / arraybulkJSON array of { base, target, amount } objects. Query string for GET, request body for POST. Max 100.

Error reference

Clear errors, every time.

Bad input and upstream failures both return a plain error message and a correlationId for tracing.

400Missing Parameters

base, target, or amount was not provided for a single conversion.

400Unsupported Currency

The target currency code does not exist in the returned rate set.

400Invalid Bulk Format

The bulk payload is missing, not an array, or not valid JSON for the GET bulk endpoint.

400Batch Size Limit

A bulk request contained more than 100 conversion objects.

404Route Not Found

The requested route does not exist under the service.

500Fetch Failure

The upstream rate provider failed during a single or bulk conversion.

Example error response

{
  "error": "Please provide base, target, and amount.",
  "correlationId": "1780095009530-nmfnx6tsc"
}

FAQ

API questions developers ask first.

How do I convert a single amount?

Call GET /api/exchange with base, target, and amount query parameters. The response returns the applied exchangeRate, a formatted convertedAmount string, and a lastUpdated timestamp for the rate.

Can I convert many currency pairs at once?

Yes. Use /api/bulk-exchange with up to 100 conversion objects. Send them as a JSON array string in the conversions query parameter (GET) or as a conversions array in the request body (POST).

Does each conversion tell me the rate that was used?

Yes. Every result includes the exchangeRate applied and the convertedAmount, so the conversion is fully auditable rather than a black box.

What happens if one pair in a bulk request is invalid?

Bulk responses report each conversion independently with item-level errors and indexes, plus a summary of total, successful, and failed counts, so a single bad pair does not fail the whole batch.

How do I authenticate requests?

Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.

Price anything in any currency.

Single or bulk conversions with the applied rate and freshness timestamp on every result. No rate feeds to ingest, no conversion tables to maintain.