How to Effectively Get Jaipur Gold 24k (JAIP-24k) Historical Prices using this API
Building a reliable pricing history for Jaipur Gold 24k (JAIP-24k) is a practical need across jewelry retail, bullion trading, and fintech research. In many workflows, you need to chart historical prices, compute moving averages, validate procurement costs, reconcile ERP inventory valuations, or trigger risk alerts tied to local gold markets. This guide shows you how to effectively get Jaipur Gold 24k historical prices using Metals-API data—specifically by leveraging Gold (XAU) historical and time-series endpoints, optionally adjusting to Indian Rupee (INR) and grams, and mapping 24k purity via carat-aware logic. You will learn how to: query historical XAU data, interpret timestamps and units, bridge from troy ounces to grams, incorporate 24k purity (carat) semantics, and implement caching and error handling for robust production systems. If you are new to the platform, you can register for a free API key at the Metals-API Website and consult the full Metals-API Documentation as you build.
What does “Jaipur Gold 24k (JAIP-24k)” mean in practice?
In many markets, “Jaipur Gold 24k” is shorthand for pure gold prices quoted in the Jaipur region. From a data-integration standpoint, you should confirm whether there is a dedicated exchange-grade symbol for this local quote or whether you should derive it from a global benchmark like XAU (Gold) plus currency conversion and any local market adjustments (premiums, GST, making charges, logistics, and liquidity spreads). Metals-API provides a comprehensive Metals-API Supported Symbols list; always verify if a “JAIP-24k” or equivalent localized symbol is officially supported. If it’s not listed, you can still build a robust Jaipur 24k history by:
- Starting from XAU (global gold) historical rates.
- Converting to INR if your ERP, storefront, or reporting is INR-native.
- Adjusting for purity via carat logic (24k is effectively pure gold) using the Carat feature conceptually for alignment.
- Applying your own local-market basis adjustments where required (outside the scope of raw API quotes).
This approach delivers traceable, auditable, and consistent time series that can fuel dashboards, pricing engines, and research models in fintech and manufacturing alike.
Before you start: key concepts for Gold (XAU) data
Gold (XAU) is quoted in troy ounces in Metals-API. When you pull historical XAU data, you will receive exchange rates with the base currency as USD by default, represented as “per troy ounce” in the unit field of the response. That means the “rate” value for XAU tells you how many troy ounces one USD would buy at that time, not the USD per troy ounce price directly. To obtain USD per troy ounce, invert the rate (1 / XAU rate). This detail is crucial when you convert to grams, kilograms, or when performing INR conversions.
- Unit: per troy ounce. 1 troy ounce = 31.1034768 grams.
- Base: USD by default (ensure your systems interpret this correctly).
- Purity: 24k denotes pure gold; XAU inherently represents pure gold benchmark pricing.
- Timezone and timestamps: Responses include a timestamp and date string—standardize to UTC in your storage and processing layers for consistency.
Use case: backfilling Jaipur 24k gold historical prices for analytics and pricing
Let’s say you need to create a 3-year daily time series for a Jaipur jewelry storefront that benchmarks product markup against wholesale 24k gold levels. The practical method is:
- Query XAU historical or time-series rates over your date range.
- For each date:
- Invert to get USD/oz if needed for display.
- Optionally convert to INR per gram for India-local operations:
- USD/oz => USD/gram (divide by 31.1034768).
- USD/gram => INR/gram (apply USD/INR FX where supported or via conversion endpoint).
- Apply any local market basis adjustments your business uses outside of the raw spot benchmark.
- Store the normalized series in your data warehouse or cache for pricing engines, dashboards, and alerts.
Step 1: verify symbols and capabilities
Always start by validating whether a dedicated Jaipur 24k symbol exists. Visit the Metals-API Supported Symbols page and search for either a localized Indian benchmark symbol or the standard XAU. If Jaipur-specific symbols are not listed, proceed with XAU as your canonical series for 24k gold, and perform currency conversions and unit normalization, as covered below.
Step 2: get historical and time-series XAU data
For bulk backfilling, the time-series feature is the most efficient path because you can retrieve daily historical rates between two dates. The historical-by-date feature is also available for single-date retrievals (e.g., for point-in-time reconciliation or gap-filling).
Example: single-date historical XAU retrieval
Use this pattern to fetch the historical rate for a given date. Remember, rates are per troy ounce and relative to USD in the default base.
curl "https://metals-api.com/api/2026-09-14?access_key=YOUR_API_KEY&symbols=XAU"
Typical JSON response:
{
"success": true,
"timestamp": 1789346519,
"base": "USD",
"date": "2026-09-14",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Field usage:
- success: boolean signaling successful retrieval.
- timestamp: epoch seconds at which the snapshot applies; store this alongside the date for auditability.
- base: currency of the quote, typically USD.
- date: ISO date of the historical snapshot.
- rates.XAU: amount of gold (in troy ounces) per 1 USD on that date.
- unit: confirms the price unit reference (“per troy ounce”).
Example: time-series retrieval for batch backfill
To retrieve a range for daily rates, use the time-series query:
curl "https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&start_date=2026-09-08&end_date=2026-09-15&symbols=XAU,XAG,XPT"
Representative JSON response:
{
"success": true,
"timeseries": true,
"start_date": "2026-09-08",
"end_date": "2026-09-15",
"base": "USD",
"rates": {
"2026-09-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-09-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-09-15": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Implementation tips:
- Iterate over the rates object by date; if a date is missing (e.g., weekend/holiday), design your system to carry forward previous values or mark as market-closed, based on your analytics needs.
- Normalize all outputs into a canonical metric for storage (e.g., INR/gram for Jaipur workflows, or USD/oz for global comparability).
- Persist the unit and base at the dataset level to prevent downstream confusion.
Step 3: normalize XAU to Jaipur 24k conventions (units, currency, purity)
Because 24k equals pure gold, you can directly interpret XAU data as 24k purity for pricing benchmarks. Your main adjustments typically involve units (grams) and local currency (INR). While Metals-API returns data relative to USD by default, you can compute INR-denominated values by applying currency conversion logic in your stack or by using the convert endpoint conceptually to translate USD amounts to XAU or vice versa. Consult the Metals-API Documentation for up-to-date conversion parameter details supported by your plan.
From XAU (USD base) to INR per gram for Jaipur workflows
- Invert the XAU rate to get USD per troy ounce:
- usd_per_oz = 1 / rates.XAU
- Convert USD per troy ounce to USD per gram:
- usd_per_g = usd_per_oz / 31.1034768
- Convert USD per gram to INR per gram:
- inr_per_g = usd_per_g * USDINR_rate for that date.
If you need to convert money to metal or vice versa, the convert endpoint can be used in workflows where you have a known currency amount and want a metal quantity (or the reverse), as illustrated below.
Convert endpoint illustration
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1789432919,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
How to use it:
- query.from and query.to define direction (currency to metal, metal to currency, or currency to currency if supported).
- amount is the numeric value to convert.
- info.rate is the exchange rate used for the conversion.
- result is the converted amount in the target unit (troy ounces for XAU).
If your end-goal is INR/gram pricing visibility, compute the INR/USD exchange rate for each date and apply it to the USD/gram series you derive from XAU. This keeps your metals time series directly comparable with your INR-based financial statements, procurement, and sales systems.
Optional: Carat-aware gold rates and 24k parity
Metals-API includes a Carat feature designed to retrieve gold rates by carat. Conceptually, 24k equals ~99.99% purity and aligns with pure gold (XAU). When your organization needs 22k, 18k, etc., you can scale from 24k using carat ratios or use the Carat feature where supported to avoid manual purity math. For 24k Jaipur workflows, no downscaling is required—just treat XAU as your 24k benchmark and convert units/currencies as needed.
Advanced analytics: OHLC, Bid/Ask, Fluctuation, and intraday considerations
Depending on your plan, you can enrich Jaipur gold analytics beyond daily closes:
- Open/High/Low/Close (OHLC) provides candlestick-style granularity for selected periods.
- Bid/Ask provides insight into current spreads that can impact executable prices or retail markups.
- Fluctuation quantifies day-over-day changes over a window, useful for alerting and volatility models.
- Intraday data supports higher-frequency trading tools and dynamic e-commerce repricing.
OHLC example for gold
{
"success": true,
"timestamp": 1789432919,
"base": "USD",
"date": "2026-09-15",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
},
"XAG": {
"open": 0.03825,
"high": 0.0383,
"low": 0.0381,
"close": 0.03815
},
"XPT": {
"open": 0.000915,
"high": 0.000918,
"low": 0.00091,
"close": 0.000912
}
},
"unit": "per troy ounce"
}
Usage notes:
- All fields are still “per troy ounce” relative to USD by default; invert as needed to derive USD-per-oz values for charting.
- You can compute intraday ranges, true ranges, or session volatility directly from these values.
Bid/Ask example for spread-aware pricing
{
"success": true,
"timestamp": 1789432919,
"base": "USD",
"date": "2026-09-15",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
},
"XPT": {
"bid": 0.000911,
"ask": 0.000913,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Apply the spread to model executable prices, slippage, or retail markups. This can be important if your Jaipur storefront wants to peg making charges or inventory valuation to mid or to bid-based logic.
Fluctuation example for alerting and risk
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-08",
"end_date": "2026-09-15",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
},
"XAG": {
"start_rate": 0.03825,
"end_rate": 0.03815,
"change": -0.0001,
"change_pct": -0.26
},
"XPT": {
"start_rate": 0.000915,
"end_rate": 0.000912,
"change": -3.0e-6,
"change_pct": -0.33
}
},
"unit": "per troy ounce"
}
Key fields:
- start_rate and end_rate: your comparison anchors.
- change and change_pct: absolute and percentage moves across the window.
Convert these to INR/gram or USD/oz midstream for localized thresholds and notifications in Jaipur-specific operations.
Latest rates for heuristic checks and intraday dashboards
For real-time boards or sanity checks against your historical pipeline, pull the latest endpoint for XAU and related metals. Update frequency depends on your plan tier.
{
"success": true,
"timestamp": 1789432919,
"base": "USD",
"date": "2026-09-15",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744,
"XCU": 0.294118,
"XAL": 0.434783,
"XNI": 0.142857,
"XZN": 0.344828
},
"unit": "per troy ounce"
}
Practical uses:
- Spot-check your Jaipur series against live benchmarks.
- Render a live dashboard for traders or merchandisers.
- Feed alerting when the latest deviates meaningfully from rolling averages.
Example JavaScript fetch for time-series XAU
The snippet below demonstrates fetching a time range for XAU and then converting to USD/oz and USD/gram in your client or server code. Adapt it to compute INR/gram by applying your USD/INR rate per date.
async function fetchXauTimeseries(start, end) {
const url = `https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&start_date=${start}&end_date=${end}&symbols=XAU`;
const res = await fetch(url, { timeout: 15000 });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
if (!data.success) {
const err = (data.error && data.error.info) ? data.error.info : 'Unknown API error';
throw new Error(err);
}
const out = [];
const OZ_PER_TROY_OUNCE = 1; // logical identity for clarity
const GRAMS_PER_TROY_OUNCE = 31.1034768;
for (const [date, daily] of Object.entries(data.rates)) {
const xauRate = daily.XAU; // troy ounces per USD
if (!xauRate) continue;
const usdPerOz = 1 / xauRate;
const usdPerGram = usdPerOz / GRAMS_PER_TROY_OUNCE;
out.push({
date,
usdPerOz,
usdPerGram
// Extend: multiply by USDINR(date) for inrPerGram
});
}
return { base: data.base, unit: data.unit, rows: out };
}
Production tip: if you also ingest daily USD/INR FX, merge on date to produce INR/gram for Jaipur reporting and pricing. Keep a well-defined rounding and decimal policy to avoid reconciliation issues across systems.
Handling weekends, holidays, and market closures
Metals markets can show reduced liquidity on weekends and holidays. In time-series results, you may observe missing dates or unchanged rates. Your application should implement a policy for these cases:
- Charting: either skip non-trading days or forward-fill last close for smooth plotted lines with explicit annotation.
- Pricing engines: decide whether to freeze prices on closures or apply a different source; always log the policy for audits.
- Analytics: ensure moving averages and volatility calculations are aware of missing points to avoid bias.
Caching, throttling, and data quality in production
To scale a Jaipur 24k gold integration efficiently:
- Cache all historical responses by date and symbol; historical data is immutable, so it’s safe to cache indefinitely.
- Rate-limit your latest or intraday polling according to your subscription tier to prevent throttling.
- Normalize and validate: always sanity-check units (troy ounces vs grams) and detect outliers to protect downstream pricing.
- Implement retries with backoff for transient network errors; log the request URL, timestamp, and correlation IDs where applicable.
Error handling patterns and common pitfalls
- Empty rates or missing dates: treat as market closure or data unavailability; document your fill-forward strategy.
- Incorrect unit math: remember XAU is returned as troy ounces per USD; invert to USD per troy ounce before converting to grams.
- Assuming unsupported symbols: always verify with the Supported Symbols index. If JAIP-24k is not listed, derive Jaipur pricing from XAU plus currency conversion and your business’s local adjustments.
- Timezone drift: standardize timestamps to UTC in your store to avoid off-by-one-date bugs around local midnights.
Security and compliance best practices
- Protect your access key: load from environment variables or a secure vault; never hard-code in client-side apps that ship to browsers.
- Server-side proxy: route Metals-API calls via your backend to avoid exposing keys and to centralize caching/throttling.
- Data lineage: store the API timestamp, date, and raw response segment used to compute each published value for audit and reconciliation.
End-to-end example: assembling a Jaipur 24k daily series
- Pull XAU via time-series for your full historical window.
- For each date:
- Compute USD/oz = 1 / XAU_rate.
- Compute USD/gram = USD/oz / 31.1034768.
- Apply USD/INR for that date if you need INR/gram.
- Store fields: date (UTC), USD/oz, USD/gram, INR/gram (if calculated), base, unit, source timestamp.
- Optional: integrate OHLC for candlestick analytics, bid/ask for spread-aware pricing, and fluctuation for alerts.
This method yields a consistent Jaipur 24k series suitable for pricing logic, dashboards, and research, even when a specific “JAIP-24k” symbol is not enumerated in the public symbols list.
Additional examples: endpoint responses you will likely use
Historical (single date) for reconciliation
{
"success": true,
"timestamp": 1789346519,
"base": "USD",
"date": "2026-09-14",
"rates": {
"XAU": 0.000485
},
"unit": "per troy ounce"
}
Use this to backfill a missing day or to validate a particular accounting entry date in your ERP.
Time-series for rolling analytics
{
"success": true,
"timeseries": true,
"start_date": "2026-09-08",
"end_date": "2026-09-15",
"base": "USD",
"rates": {
"2026-09-08": { "XAU": 0.000485 },
"2026-09-09": { "XAU": 0.000484 },
"2026-09-10": { "XAU": 0.000483 },
"2026-09-11": { "XAU": 0.000483 },
"2026-09-12": { "XAU": 0.000483 },
"2026-09-13": { "XAU": 0.000483 },
"2026-09-14": { "XAU": 0.000485 },
"2026-09-15": { "XAU": 0.000482 }
},
"unit": "per troy ounce"
}
Note the potential repetition across non-trading days; design your MA/EMA calculations to work with this cadence.
Fluctuation for risk triggers
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-08",
"end_date": "2026-09-15",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Directly usable for percentage-change-based notifications in your Jaipur e-commerce or trading tools.
Performance and scaling strategies
- Batch your time-series requests by quarter or year when backfilling long ranges.
- Deduplicate storage: maintain a keyed store by (date, symbol, base) to avoid duplicates.
- Pre-compute derived measures (USD/oz, USD/g, INR/g) and index them for rapid UI rendering.
- Use an in-memory cache (e.g., Redis) for hot ranges like the last 30 days; archive older data in your data warehouse or object storage.
Interoperability with analytics stacks
Gold pricing data becomes more powerful when fused with market research and macro indicators. Here are a few external resources that can complement your Jaipur 24k analysis:
- Investopedia overview of gold as an asset for educational context.
- LBMA for standards and market structure reference.
- BIS statistics for macro-financial indicators that may correlate with gold movements.
Use this context to design factor models, hedging rules, or demand-forecasting overlays for Jaipur retail seasons and festival-driven cycles.
A note on digital transformation and gold (XAU)
Digital transformation in precious metals hinges on data fidelity and integration discipline. With Metals-API, you can cleanly pipe XAU into trading algorithms, fintech apps, manufacturing ERPs, or jewelry e-commerce platforms. Real-time and historical endpoints, plus features like OHLC and Bid/Ask, enable next-generation price discovery, analytics, and digital asset solutions. By constructing a canonical Jaipur 24k pipeline from XAU—with explicit unit, currency, and purity semantics—you unlock interoperable datasets that scale across pricing, inventory, and research domains.
Get started
Sign up for an API key on the Metals-API Website, review the Metals-API Documentation, and confirm the gold symbol coverage at the Supported Symbols directory. Even if a dedicated “JAIP-24k” symbol is not listed, you can derive an authoritative Jaipur 24k historical series from XAU with the steps outlined above.
FAQ
Is there a direct “JAIP-24k” symbol in Metals-API?
Check the Supported Symbols. If it’s not present, use XAU (pure gold) plus currency/unit normalization and any business-specific local adjustments for Jaipur.
Are the returned XAU values USD per ounce?
No. Rates are “per troy ounce” relative to the base (USD by default). The XAU number tells you how many troy ounces one USD buys. Invert to get USD per troy ounce.
How do I convert to INR per gram?
Derive USD/oz by inverting XAU, divide by 31.1034768 for USD/gram, then multiply by the USD/INR rate for the date to get INR/gram.
How should I handle weekends and holidays?
Expect missing or unchanged values. Decide on a policy—skip, forward-fill, or annotate closures—and apply consistently across analytics and pricing.
Can I get intraday or bid/ask data for tighter pricing?
Yes, depending on your plan. Use the Intraday, Bid/Ask, and OHLC features to refine execution assumptions, spreads, and candlestick analytics.
Where can I get a free key to test?
Visit the Metals-API Website to create an account and obtain an API key. Then explore the Documentation for endpoint parameters and usage guidelines.