TodayRatesFX & crypto

Rates API

JSON · CORS enabled

Reference FX, crypto and precious-metal data as JSON, with a 30-second server-side cache. Anonymous use is rate-limited per IP; an API key lifts the limit and gives you per-key usage stats.

Authentication

Anonymous requests work without a key and are limited to 60 requests / minute per IP. Send a key either as the key query parameter or the X-API-Key header. Keys are created in the admin panel (Currency → API keys) and can be revoked at any time.

curl "https://todayrateslive.com/index.php?rates-api-type-latest&key=YOUR_API_KEY" # or curl -H "X-API-Key: YOUR_API_KEY" "https://todayrateslive.com/index.php?rates-api-type-latest"

Default key limits: 60 / minute and 2,000 / day by default (configurable per key). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Plan.

Errors

Invalid or disabled key → 403 with {"ok":false,"error":"invalid or disabled api key"}. Limit exceeded → 429 with Retry-After, retry_after in the body and the docs link. Unknown endpoint returns 200 with {"ok":false,"error":"unknown endpoint"} — check the path.

Rates and prices are indicative reference values, not tradeable quotes. Attribution is required for substantial extracts.

FX endpoints

EndpointReturns
?rates-api-type-latestAll USD-based reference rates, provider, data date and update time.
?rates-api-type-convert&from=USD&to=CNY&amount=1000Cross rate and converted amount.
?rates-api-type-history&from=USD&to=CNYDaily series for 7d / 30d / 90d / 1y.
?rates-api-type-currenciesCurrency list with code, name, symbol and current rate.
?rates-api-type-pairsPopular pairs with rates and links.

Metals endpoints

EndpointReturns
?rates-api-type-metalsGold and silver spot in USD: per troy ounce, gram and kilo, previous close and daily change.
?rates-api-type-metals&code=CNYSame, plus local-currency per-ounce / per-gram / per-kilo prices.

Spot feed: gold-api.com (XAU / XAG), refreshed every five minutes; daily closes are stored from launch. Local prices = USD spot × the site reference FX rate and exclude duty, VAT and dealer premiums.

Crypto endpoints

EndpointReturns
?crypto-api-type-latestAll tracked coins with price, 24h change, market cap.
?crypto-api-type-coin&symbol=BTCSingle coin quote and details.
?crypto-api-type-history&symbol=BTC&range=1yDaily candles including volume.
?crypto-api-type-convert&from=BTC&to=CNY&amount=1Crypto → fiat conversion.
?crypto-api-type-listCoin list with symbols and names.

All endpoints support nocache=1 for debugging. CORS is open; a browser fetch works without extra headers.