Production-ready currency rates collector and historical JSON API.
Repository: https://github.com/Webisso/currency-api/
- Free and fast static JSON responses
- No rate limiting on published static endpoints
- Daily data collection and build pipeline
- Versioned API by date (
latestandYYYY-MM-DD) - Pretty and minified JSON formats
- Local REST/static server for development
- Fallback-ready client utility for CDN failover
GitHub Pages:
https://webisso.github.io/currency-api/{date}/{apiVersion}/{endpoint}
jsDelivr (GitHub repository distribution):
https://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/{date}/{apiVersion}/{endpoint}
Format rules:
date:latestorYYYY-MM-DDapiVersion:v1- endpoint formats:
/{endpoint}.json/{endpoint}.min.json
/currencies
- Returns all supported currencies list.
- Example:
/latest/v1/currencies.json - Minified:
/latest/v1/currencies.min.json
/currencies/{base}
- Returns full conversion table using
{base}as base currency. - Example:
/latest/v1/currencies/eur.json - Date example:
/2026-05-25/v1/currencies/eur.json - Minified:
/latest/v1/currencies/eur.min.json
/convert/?from=USD&to=EUR&unit=10
- Latest conversion with query parameters.
- Returns structured JSON view with source, target, TRY rates, rate and converted amount.
- Pages example:
https://webisso.github.io/currency-api/latest/v1/convert/?from=USD&to=EUR&unit=10 - jsDelivr example:
https://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/latest/v1/convert/?from=USD&to=EUR&unit=10
/convert.js
- Browser module for programmatic conversion.
- Pages:
https://webisso.github.io/currency-api/latest/v1/convert.js - jsDelivr:
https://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/latest/v1/convert.js
https://webisso.github.io/currency-api/latest/v1/currencies.jsonhttps://webisso.github.io/currency-api/latest/v1/currencies/usd.jsonhttps://webisso.github.io/currency-api/2026-05-25/v1/currencies/eur.min.json
jsDelivr equivalents:
https://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/latest/v1/currencies.jsonhttps://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/latest/v1/currencies/usd.jsonhttps://cdn.jsdelivr.net/gh/Webisso/currency-api@main/docs/2026-05-25/v1/currencies/eur.min.json
Recommended client strategy:
- Try jsDelivr URL first.
- If it fails, fallback to GitHub Pages URL.
You can use the built-in helper at src/client/fetchCurrencyApi.js.
npm install
npm run fetch
npm run build:api
npm startLocal examples:
http://localhost:3000/healthhttp://localhost:3000/latest/v1/currencies.jsonhttp://localhost:3000/latest/v1/currencies/eur.jsonhttp://localhost:3000/2026-05-25/v1/currencies/usd.min.json
.github/
workflows/
daily-fetch.yml
src/
fetchRates.js
buildApi.js
saveFile.js
server.js
client/
fetchCurrencyApi.js
utils/
date.js
xmlValidator.js
ratesXmlParser.js
data/
YYYY/
MM/
YYYY-MM-DD.xml
docs/
latest/
YYYY-MM-DD/
Snapshot dosya adlari calisma gunune gore degil, kaynak XML icindeki yayin tarihine gore yazilir. Kaynak saglayici ayni bulteni birden fazla gun sunarsa data/ ve docs/ yeni bir tarih klasoru uretmez.
daily-fetch.yml- Scheduled fetch at
17:30Turkey time (14:30 UTC) - Retries source fetch on transient failures
- Builds JSON API outputs
- Commits
data/anddocs/only when changes exist - Works with GitHub Pages source set to
main /docs
- Scheduled fetch at
Environment variables:
CURRENCY_SOURCE_URL(default: current XML source URL)
This keeps the system provider-agnostic so source feeds can be changed later without architecture changes.