Get Bhopal Gold 24k (BHOP-24k) - Per Gram Daily Close Historical Prices using this API
If you price jewelry, hedge inventory, or publish benchmark indexes for the Bhopal market, you need one thing every morning: accurate, per-gram 24k gold daily close. This guide shows how to fetch Bhopal Gold 24k (BHOP-24k) per gram daily close historical prices with Metals-API, aggregate them into a clean research dataset, and operationalize the feed into dashboards, pricing engines, and ERP pipelines. We will focus on time-series and OHLC endpoints, walk through request/response payloads, and detail production concerns like units (troy ounce vs gram), base currency, time zones, caching, and weekend handling. For symbol details, always verify BHOP-24k is available on the Metals-API Supported Symbols. If you do not yet have an API key, visit the Metals-API Website and grab a free key to follow along.
What you will build: Bhopal 24k per-gram daily close history
By the end of this tutorial, you will have a repeatable workflow that:
- Pulls BHOP-24k historical daily close prices per gram over your chosen period.
- Handles base currency selection (e.g., INR vs USD) consistently across requests.
- Normalizes dates, time zones, and market closures into a stable time series.
- Stores clean JSON for analytics and downstream integrations (BI tools, pricing services, and reconciliation tasks).
We will use these Metals-API endpoints:
- Time-Series Endpoint: pull daily BHOP-24k closes across a start and end date.
- OHLC Endpoint: fetch the daily open, high, low, and close for BHOP-24k on specific dates.
- Historical Rates Endpoint: retrieve BHOP-24k daily close for a single historical date.
For a full overview of endpoints and parameters, refer to the Metals-API Documentation. If you need to confirm symbol availability and formatting, consult the Metals-API Supported Symbols.
Why BHOP-24k per gram daily close data matters
In gold-heavy retail markets, especially where 24k coins/bars and investment jewelry are popular, local benchmarks like BHOP-24k help unify pricing across shops, e-commerce catalogs, and trading tools. With standardized, API-delivered daily close values:
- Retailers can price items in real time and lock POs at the previous close when markets are shut.
- Quant teams can backtest markups and spread strategies on top of local fair values.
- Finance can reconcile inventory valuation with a consistent end-of-day mark.
- Product teams can build alerts, trend charts, and margin calculators without manual data pulls.
Before you start
- Get an API key: sign up on the Metals-API Website. You’ll pass this key via the access_key parameter.
- Verify the symbol: ensure BHOP-24k is available and spelled exactly as listed on the Metals-API Supported Symbols.
- Decide your base currency: BHOP-24k is typically quoted in INR per gram. If your downstream analytics use USD, decide whether to request in INR and convert later, or request directly in USD (base=USD) if supported for this symbol.
Key concepts: units, base, and timestamps
- Units: Always check the unit field in the API response. For troy-ounces-based symbols, you convert to grams via 1 troy ounce = 31.1034768 grams. For BHOP-24k, the unit is per gram if the symbol is a per-gram local benchmark; verify the unit from each response.
- Base currency: Response prices are quoted per unit of metal in the base currency (e.g., INR). Use a consistent base for storage to avoid mixing INR and USD in your history.
- Timestamps and dates: The date in historical/time-series/OHLC endpoints references the market date. Use the timestamp field to align records to UTC in your database and to reason about when the close was finalized.
- Weekends and holidays: Expect missing data when markets are closed. Fill using previous close or mark gaps explicitly, depending on your analytic requirements.
Endpoint 1: Time-Series (daily closes across a range)
The time-series endpoint retrieves daily historical rates between two dates. For BHOP-24k, this is the most efficient way to backfill a per-gram daily close dataset over a defined horizon (e.g., one quarter).
Purpose and functionality
Use this endpoint to:
- Fetch continuous daily close values for BHOP-24k between start_date and end_date.
- Populate chart data, drive rolling analytics (moving averages, drawdowns), or seed a pricing database.
- Detect gaps and market closures through missing or unchanged values.
Authentication
Pass your API key via access_key in the query string. Store keys securely (environment variables, vaults). Never commit keys to version control.
Parameters
- access_key: Your API key (required).
- symbols: Set to BHOP-24k (required for this use case).
- base: The quote currency, e.g., INR or USD. Choose one and be consistent (optional if default suits you).
- start_date: YYYY-MM-DD (inclusive).
- end_date: YYYY-MM-DD (inclusive). Date range limits depend on your plan.
Example curl: 31-day window of BHOP-24k per gram closes in INR
curl "https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&symbols=BHOP-24k&base=INR&start_date=2026-08-20&end_date=2026-09-19"
Example JSON response and fields you will actually use
{
"success": true,
"timeseries": true,
"start_date": "2026-08-20",
"end_date": "2026-09-19",
"base": "INR",
"rates": {
"2026-08-20": { "BHOP-24k": 6023.15 },
"2026-08-21": { "BHOP-24k": 6030.70 },
"2026-08-22": { "BHOP-24k": 6030.70 },
"2026-08-23": { "BHOP-24k": 6030.70 },
"2026-08-26": { "BHOP-24k": 5998.20 },
"2026-09-19": { "BHOP-24k": 6102.55 }
},
"unit": "per gram"
}
How to interpret:
- success/timeseries: Check true before processing.
- base: Ensure it’s INR (or your chosen base) to avoid cross-currency contamination.
- rates: A dictionary keyed by date. Each date maps to BHOP-24k close for that day. Weekend/holiday repeats may appear if the feed carries forward the last close; treat according to your business rule.
- unit: Confirms per gram. If you ever see “per troy ounce” here, convert to per gram by dividing by 31.1034768.
When to use time-series vs OHLC
- Time-series is lean and efficient for daily close histories.
- OHLC is richer (open/high/low/close) and useful when you need daily ranges or to verify the close against intraday volatility.
Common pitfalls and troubleshooting
- Symbol mismatch: If you receive an error that BHOP-24k is unknown, re-verify the exact code on the Supported Symbols list and adjust.
- Missing dates: Markets closed; decide whether to forward-fill or leave gaps.
- Unit confusion: Always read the unit field. Never assume per gram or per troy ounce.
- Time window too large: If your plan caps the range, break the request into smaller windows (e.g., monthly batches).
Performance and scaling tips
- Batch by month or quarter to keep payload sizes predictable.
- Cache immutable historical windows to cut API usage. A daily ETL can append the last business day.
- Normalize to UTC in storage but also retain the date key returned in the response for display alignment.
Endpoint 2: OHLC (Open/High/Low/Close)
For auditability, many teams store the daily OHLC for BHOP-24k in addition to the close. This supports risk reviews, slippage models, and data quality checks.
Purpose and functionality
The OHLC endpoint returns four values for your requested symbol on a given market date: open, high, low, close. For Bhopal 24k benchmarks, this gives you the day’s range and an authoritative close to reconcile with your pricing engine.
Parameters
- access_key: Your API key (required).
- date: YYYY-MM-DD (required). You may loop across dates to build a history.
- symbols: BHOP-24k (required for this use case).
- base: Typically INR for Bhopal benchmarks; choose your working currency.
Example curl: BHOP-24k OHLC on a given date
curl "https://metals-api.com/api/open-high-low-close/2026-09-19?access_key=YOUR_API_KEY&symbols=BHOP-24k&base=INR"
Example JSON response
{
"success": true,
"timestamp": 1789777123,
"base": "INR",
"date": "2026-09-19",
"rates": {
"BHOP-24k": {
"open": 6088.40,
"high": 6115.00,
"low": 6079.25,
"close": 6102.55
}
},
"unit": "per gram"
}
Field interpretation:
- timestamp: Unix epoch for when the OHLC set was finalized. Store this alongside the date to track data freshness.
- rates.BHOP-24k.close: Your per-gram daily close for pricing and valuation.
- rates.BHOP-24k.high/low: Useful for tolerance bands, e.g., flag if your retail price deviated beyond intraday range.
- unit: Confirms per gram. If you ever see “per troy ounce,” convert by dividing all four values by 31.1034768.
Real-world uses
- Pricing governance: Verify that automated pricing stayed within daily high/low ± allowed markup.
- Alerting: Trigger alerts if the daily range expands beyond a threshold, indicating a regime shift.
- Reconciliation: End-of-day valuation uses close; treasury may review open vs close for P&L attribution.
Error handling and recovery
- success=false: Inspect error field (if provided) and retry with exponential backoff. Log the request id/parameters.
- Empty rates: Treat as market closure or data not available for that date; retry next cycle or backfill later from time-series.
Endpoint 3: Historical Rates (single date close)
Use this for targeted lookups or spot checks. It’s also handy when you only need yesterday’s close to update a dashboard.
Parameters
- access_key: Your API key (required).
- date: YYYY-MM-DD (required) appended to the endpoint path.
- symbols: BHOP-24k (required for this use case).
- base: Typically INR; choose as needed.
Example curl: single-date BHOP-24k close
curl "https://metals-api.com/api/2026-09-18?access_key=YOUR_API_KEY&symbols=BHOP-24k&base=INR"
Example JSON response
{
"success": true,
"timestamp": 1789690723,
"base": "INR",
"date": "2026-09-18",
"rates": {
"BHOP-24k": 6091.30
},
"unit": "per gram"
}
Interpretation:
- rates.BHOP-24k: Close price for that date.
- timestamp: When the value was recorded; great for SLA monitoring.
Putting it together: a minimal ingestion workflow
This example fetches the last 30 days of BHOP-24k closes and writes a normalized array to a JSON file for analytics or ETL. It includes caching and weekend handling basics.
Python example: fetch and store BHOP-24k daily closes
import os
import sys
import json
import time
import datetime
import requests
API_KEY = os.getenv("METALS_API_KEY")
if not API_KEY:
print("Set METALS_API_KEY env var")
sys.exit(1)
BASE = "INR"
SYMBOL = "BHOP-24k"
end = datetime.date.today()
start = end - datetime.timedelta(days=30)
url = "https://metals-api.com/api/timeseries"
params = {
"access_key": API_KEY,
"symbols": SYMBOL,
"base": BASE,
"start_date": start.isoformat(),
"end_date": end.isoformat()
}
r = requests.get(url, params=params, timeout=30)
r.raise_for_status()
data = r.json()
if not data.get("success"):
print("API returned error:", data)
sys.exit(2)
unit = data.get("unit")
if unit not in ("per gram", "per troy ounce"):
print("Unexpected unit:", unit)
series = []
rates = data.get("rates", {})
# Normalize to a sorted list by date
for d in sorted(rates.keys()):
v = rates[d].get(SYMBOL)
if v is None:
continue
# Convert if needed
if unit == "per troy ounce":
v = v / 31.1034768
unit_out = "per gram"
else:
unit_out = unit
series.append({
"date": d,
"symbol": SYMBOL,
"base": data.get("base"),
"close": round(v, 4),
"unit": unit_out
})
out = {
"fetched_at": int(time.time()),
"start_date": data.get("start_date"),
"end_date": data.get("end_date"),
"base": data.get("base"),
"symbol": SYMBOL,
"rows": series
}
with open("bhopal_24k_closes.json", "w") as f:
json.dump(out, f, indent=2)
print("Wrote", len(series), "rows to bhopal_24k_closes.json")
Notes:
- We always check success before reading rates.
- We convert from per troy ounce to per gram only if needed, based on unit.
- We explicitly sort by date to produce a stable time series.
- We round to 4 decimals for compactness; pick precision based on your downstream requirements.
One-liner cURL to get yesterday’s BHOP-24k close
For dashboards and ad-hoc checks:
curl "https://metals-api.com/api/$(date -u -d 'yesterday' +%F)?access_key=YOUR_API_KEY&symbols=BHOP-24k&base=INR"
Data modeling: storing BHOP-24k closes correctly
- Primary key: (symbol, date, base). If you store multiple bases (INR, USD), keep them separate to avoid confusion.
- Fields: date (YYYY-MM-DD), symbol, base, close, unit, source_timestamp (epoch), load_timestamp (epoch), version (optional if you version corrections).
- Idempotency: Use upserts keyed by (symbol, date, base). Retries should not create duplicates.
- Auditing: Log the raw response object for last 3–7 days for replayability during incident reviews.
Caching, rate limits, and quotas
- Cache immutable histories (e.g., all dates before the current one). Only refresh the latest trading day if your plan allows intraday updates.
- Backoff and retry with jitter on HTTP/429 (too many requests) or transient 5xx. Keep steady-state QPS low by batching (time-series) instead of many daily single-date calls.
- Schedule off-peak ETL windows when possible to minimize contention and ensure consistent closes are available.
Time zones and daily close timing
- Store the market date as provided in the API (e.g., 2026-09-19) and the timestamp (UTC epoch). This allows you to reconstruct when the close became available vs its market date.
- If your UI shows local time (Asia/Kolkata), convert only for display. Keep canonical storage in UTC.
Units, purity, and carat considerations
- BHOP-24k represents 24 karat gold benchmarks—effectively pure gold. If you price 22k/18k jewelry, derive those from a 24k base by multiplying by the purity ratio and adding making/retail margins. For gold-by-carat rates via API, review the carat-related features in the Metals-API Documentation.
- Always confirm unit in the response. If the unit is per troy ounce, convert to per gram by dividing by 31.1034768 before applying purity or retailer margins.
Production hardening: validation and sanitization
- Schema checks: Validate that success is boolean, base is one of your allowed currencies, unit is expected, and rates is a dict keyed by ISO dates.
- Value sanity: Reject negative or zero prices; flag sudden jumps beyond a configured percentile band for manual review.
- Completeness: If a business day is missing, trigger a backfill task that queries either time-series for that week or the OHLC of that date.
Security best practices
- Secrets management: Store access_key in an environment variable or a secret manager. Rotate keys periodically.
- Network: Use HTTPS-only endpoints. Validate TLS in your client (default in modern HTTP libraries).
- Logging: Redact the access_key from logs and dashboards.
Integrating with pricing engines and ERPs
- E-commerce: A nightly job fetches BHOP-24k close, converts per gram to per gram-per-piece based on SKU weights, and applies markups and taxes. Cache prices for browsing; refresh at open.
- ERP inventory: Revalue gold inventory at daily close for accurate cost-of-goods and P&L. Archive the close and the OHLC record in a valuation table.
- Trading tools: Use BHOP-24k close as a benchmark; add alerts for percentage moves using day-over-day comparisons.
Change detection and alerting
- Compute day-over-day delta and percent change from time-series closes.
- Trigger Slack/webhook alerts when the absolute change exceeds a threshold or breaches a moving average band.
- Use OHLC high/low versus close to detect unusually wide ranges indicative of supply-demand stress.
Backtesting and analytics on BHOP-24k
- Rolling averages: SMA(20), SMA(50), SMA(200) to study medium- and long-term trends.
- Volatility: Approximate daily volatility from OHLC (e.g., Parkinson’s range estimator) if intraday is unavailable.
- Seasonality: Group closes by month and compute normalized patterns to support promotional pricing.
Digital transformation and gold price discovery
Gold’s digitization journey has accelerated: data-driven supply chains, API-first dealer networks, and programmatic hedging all lean on standardized, high-availability feeds. Local benchmarks like BHOP-24k bring regional price discovery into the same analytical stack as global references, enabling:
- Real-time margin control: dynamic pricing adjusts to local volatility while protecting profitability.
- Automated procurement: purchase orders peg to prior closes with configurable slippage rules.
- Data science: forecasting models blend macro variables with localized indices to predict demand and price elasticity.
Data quality checks you should automate
- Duplicate date detection: Ensure only one close per market date per symbol/base pair.
- Flatline detection: If closes remain identical for too many consecutive business days, flag for review.
- Cross-source reconciliation: If you maintain a secondary source for BHOP-24k, check that differences stay within an agreed tolerance.
Example: building a monthly backfill job
- Determine last stored date for BHOP-24k (INR).
- Set start_date = last_date + 1 business day; end_date = today.
- Call time-series for [start_date, end_date].
- Validate schema, unit, and base; convert to per gram if necessary.
- Upsert into your price table keyed by (symbol, date, base).
- Log counts, min/max close, and missing dates. Alert on anomalies.
Building dashboards
- Data refresh: Nightly for closes; optional intraday widgets can reference OHLC once the day ends.
- Visuals: 1D/1W/1M/3M/1Y timeframes with tooltips showing open/high/low/close for each date.
- Export: Provide CSV/JSON exports of BHOP-24k closes for downstream users.
Working with multiple bases (INR and USD)
- Option A: Request BHOP-24k directly in USD by setting base=USD, if supported for the symbol.
- Option B: Store canonical INR series, then convert to USD downstream using your FX feed. Keep conversion factors with timestamps for auditability.
- Always label base clearly in UI and exports to prevent misinterpretation.
Handling weekends, holidays, and partial trading days
- Weekend carry-forward: Many local benchmarks retain Friday’s close across Saturday/Sunday. Decide whether to store repeated values or omit non-business days.
- Holidays: Expect gaps; annotate with a trading calendar so BI users don’t misread missing rows.
- Partial days: If a special session occurs, OHLC may show a narrower range—document exceptions for finance.
Error scenarios and recovery playbook
- HTTP errors: Retry with exponential backoff; alert after N failures. Capture response bodies for context.
- Malformed JSON: Treat as transient; retry from a fresh connection. If persistent, raise an incident with the vendor and pause writes to avoid corrupt data.
- Unexpected unit or base: Quarantine the batch and fallback to the last known good close until resolved.
Versioning and reproducibility
- Keep a record of the query parameters (start_date, end_date, base, symbol, endpoint path) with each dataset slice.
- Store the timestamp from the response alongside ingest time to trace when values were finalized.
- If you reprocess history due to corrections, increment a version tag and archive the previous set.
Compliance and audit-trail considerations
- Immutable history: Lock historical prices after T+N unless a formal correction is issued.
- Access logs: Track who triggered reprocesses and when data corrections were applied.
- Attribution: In downstream reports, attribute BHOP-24k to its data source and include retrieval dates.
Example: difference checks between time-series and OHLC closes
For a small random sample of dates, compare time-series close vs OHLC close for BHOP-24k. Expect identical values; if divergences appear, investigate and standardize on one (typically OHLC close for auditability).
Cost control: request minimization
- Prefer monthly time-series pulls over 30 daily historical calls.
- Cache static history and only append the newest date each run.
- If you run multiple environments, centralize a small ingestion service and distribute data internally.
Operational monitoring
- Metrics: success rate, p95 latency, rows ingested per run, API quota consumption, and anomaly counts.
- Dashboards: Show last 14 days of BHOP-24k closes, the latest fetch time, and SLA timers for your stakeholders.
Example of a realistic time-series diff alert
{
"symbol": "BHOP-24k",
"base": "INR",
"date": "2026-09-19",
"prev_close": 6102.55,
"new_close": 6140.00,
"change": 37.45,
"change_pct": 0.61,
"threshold_pct": 0.50,
"action": "Alert - Review pricing tolerances"
}
Going further
- Combine BHOP-24k with logistics and store traffic data to model price sensitivity.
- Use programmatic alerts to gate promotional campaigns when volatility is elevated.
- Expose an internal API that serves normalized BHOP-24k closes to all teams from a single source of truth.
Quick reference: request patterns you will reuse
- Backfill month: time-series with start_date and end_date set to month boundaries.
- Daily update: historical for yesterday or today’s market date after close is published.
- Audit probe: OHLC for a specific date to verify range and close.
Example image

