Currency Exchange API
ECB exchange rates with currency names, inverse rates, conversions, and historical trend analysis.
GET
/api/currency/latest
1 sat
Get latest exchange rates for a base currency. Adds human-readable currency names and inverse rates.
| Parameter | Type | Description |
|---|---|---|
base | string | Base currency code (default: USD) |
symbols | string | Comma-separated currency codes to filter (optional) |
# Get all rates based on USD curl "https://agent-commerce.store/api/currency/latest" # Get specific rates based on EUR curl "https://agent-commerce.store/api/currency/latest?base=EUR&symbols=USD,GBP,JPY"
Response includes name (full currency name) and inverseRate for each currency.
GET
/api/currency/convert
1 sat
Convert an amount between two currencies with both directions and formatted output.
| Parameter | Type | Description |
|---|---|---|
from | string | Source currency code (e.g., USD) |
to | string | Target currency code (e.g., EUR) |
amount | decimal | Amount to convert (default: 1) |
# Convert 100 USD to EUR
curl "https://agent-commerce.store/api/currency/convert?from=USD&to=EUR&amount=100"Response includes both rate and inverseRate, plus formattedAmount and formattedConvertedAmount.
GET
/api/currency/historical
2 sats
Get historical exchange rates for a date range with trend analysis.
| Parameter | Type | Description |
|---|---|---|
base | string | Base currency code (default: USD) |
start | string | Start date (YYYY-MM-DD) |
end | string | End date (YYYY-MM-DD) |
# Get USD rates for January 2025
curl "https://agent-commerce.store/api/currency/historical?base=USD&start=2025-01-01&end=2025-01-31"Response includes summary with percentageChange, minRate, maxRate, and averageRate.
Usage tips: Use ISO 4217 currency codes (USD, EUR, GBP, JPY, etc.). Base defaults to EUR if not specified. About 33 currencies are supported. ECB data updates daily around 16:00 CET, so rates reflect the previous business day's close.
Value-Add
- Human-readable currency names (not just codes)
- Inverse rates included with every response
- Formatted currency amounts for display
- Historical trend analysis: percentage change, min/max/average
- Both conversion directions in a single call
Upstream Source
Frankfurter API — European Central Bank exchange rates, free and open-source, no API key required.