apyhub
Back
FINANCE

Currency Converter API: Live & Historical Exchange Rates

Hosted on ApyHub

What it does

The Currency Converter API returns the exchange rate between two currencies, such as USD to EUR or USD to INR. By default it returns today's rate. Add a date to get the rate for any past day.

Use it for pricing pages, checkout, invoices, and financial reporting. Multiply the returned rate by your amount to convert it. Need several currencies at once? The Multiple Currencies API returns many rates in one call. For the full list of supported currency codes, use the Currencies Dictionary API.

You can start on ApyHub's free tier with no card required.

POST
Convert currency pair for a date
https://api.eu.apyhub.com/apyhub/convert-currency-pair-for-date

QUICKSTART

GUIDE

Quickstart

Convert a currency pair for a date by sending the source and target currency codes.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-currency-pair-for-date" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "usd",
    "target": "eur"
  }'

What you'll get back

Returns a JSON object with a data field. The data value is either a number with the converted exchange rate or a boolean.

{
  "data": 0.9214
}
TRY ITLIVE · 5 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Defaults to today when omitted or blank.

About this endpoint

What it does

Converts a currency pair for a given date by taking a source currency, a target currency, and an optional date, then returning the conversion result in the response body.

Request Body

ParameterTypeMandatoryDescription
dateStringNoDate in YYYY-MM-DD format. Defaults to today when omitted or blank.
sourceStringYesSource currency code.
targetStringYesTarget currency code.

Response

Returns a JSON object with a data field. The data value can be either a Number conversion result or a Boolean value, depending on the response variant declared in the schema. Success response schema: 200.

ParameterTypeMandatoryDescription
dataNumber / BooleanNoConversion result or boolean value, as declared by the response schema.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.