Every currency in fxapi is identified by its three-letter code – ISO 4217 for fiat currencies, XAU, XAG, XPT and XPD for precious metals (priced per troy ounce), and common tickers such as BTC or ETH for cryptocurrencies. The same codes work everywhere in the API.
Choosing the base currency
All endpoints accept base_currency, which defaults to USD. Each returned value is the amount of the target currency for one unit of the base, so base_currency=EUR¤cies=USD returns US dollars per euro. Any supported code can be the base, including CHF, XAU or BTC – cross rates are calculated for you (see base currency and cross rates).
Filtering the response
Without a filter, /v1/latest returns every supported currency. Narrow it down with:
currencies=EUR,GBP,JPY– a comma-separated list of codestype=fiat,type=metalortype=crypto– one asset class at a time
Smaller payloads parse faster and are easier to cache.
Currency metadata from /v1/currencies
The currencies endpoint returns metadata for each code: code, name, name_plural, symbol, symbol_native, decimal_digits, rounding, type and countries (ISO 3166-1 alpha-2). Use it to drive currency pickers, format amounts and decide where to round instead of hard-coding those rules. Add as_html=true to get an HTML table.
Legacy and new codes
When a country redenominates or replaces its currency, the code changes. fxapi keeps 11 legacy codes – BYR, CUC, HRK, LTL, LVL, MRO, SLL, STD, VEF, ZMK and ZWL – so historical requests and older integrations keep working, and supports current codes such as VES, MRU, STN, SLE, ZWG and XCG. Use the current code for new work; background in redenominations and code changes.
The currency guides at the top of this page cover the most requested currencies in detail, with symbols, central banks, pegs and ready-to-run code.
Frequently asked questions
Can I use any currency as the base currency?
base_currency on every endpoint and every plan. The default is USD.How do I get only fiat currencies, or only crypto?
type=fiat, type=metal or type=crypto to the request. To pick individual codes, pass a comma-separated list in currencies, e.g. currencies=EUR,GBP,JPY.How many decimals should I use for each currency?
decimal_digits and rounding from /v1/currencies. Most fiat currencies use 2 decimals, but JPY and KRW use 0 – see currency rounding and precision.