Base and quote currency explained

Read a currency pair in the right direction, invert an exchange rate, and interpret the base and currency fields in an FX API response.

A white narwhal studying two currency tokens in an ordered tray.

Read the pair as a sentence

In the usual FX pair convention, the first currency is the base and the second is the quote. The rate states the quote currency received for one base unit. A bare value such as 1.25 is incomplete: attach the two currency codes and their order.

All numbers below are illustrative, not current market quotes. For a product screen, “1 EUR = 1.25 USD” is often easier to understand than a pair code alone.

Multiply from base to quote

Suppose a customer wants to express EUR 80 in US dollars at the illustrative EUR/USD rate of 1.25. The units show which operation to use: euros cancel, leaving dollars.

Illustrative conversion
80 EUR × 1.25 USD/EUR = 100 USD
100 USD ÷ 1.25 USD/EUR = 80 EUR

Invert the rate when the direction changes

The reciprocal of 1.25 USD per EUR is 0.80 EUR per USD. If a chart switches from EUR/USD to USD/EUR, both its label and its values must change. Reusing 1.25 under the reversed label would produce a different conversion.

The direction also changes how a movement reads. In a second illustrative observation, EUR/USD rising from 1.25 to 1.30 means a euro buys more dollars. The inverse falls from 0.80 to about 0.76923 EUR per USD.

Map the units to the API fields

For Narwhal current rates, base is the currency being priced. Each returned record names the currency you receive for one base unit. Rates arrive as decimal strings with their own timestamp and stale state.

Current-rates request
curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/rates/USD?currencies=EUR,JPY" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"

Keep the direction explicit in storage and UI

A useful saved observation includes more than the number. Keep these details together when displaying or comparing rates:

  • Base currency and quote currency, in separate fields.
  • The rate as received, before display rounding.
  • Observation timestamp and freshness context.
  • Whether the number is indicative, a bid, an ask or another named rate type.

A reciprocal does not remove spreads or fees

The arithmetic above uses one illustrative reference rate. A customer buying currency and a customer selling it may receive different quoted prices. Do not promise that converting out and back returns the original amount after spreads, fees and rounding.

If a provider supplies bid and ask prices, invert the sides as well as the values: the inverse bid is 1 / original ask, and the inverse ask is 1 / original bid. Narwhal’s current-rate examples here describe indicative rates, not an executable bid/ask book.

Sources and references

Published . Last reviewed .