=CalcHubfree online calculators
Financial CalculatorsMath CalculatorsFitness & Health CalculatorsOther CalculatorsExchange ratesAll Calculators

Free exchange-rate API

Static JSON endpoints, published with Access-Control-Allow-Origin: *. No key, no sign-up — cache them at the edge and refresh at your own cadence.

EndpointWhat it returnsShape
/api/latest.jsonLatest FX rates166 currencies against USD, plus the snapshot timestamp.
{"base":"USD","updated":"…","rates":{"EUR":0.9241,"CNY":6.6735}}
/api/currencies.jsonCurrency metadataCode, name, symbol, country and decimal places for every currency.
[{"code":"USD","name":"US Dollar","symbol":"$"}]
/api/pairs.jsonMajor pairs380 major pairs with the current cross rate.
[{"from":"USD","to":"CNY","rate":6.6735}]
/api/crypto.jsonCrypto snapshot30 assets: price, 24h change, high/low, volume, market cap.
[{"symbol":"BTC","price":51639.77,"change24h":-9.34}]
/api/metals.jsonMetals spotGold and silver in USD per troy ounce.
{"gold":{"usd":3646.84},"silver":{"usd":45.4}}

Usage

fetch('https://YOUR-DOMAIN/api/latest.json')
  .then(r => r.json())
  .then(d => console.log(d.rates.CNY));

The data is a snapshot written when the site was built, so treat the updated field as the freshness marker. For live per-second quotes call the upstream provider directly; these endpoints are meant for dashboards, prototypes and low-frequency jobs.

Cross-rate maths

All FX rates are quoted against USD, so a cross rate is rate(TO) / rate(FROM). That keeps the payload small and lets any pair be derived client-side.