Where to find more
- Endpoint details, parameters, and usage limits: Metals-API Documentation
- Verify BHOP-24k or explore related local benchmarks: Metals-API Supported Symbols
- Sign up and get your access key: Metals-API Website
- Supplementary industry data: LBMA, World Gold Council
Conclusion
Fetching Bhopal Gold 24k (BHOP-24k) per gram daily close via Metals-API is straightforward and production-ready once you standardize units, base currency, and date handling. Use time-series for efficient backfills, OHLC for detailed daily records, and single-date historical for targeted updates. Harden your pipeline with caching, validation, retry logic, and audit trails. With a clean BHOP-24k history in place, you can automate retail pricing, streamline ERP valuations, and power analytics with confidence. Get started now—grab your API key from the Metals-API Website and verify the symbol on the Supported Symbols page.
FAQ
Is BHOP-24k always quoted per gram?
Verify the unit field in each response. If it returns “per troy ounce,” convert to grams by dividing by 31.1034768. Many local benchmarks are per gram, but never assume—always read unit.
What base currency should I use?
INR is typical for Bhopal benchmarks. If your reporting is in USD, either request base=USD (if supported for BHOP-24k) or store INR and convert in your data warehouse using a consistent FX feed.
How do I handle weekends and holidays?
Expect repeats of the prior close or gaps. Define a rule: either forward-fill non-business days for visual continuity or store only business days and document gaps.
Where can I find the list of supported symbols?
Use the Metals-API Supported Symbols page. Always copy the exact symbol string (e.g., BHOP-24k) to avoid typos.
Can I retrieve OHLC for multiple dates at once?
The OHLC endpoint is typically date-scoped. For historical ranges, loop across dates or prefer the time-series endpoint for close-only retrieval, then supplement specific dates with OHLC for audits.
How do I start?
Visit the Metals-API Website, create a free account to get your access key, confirm BHOP-24k on the Symbols page, and implement the time-series request shown above.