Gold and coin API

Gold and coin price API: a live gold price web service

Bring the price of 18 karat gold, the world gold ounce, melted gold and Emami, Azadi, half, quarter and gerami coins, in Toman and USD, into your site, shop or app with one simple request. Start free!

  • Prices in Toman and USD, as JSON
  • Updated every few minutes, with the time in the response
  • A free plan after e-mail verification
GET /v1/prices?slugs=gold-gerami-18
$ curl -s "https://api.arzdigital.com/v1/prices?slugs=gold-gerami-18" \
  -H "X-API-Key: $ARZ_API_KEY"
HTTP/2 200
x-credits-charged: 1
x-credits-remaining: 299
x-ratelimit-limit: 5
x-ratelimit-remaining: 4

{
  "status": "success",
  "data": {
    "gold-gerami-18": {
      "symbol": "GOLD18",
      "name": "18 Karat Gram Gold",
      "display_name": "18 Karat Gram Gold",
      "change_24h": -0.86,
      "change_irt_24h": -2.04,
      "price": 86.74,
      "price_irt": 25952000,
      "updated_at": "2026-11-30T11:08:37.000Z"
    }
  }
}

Prices right now

AssetTomanUSD24h change in TomanUpdated
18 karat gold25,781,00087.19-0.60%6 minutes ago
24 karat gold34,371,000116.24-0.60%6 minutes ago
Melted gold111,920,000378.88-0.99%10 minutes ago
Gold ounce1,090,864,5953,655.1-1.25%27 minutes ago
Emami coin263,000,000890.32-0.75%10 minutes ago
Half Azadi coin140,000,000473.93-0.71%10 minutes ago
Quarter Azadi coin75,000,000253.89-0.66%10 minutes ago

What data does the gold price API return?

The ArzDigital gold price API returns each kind of gold by its slug. The table shows each kind with the unit its price is in; send any slug in the slugs parameter of /v1/prices. If you need a simple, dependable API for gold prices, these few slugs are enough for your site or app. Coins have their own table in the coin section.

AssetSlugUnit
18 karat goldgold-gerami-18Per gram
24 karat goldgold-gerami-24Per gram
22 karat goldgold-gerami-22Per gram
21 karat goldgold-gerami-21Per gram
14 karat goldgold-gerami-14Per gram
Melted goldmelted-gold-mithqalPer mithqal (4.608 g)
Gold ouncegold-ouncePer troy ounce (31.1 g)

Every price comes in Toman (price_irt) and USD (price) and updates every few minutes. For Rial, multiply the Toman price by 10.

Live prices for 18 karat and melted gold

18 karat gold (slug gold-gerami-18) is the most used price in Iran's gold market, and the 18 karat gold price API returns it per gram. 18 karat means 750 parts in 1000 are pure gold. 14, 21, 22 and 24 karat gold have their own slugs, and gold-gerami-24 is the price of a gram of pure gold.

Melted gold (slug melted-gold-mithqal) is priced by the mithqal. In Iran's gold market a mithqal is 4.608 grams, and its price is the basis for trading melted gold and for pricing in many gold shops; the melted gold price API returns it in Toman and USD. The gold ounce (gold-ounce) is the world market price of a troy ounce, about 31.1 grams, of pure gold.

"Live" has a plain meaning here: each asset updates from the market data feed every few minutes, and the updated_at field of every response says when it last did. Your live gold price API always knows how old the price it shows is and can tell a stale price from a fresh one.

Next to the Toman and USD prices, each asset also carries its 24-hour change in Toman (change_irt_24h) and USD (change_24h), which is what you need to show a price going up or down beside each product.

Coin price API: Emami, Azadi, half, quarter and gerami

Get the price of the Emami coin, the full Bahar Azadi coin, the half and quarter coins and the gerami coin in Toman and USD. All coins can be asked for in one /v1/prices call, and the gold and coin price API returns both together.

AssetSlugUnit
Emami coinemami-goldPer coin
Full Bahar Azadi coinazadi-gold-fullPer coin
Half Azadi coinazadi-gold-halfPer coin
Quarter Azadi coinazadi-gold-quarterPer coin
Gerami coingerami-goldPer coin
curl -sS "https://api.arzdigital.com/v1/prices?slugs=emami-gold,azadi-gold-half" \
  -H "X-API-Key: YOUR_API_KEY"
