Browse all documentation

Currency conversion API

Convert one positive decimal amount with one selected rate.

REST and fx_convert_currency return the same amount, rate, result, timestamp, freshness, and market session.

Request

REST
curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/convert?from=USD&to=JPY&amount=100.00" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
ParameterRule
fromRequired source currency.
toRequired target currency. It must differ from from.
amountPositive decimal string up to 1000000000000.

Response

200 OK
{
  "from": "USD",
  "to": "JPY",
  "amount": "100.00",
  "rate": "147.23",
  "converted": "14723",
  "market_session": "open",
  "timestamp": "2026-08-22T06:29:39Z",
  "stale": false
}

Rounding

Narwhal uses decimal arithmetic and rounds once to the target currency's ISO 4217 minor unit using half-even rounding.

Errors

Invalid pairs or amounts return 400 invalid_query. Unsupported currencies return 404 currency_not_supported.

Read errors and quota · Read the methodology