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:
| Karat | Purity | Common name | Formula |
|---|---|---|---|
| 24K | 99.9% | Fine gold | Base rate |
| 22K | 91.6% | "916" gold | 24K × 22 ÷ 24 |
| 18K | 75% | "750" gold | 24K × 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.
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.