Example response
{
  "status": "success",
  "data": {
    "emami-gold": {
      "symbol": "EMAMI",
      "name": "Emami Gold Coin",
      "display_name": "Emami Gold Coin",
      "change_24h": -0.77,
      "change_irt_24h": -1.85,
      "price": 885.7,
      "price_irt": 265000000,
      "updated_at": "2026-11-30T11:00:19.000Z"
    },
    "azadi-gold-half": {
      "symbol": "½AZADI",
      "name": "½Azadi",
      "display_name": "½Azadi",
      "change_24h": -0.66,
      "change_irt_24h": -1.74,
      "price": 471.26,
      "price_irt": 141000000,
      "updated_at": "2026-11-30T11:00:19.000Z"
    }
  }
}

Each coin's premium, the gap between its market price and the value of its gold, has a slug of its own: emami-gold-premium, azadi-gold-premium, azadi-half-premium, azadi-quarter-premium and gerami-gold-premium, and 18k-gold-premium for 18 karat gold. Parsian coins from 100 sot to 2.1 grams have slugs too, such as parsian-coin-500-sot.

Gold price API: a sample request and response

This request gets 18 karat gold, melted gold and the Emami coin together for 1 credit. Send the key in the X-API-Key header and make the call from your server, not the browser.

curl -sS "https://api.arzdigital.com/v1/prices?slugs=gold-gerami-18,melted-gold-mithqal,emami-gold" \
  -H "X-API-Key: YOUR_API_KEY"
Example response
{
  "status": "success",
  "data": {
    "gold-gerami-18": {
      "symbol": "GOLD18",
      "name": "18 Karat Gram Gold",
      "display_name": "18 Karat Gram Gold",
      "change_24h": -0.86,
      "change_irt_24h": -2.04,
      "price": 86.74,
      "price_irt": 25952000,
      "updated_at": "2026-11-30T11:08:37.000Z"
    },
    "melted-gold-mithqal": {
      "symbol": "MGOLD",
      "name": "Melted Gold Mithqal",
      "display_name": "Melted Gold Mithqal",
      "change_24h": -1.05,
      "change_irt_24h": -2.13,
      "price": 376.91,
      "price_irt": 112770000,
      "updated_at": "2026-11-30T11:00:19.000Z"
    },
    "emami-gold": {
      "symbol": "EMAMI",
      "name": "Emami Gold Coin",
      "display_name": "Emami Gold Coin",
      "change_24h": -0.77,
      "change_irt_24h": -1.85,
      "price": 885.7,
      "price_irt": 265000000,
      "updated_at": "2026-11-30T11:00:19.000Z"
    }
  }
}

Full reference for the latest prices endpoint

Gold price history API

With the gold price history API, show a chart of 18 karat gold, a coin or the ounce on your site, or store the price trend for reports and analysis.

Get the price history of 18 karat gold from the chart endpoint: GET /v1/assets/gold-gerami-18/chart. Name the window in one of two ways; they cannot be combined:

  • range, for a window that ends now: 1d, 7d, 1m (30 days), 3m, 6m, 1y or all. The API picks the spacing of the points.
  • from and to (Unix seconds) with interval, the spacing of the points: 5m, 30m, 2h, 6h, 12h, 1d, 2d, 3d, 7d, 30d or 60d. One call returns at most 1000 points; split a longer window into several calls.

Each point has the time, the USD price (price_usd), the Toman rate of one dollar (irt_rate) and the price in Bitcoin (price_btc); the Toman price of a point is price_usd times irt_rate. A chart costs by its points: 1 credit per 100.

How far back you can go depends on the plan: Free: Latest only; Basic: 1 year; Pro, Business, and Enterprise: Full history. A window older than your plan reaches returns error 1007 instead of partial data, and costs nothing.

Full reference for the chart and price history endpoint

curl -sS "https://api.arzdigital.com/v1/assets/gold-gerami-18/chart?range=1y" \
  -H "X-API-Key: YOUR_API_KEY"

Connect the gold price API to your site and gold shop

The most common use of an API for gold prices is keeping a shop's product prices current. A gold product's price is usually built from its weight, karat, making charge, the seller's margin and tax, and of these only the day's gold price changes every few minutes. So fetch the price of a gram of 18 karat gold from the API and keep the rest of the formula in your own site.

The sample below is for WordPress and WooCommerce: it fetches the price on the server, keeps it in the WordPress cache (a transient) for 5 minutes and prices each product from its weight and making charge per gram. Add your margin and tax the way your shop calculates them.

functions.php
<?php
// Define ARZ_API_KEY in wp-config.php, never in a page or theme file.

