Currency conversion API reference
Convert one positive decimal amount with one selected rate.
REST and fx_ return the same rate, result, timestamp, freshness, and market session.
Request
curl --request GET \
--url "https://api.narwhalapi.com/v1/fx/convert?from=USD&to=JPY&amount=100.00" \
--header "Authorization: Bearer $NARWHAL_API_KEY"| Parameter | Rule |
|---|---|
from | Required source currency. |
to | Required target currency. It must differ from from. |
amount | Positive decimal string up to 1000000000000. |
Response
{
"from": "USD",
"to": "JPY",
"rate": "159.200",
"converted": "15920",
"market_session": "open",
"timestamp": "2026-11-20T05:54:38.708502Z",
"stale": false
}Rounding
Narwhal uses decimal arithmetic and rounds once to the target currency's ISO 4217 minor unit using half-even rounding. Non-zero results that would round to zero instead keep up to five significant figures using half-even rounding, without padding zeros.
Errors
400 invalid_ when from and to are the same currency. Other invalid currencies or amounts return 400 invalid_. Unsupported currencies return 404 currency_.
Read errors and credits · Read the methodology · Exchange rate API
Start with a free key
Free $10 credits every month, no card.Free $10 credits a month, no card.
Was this page helpful?