Exchange Rates API
Real-time and historical exchange rates for 50+ currencies. Supports conversion mode with amount calculation and listing mode for all rates against a base currency.
/api/v1/exchange/ratesTry it out
/api/v1/exchange/ratesParameters
Code
curl -X GET "https://khaleejiapi.dev/api/v1/exchange/rates?base=AED&target=USD&amount=1000" \ -H "Authorization: Bearer your_api_key"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| base | string | Optional | Base currency code (default: AED) |
| target | string | Optional | Target currency for conversion mode |
| amount | number | Optional | Amount to convert (requires target) |
| date | string | Optional | YYYY-MM-DD for historical rates |
Response Fields
Conversion Mode (when target provided)
from/to currency objects (code, name, symbol), amount, rate, converted value, date, source
Listing Mode (no target)
base currency, date, currencies count, source, and rates object mapping currency codes to exchange rates
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 1,000 | 10 req/min |
| Starter | 10,000 | 60 req/min |
| Professional | 100,000 | 300 req/min |
| Business | 500,000 | 1,000 req/min |
Debugging & Support
Include X-Request-ID when contacting support
Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.
How to capture it
JavaScript / fetch
const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."cURL
curl -si "https://khaleejiapi.dev/api/v1/..." \ -H "Authorization: ******" | grep -i x-request-id # → x-request-id: req_01j9xkz4vp8...
Browser DevTools
Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.
For a full list of error codes and guidance on common issues, see the Troubleshooting guide.