All APIs

Exchange rate API

Get current exchange rates through REST or MCP. Convert amounts or retrieve stored historical rates with the same API key.

First request

Quickstart →
curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/rates/USD?currencies=EUR,JPY" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
Example response Illustrative response · not a live request
{
  "base": "USD",
  "market_session": "open",
  "rates": [
    {
      "currency": "EUR",
      "rate": "0.9200",
      "timestamp": "2026-08-22T06:29:41Z",
      "stale": false
    },
    {
      "currency": "JPY",
      "rate": "147.23",
      "timestamp": "2026-08-22T06:29:39Z",
      "stale": false
    }
  ]
}

Conversion

Convert an amount between supported currencies using the current indicative exchange rate. Each result includes the rate, timestamp, and market-session context.

curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/convert?from=USD&to=JPY&amount=100.00" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
Example response Illustrative response · not a live request
{
  "from": "USD",
  "to": "JPY",
  "rate": "147.23",
  "converted": "14723",
  "market_session": "open",
  "timestamp": "2026-08-22T06:29:39Z",
  "stale": false
}

Rate history

Get historical exchange rates by currency and date range. Retrieve stored observations in pages, with genuine gaps preserved.

curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/rates/USD/observations?currencies=EUR,NZD&start_date=2026-08-20&end_date=2026-08-28&limit=100" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
Example response Illustrative response · not a live request
{
  "base": "USD",
  "observations": [
    {
      "date": "2026-08-20",
      "rates": [
        {
          "currency": "EUR",
          "rate": "0.85609"
        },
        {
          "currency": "NZD",
          "rate": "1.681"
        }
      ]
    }
  ],
  "next_cursor": null
}

Endpoints

GETCurrent exchange rates/v1/fx/rates/{base}
GETCurrency conversion/v1/fx/convert
GETHistorical exchange rates/v1/fx/rates/{base}/observations

Sources and methodology

Clear exchange rates

One unit of the base currency equals the returned amount of the quote currency.

Read the methodology →

Freshness

Each rate has its own timestamp and stale state.

Market context

Each response identifies whether the market is open, on a weekend, or closed between trading sessions.

144 Currencies

Explore related pages

Currency conversion API

Convert an amount using the current exchange rate.

Read the docs →

Historical exchange rates API

Retrieve stored rates by currency and date range.

Read the docs →

Common questions

What does an FX rate mean?

One unit of the base equals the returned amount of the quote currency.

Does the API include historical rates?

Yes. History uses genuine stored dates, bounded pages, and opaque cursors.

What happens on weekends?

The latest accepted rate can remain available with its timestamp, stale state, and weekend market session. Missing publication dates are not filled with synthetic rates.

Are these executable dealer quotes?

No. Rates and conversions are indicative, not dealer quotes or official fixings.

Make your first request

Get a free API key →