EZRate
Sign in

Currency API JSON Schema: EZRate Endpoints, Headers and Error Codes

The EZRate currency API JSON schema reference: base URL, authentication, every endpoint with parameters and fields, rate-limit headers and error codes.

Ersan Fazli
· Web Developer
Published 21 October 2026, 20:00 · 2 min read
Currency API JSON Schema: EZRate Endpoints, Headers and Error Codes
Key takeaways
  • Base URL `https://api.ezrate.me/v1`; authenticate with `X-API-Key` (or `Authorization: Bearer`).
  • Every success response is `{ data, meta }`; every error is `{ error: { code, message, fields? }, meta? }`.
  • This page documents each endpoint’s parameters and fields; plan limits are listed on the API page.

This is the technical reference for the EZRate API. It documents the currency API JSON schema for every endpoint, the headers you will see and every error code. Bookmark it next to your editor.

★
Short answer
Base URL: https://api.ezrate.me/v1. Auth: header X-API-Key: <key> (or Authorization: Bearer <key>). Success: {"data": …, "meta": {"as_of", "freshness_sec", "quote"}}. Errors: {"error": {"code", "message", "fields"?}} with HTTP status 401, 403, 404, 422 or 429. Prices default to Toman (IRT).

New here? Start with the quickstart. Concepts are in the API guide.

Authentication

bash
curl -H "X-API-Key: $EZRATE_KEY" https://api.ezrate.me/v1/assets
# or
curl -H "Authorization: Bearer $EZRATE_KEY" https://api.ezrate.me/v1/assets

The rate object

FieldTypeDescription
symbolstringLower-case identifier, e.g. usd, g18, emami, usdt
codestringDisplay code, e.g. USD
namestringLocalised name (lang=fa|en)
categorystringe.g. fiat, gold, coin, crypto
marketstringtehran, herat, sulaymaniyah, dubai, istanbul…
buy, sellnumberPrices in quote units; integers for IRT/IRR
change_pctnumberChange over 24 hours, percent
usdnumberEquivalent in free-market USD (where applicable)
sourcesintegerNumber of sources in the latest calculation
low_sourcesbooleanTrue when fewer than five sources were available
updated_atstringISO 8601 UTC time of the last update of this rate
quotestringUnit of the prices

The meta object

FieldDescription
as_ofTime of the snapshot (ISO 8601 UTC)
freshness_secData freshness of your plan; do not poll faster
quoteUnit used in this response

Endpoints

GET /assets

Parameters: category (optional). Returns symbol, code, name, name_fa, name_en, category, slug, unit, decimals, markets[].

GET /rates

Parameters: symbols (comma list), category, market, quote (IRT, IRR or an asset symbol), lang. Returns an array of rate objects (the reference market per asset unless market is set).

bash
curl -H "X-API-Key: $EZRATE_KEY" "https://api.ezrate.me/v1/rates?symbols=usd,eur,g18&quote=IRR&lang=en"

GET /rates/{symbol}

Parameters: market, quote, lang. Returns one rate object plus markets[] with the asset in every market.

GET /history/{symbol}

Parameters: interval (1h, 1d), from, to, market, quote (IRT/IRR). Returns candles {t, o, h, l, c} (sell side, UTC) and meta {symbol, interval, market, quote, count}.

GET /convert

Parameters: from, to (asset symbols or irt/irr), amount, side (buy, sell default, mid). Returns {from, to, amount, side, rate, inverse_rate, result, as_of}.

json
{ "data": { "from": "usd", "to": "eur", "amount": 100, "side": "mid",
           "rate": 0.0, "inverse_rate": 0.0, "result": 0.0, "as_of": "…" } }

GET /cross

Parameters: base, symbols. Returns {base, side: "mid", rates: {symbol: rate}} — how many units of each symbol one unit of base is worth.

GET /global

Parameters: base (default USD). International reference rates {base, rates: {EUR: "…"}, as_of} — not Tehran prices.

GET /markets/{symbol}

Returns the asset in each market: {market, name, buy, sell, diff_pct_vs_reference, updated_at}.

GET /usage

Returns {plan, day: {used, limit}, month: {used, limit}}. Does not count against your quota.

Overview card of all EZRate endpoints grouped by purpose
EZRate endpoints at a glance

Headers

HeaderMeaning
X-RateLimit-Limit-Day / X-RateLimit-Remaining-DayDaily quota and what is left
X-RateLimit-Limit-Month / X-RateLimit-Remaining-MonthMonthly quota and what is left
X-Data-FreshnessFreshness of the data you received
Retry-AfterSeconds to wait after a 429

Errors

json
{ "error": { "code": "validation_failed", "message": "…", "fields": { "quote": ["IRT, IRR or an asset symbol"] } } }
HTTPcodeWhen
401invalid_api_keyKey missing, wrong or revoked
403forbiddenRequest from an IP/domain not allowed for the key
404not_foundUnknown symbol or market, or asset not in the API
422validation_failedInvalid parameter; see fields
429rate_limitedPer-second or quota limit; see Retry-After and meta.reset_at

How to handle each one: financial API failover.

Notes

  • There is no WebSocket endpoint; rates refresh every 60 seconds. See WebSocket vs REST.
  • Plan quotas, freshness and history depth are listed on the API page.
  • Never call the API from browsers with your key: securing API keys.
Example 429 response in a terminal with Retry-After and reset_at
A rate-limited response, headers included
US Dollar270,000Toman+2.51%

Related live rates: US dollar rate, 18K gold price, Emami coin price.

What is the base URL of the EZRate API?
https://api.ezrate.me/v1
How do I authenticate?
Send your key in the X-API-Key header or as Authorization: Bearer.
What does a response look like?
Success responses are {data, meta}; errors are {error: {code, message, fields?}}.
Does /usage count against my quota?
No.
Ersan Fazli
I work in software development and programming, with a strong interest in building practical and efficient solutions. My focus is on developing new features, improving system performance, and solving technical challenges using modern technologies. I strive to create reliable, scalable, and high-quality software through continuous learning and the application of modern development practices.
All posts by author →

Comments (0)

Comments are shown after review. Sign-in is needed to send.

Related

API & Developers
EZRate API Quickstart: From API Key to Your First Live Request in 5 Minutes
API & Developers
Iranian Rial Exchange Rate API: The Complete Guide to IRR and Toman Rates
Crypto
Is a Crypto Wallet Traceable? How Wallet Tracking and Owner Lookup Really Work