// The price of a gram of 18 karat gold in Toman, cached for 5 minutes.
function arz_gold18_price() {
    $price = get_transient('arz_gold18');
    if ($price !== false) {
        return $price;
    }
    $response = wp_remote_get(
        'https://api.arzdigital.com/v1/prices?slugs=gold-gerami-18',
        ['headers' => ['X-API-Key' => ARZ_API_KEY], 'timeout' => 10]
    );
    if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {
        return null;
    }
    $data = json_decode(wp_remote_retrieve_body($response), true);
    $price = $data['data']['gold-gerami-18']['price_irt'] ?? null;
    if ($price) {
        set_transient('arz_gold18', $price, 5 * MINUTE_IN_SECONDS);
    }
    return $price;
}

// Price = weight x (gold price + making charge), both per gram, from the
// product's _gold_weight and _gold_wage fields. Add your margin and tax here.
// price_irt is in Toman: multiply by 10 if the store's currency is Rial.
function arz_gold_product_price($price, $product) {
    $weight = (float) $product->get_meta('_gold_weight');
    $wage = (float) $product->get_meta('_gold_wage');
    $gold = arz_gold18_price();
    if (!$weight || !$gold) {
        return $price;
    }
    return round($weight * ($gold + $wage));
}
add_filter('woocommerce_product_get_price', 'arz_gold_product_price', 10, 2);
add_filter('woocommerce_product_get_regular_price', 'arz_gold_product_price', 10, 2);

A server-side cache does two things: pages do not wait for the API on every visit, and your credits are spent per price update, not per visitor. If your site is not WordPress, the same logic works in any language. The API sends no CORS headers, so calling it from browser JavaScript does not work and would expose your key.

Free gold price web service

To start, the free gold price web service is enough: every gold and coin slug is in the free plan, and it starts when you verify your e-mail. The free gold price API has these limits:

300 free requests a day

Each call to /v1/prices returns up to 100 assets for 1 credit: gold, the dollar and Bitcoin together.

5 requests a minute

Enough to fetch prices on a schedule from your server; each asset updates every few minutes.

The latest data only

The free plan returns the latest price. History and charts come with the paid plans.

One key, after e-mail verification

Sign up and verify your e-mail; the free plan starts at once and you can create a key.

The free gold price API runs short when you need price history, more requests a day than the free allowance, a higher per-minute limit, or several keys for several sites and environments. Then choose a paid plan.

Buy the gold price API: plans and prices

To buy the gold price API, choose a plan by how many requests you make and how much history you need. A gold shop that fetches the price every few minutes on its server and caches it usually gets by on the free or Basic plan. If you need full price history, a higher request limit or several keys for several shops, Pro fits better. 10% VAT is added to every plan's price.

PlanPriceCreditsRequests per minuteHistoryAPI keys
FreeFree300a day5Latest only1
Basic30,000,000 IRR150,000every 30 days1201 year2
Pro250,000,000 IRR1,000,000every 30 days300Full history5
Business600,000,000 IRR5,000,000every 30 days600Full history10
EnterpriseCustom price and termsCustomCustomFull historyCustom

Prices exclude tax; 10% VAT is added at checkout.

Gold and silver price API

The silver ounce, platinum and palladium are in the same API, with the same key, in the same /v1/prices call as gold. The details are on the silver price API page.

Other markets

Gold price API: frequently asked questions

Is the gold price API free?

Yes. The free plan has every gold and coin slug: 300 free requests a day, 5 requests a minute and the latest data only. Price history comes with the paid plans.

How often is the gold price updated?

Every few minutes. The updated_at field in the response says when each asset last updated.

Where do the gold and coin prices come from?

From the ArzDigital market data feed. 18 karat gold, melted gold and the coins are Iranian market prices in Toman; the gold ounce is the world market price.

Which coins are covered?

The Emami, full Bahar Azadi, half, quarter and gerami coins, the premium of each, and Parsian coins from 100 sot to 2.1 grams.

How far back does gold price history go?

It depends on the plan: Free: Latest only; Basic: 1 year; Pro, Business, and Enterprise: Full history. Get it from /v1/assets/gold-gerami-18/chart.

How do I keep my shop's product prices up to date automatically?

Fetch the price of a gram of gold from the API on your server, cache it for a few minutes and price each product from its weight and making charge. A PHP sample for WordPress and WooCommerce is on this page.

Start with 300 free requests a day

Sign up free