Live metal rates API

A simple JSON API over HTTPS. Indicative spot prices, refreshed every 60 seconds.

Getting started

  1. Create your account at liveratesapi.amarsoft.cloud/account and start the free trial or choose a plan.
  2. Copy your key when it is shown (it is shown once). If you lose it, make a new one from your account.
  3. Send your first request:
curl "https://rates.amarcp.ae/v1/latest?metals=gold¤cy=AED&unit=gram" \
  -H "Authorization: Bearer amr_xxxx_your_key"

Base URL: https://rates.amarcp.ae

Want to be sure your key works? Test it here.

Authentication

Every request carries your key in the header: Authorization: Bearer amr_<prefix>_<secret>. Never put the key in the URL or in code that runs in your customers' browser; call the API from your server.

GET/v1/latest

Latest price for one or more metals.

ParamValuesDefault
metalsgold, silver, platinum, palladium (comma list)gold
currencyAED, SAR, USD, KWD, QAR, BHD, OMR, EUR, GBP, INRUSD
unitoz, gram, kg, tolaoz
{
  "as_of": "2026-11-21T09:30:00Z",
  "fetched_at": "2026-11-21T09:30:04Z",
  "age_seconds": 3,
  "stale": false,
  "stale_after_seconds": 600,
  "market_open": true,
  "currency": "AED",
  "unit": "gram",
  "fx": {"rate_per_usd": 3.6725, "as_of": "2026-11-21T09:30:00Z"},
  "rates": {"gold": {
    "price": 312.9588, "bid": null, "ask": null, "as_of": "2026-11-21T09:30:00Z",
    "day": {"open": 311.2, "high": 314.05, "low": 310.6, "prev_close": 311.0,
            "change": 1.9588, "change_pct": 0.63, "since": "2026-11-20T22:00:00Z"},
    "karats": {"24": 312.9588, "22": 286.879, "21": 273.8389, "18": 234.7191}
  }}
}

GET/v1/history

Prices over a time range (Pro and Enterprise plans).

ParamDescription
metal, currency, unitas in /v1/latest (one metal).
fromISO time, required.
toISO time, default now.
intervalraw (≤ 7 days), hour (≤ 93 days), day (≤ 10 years)

Each point is the closing tick of its bucket. How far back you can go depends on your plan (history_days).

curl "https://rates.amarcp.ae/v1/history?metal=gold¤cy=AED&unit=gram&from=2026-11-01T00:00:00Z&interval=day" \
  -H "Authorization: Bearer $AMR_KEY"

GET/v1/account

Your subscription: plan, starts_at, ends_at, active, monthly_quota, used_this_month, remaining_this_month, quota_resets, metals, history_days, rate_limit_per_min. Not counted against your quota and still answers after expiry.

GET/v1/health

No key. 200 {"status":"ok"} when fresh, 503 when stale. For uptime monitors.

Quota & limits

Every /v1/latest and /v1/history reply carries:

X-Quota-Limityour monthly quota
X-Quota-Remainingleft this month
X-Quota-Resetwhen it resets (1st of the month, UTC)

Over the per-minute limit you get 429 rate_limited with Retry-After. When the monthly quota is used, 429 quota_exceeded until the 1st — or upgrade from your account.

Errors

Error body: {"error": {"code": "...", "message": "..."}}

HTTPcodemeaning
401missing_key / invalid_keyno key, unknown or revoked
403subscription_expired / not_startedoutside your plan's start/end dates
403metal_not_in_plan / history_range_not_in_planyour plan does not include it
403history_not_allowedyour plan has no history
400bad_metal / bad_currency / bad_unit / bad_range / range_too_longbad parameters
429rate_limitedper-minute limit; see Retry-After
429quota_exceededmonthly quota used; Retry-After = seconds to the 1st
503no_data / no_fxno price available yet

Stale prices

Every reply has as_of and stale. stale is true when the last good price is older than stale_after_seconds (10 minutes while the market is open, 72 hours over the weekend) or the FX rate is older than 36 hours. Never show a stale price as live.

Prices are indicative, for information and business use, not an offer to trade. · Data sources