Freelance website & app developer in Lucknow · 250+ websites since 2019 Free consultation →

Live Gold Rate API for Jewellery Websites in India: How It Works

Where live rates come from, how 22K and 18K are derived from 24K, and what jewellers should check before choosing an API.

Gold & Silver Rate LiveToday's live 24K, 22K, 18K gold, silver and platinum rates.

Customers check today's gold rate before they visit a jewellery shop — often on the shop's own website. A live rate on your homepage builds trust and brings repeat visits, but only if it is accurate and up to date. This guide explains how a gold rate API works in India, how 22K and 18K rates are derived, and what to check before you choose one.

Where live gold and silver rates come from

In India, jewellers typically follow one of three reference points:

  • MCX futures prices — gold and silver contracts traded on the Multi Commodity Exchange. They move live during market hours and are available through broker APIs.
  • Association benchmark rates — for example the rates published by the India Bullion and Jewellers Association (IBJA), announced at fixed times of day.
  • Local bullion / association rates — city jewellers' associations that announce a daily rate.

The 2nd Code Gold & Silver Rate API uses live MCX data, converted into ready-to-display rates, so the numbers move with the market instead of being typed in once a day.

How 24K, 22K and 18K rates are calculated

Karat measures purity out of 24. The rate for lower karats is derived from the 24K rate by purity:

KaratPurityCommon nameFormula
24K99.9%Fine goldBase rate
22K91.6%"916" gold24K × 22 ÷ 24
18K75%"750" gold24K × 18 ÷ 24

Gold rates are usually quoted per 10 grams and silver per kilogram. Rates from an API are base metal rates; GST (currently 3% on gold jewellery) and making charges are added on top by the jeweller. Always confirm current GST rates with your accountant.

What to check before choosing a gold rate API

  • Source transparency: do you know where the rate comes from?
  • Refresh frequency: live during market hours, and a sensible "last updated" when the market is closed.
  • Units: per gram, per 10 grams or per kg — mismatched units are the most common display bug.
  • No hidden margins: you should know whether any adjustment is applied, so the rate on your site matches what you charge in-store.
  • Security: API keys bound to your domain, expiry dates and the ability to deactivate a key.
  • Simple JSON: easy to use in PHP, WordPress, Shopify custom code or a mobile app.

What a good response looks like

{
  "success": true,
  "gold_24k": 0,
  "gold_22k": 0,
  "gold_18k": 0,
  "silver": 0,
  "platinum": 0,
  "updated_at": "YYYY-MM-DD HH:MM:SS"
}

Integer values (no decimals) are easy to format in rupees, and a timestamp lets you show "Updated 2 minutes ago" next to the rate.

Security: never expose your key

The API key identifies your business. If you call the API directly from browser JavaScript, anyone can copy the key from the page source. The right pattern is a small server-side proxy that calls the API, caches the result for 30–60 seconds and passes only the numbers to your page. We show the full code in how to show live gold & silver rates on your website.

Beyond the rate widget

A live rate can power more than a banner: automatic product pricing by weight, gold savings schemes, SMS rate alerts, and price-locked bookings.

Developer: Nityanand

Quick answers

How is the 22K gold rate calculated from 24K?

By purity: 22K is 22/24 of pure gold (about 91.67%), so 22K rate ≈ 24K rate × 22 ÷ 24. 18K uses 18 ÷ 24 (75%).

Does the API rate include GST and making charges?

No. The API returns base metal rates. GST and making charges are added by the jeweller on top.

Related guides

How to Show Live Gold & Silver Rates on Your Website (PHP + JS)A secure server-side proxy, a tiny cache and a front-end widget — the right way to show live rates.

Enquiry

Want a website or app for your business?

We build every type of website and application — business websites, online stores, booking systems, apps and custom software — at good, customised rates for your requirement. Fill the enquiry form, or call / WhatsApp us.