apyhub
FINANCE

Convert Currency API

Hosted on ApyHub

What it does

Currency Converter returns the exchange rate for a source and target currency pair on a given date. Send source and target, and optionally date; if date is omitted or blank, it defaults to today.

Use it when you need a point-in-time FX rate for pricing, reporting, invoicing, or historical reconciliation. The request is simple: provide the currency codes you want to compare, and get the rate back in the data field.

The response is intentionally minimal. data contains either a numeric exchange rate or a boolean value, so you can wire the result directly into downstream calculations or validation logic without parsing a larger payload.

Currency Converter fits well in finance workflows, product pricing tools, and back-office systems that need a quick lookup for a specific currency pair and date rather than a full market-data feed.

POST
Convert currency pair for a date
http://localhost:8080/apyhub/convert-currency-pair-for-date
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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.