Mumbai Silver API: MUMB-XAG in INR per Gram

Metals-API 7 min read
Mumbai Silver API: MUMB-XAG in INR per Gram

You need to quote and settle transactions against the live silver price in Mumbai, denominated in INR per gram. By the end of this guide you’ll be able to call the dedicated endpoint that returns the Mumbai city silver price, parse the JSON, and safely display or store rates for your pricing engine, catalog, or quant model.

What “MUMB-XAG in INR per gram” means and when to use it

The code MUMB-XAG represents the Mumbai city benchmark for silver. Unlike ISO XAG (which is typically quoted per troy ounce), this feed returns silver priced in Indian Rupees per gram. Use it when you want to:

  • Price jewelry, coins, or bars by gram directly in INR with no conversion.
  • Quote a cart or invoice in your e-commerce or ERP without maintaining your own metal-to-gram conversion.
  • Trigger alerts or hedge against INR-denominated exposure specific to the Mumbai market.

Important: Mumbai city silver is served by a dedicated endpoint and symbol. It is not available via the generic latest-rates endpoint for ISO metals. If you need MUMB-XAG, call the Mumbai/India metals endpoint described below.

Endpoint and parameters

Metals-API exposes Mumbai city metals through an INR-only endpoint:

  • HTTP method: GET
  • Path: /api/gold-price-india
  • Required query parameter: symbols=MUMB-XAG
  • Authentication: access_key query parameter

This route returns city-level metal prices in INR per gram. Do not call generic endpoints for this symbol—MUMB-XAG will not be present there.

Plan note: access to this feed is available on the Copper Monthly plan (USD 19.99/month). There is no free trial.

Go live in four steps

  1. Register: create an account on Metals-API (Copper Monthly $19.99/mo. No Free Trial). Register
  2. Copy your access_key from your account dashboard.
  3. Call GET /api/gold-price-india with symbols=MUMB-XAG.
  4. Render the value from rates.MUMB-XAG in your app.

Make your first request (curl)

The following request hits the dedicated endpoint for Mumbai city metals. Paste it into your terminal and replace YOUR_API_KEY with the access key from your account.

Note: If the official example below references a different symbol, simply change the symbols parameter to MUMB-XAG to fetch the Mumbai silver price.

curl "https://metals-api.com/api/gold-price-india?access_key=YOUR_API_KEY&symbols=MUMB-XAG"

Example in Python

This Python example calls the same endpoint, extracts the INR-per-gram value for Mumbai silver, and handles basic validation.

import os
import requests
from decimal import Decimal, InvalidOperation

API_KEY = os.getenv("METALS_API_KEY", "YOUR_API_KEY")
URL = "https://metals-api.com/api/gold-price-india"

params = {
    "access_key": API_KEY,
    "symbols": "MUMB-XAG"
}

try:
    resp = requests.get(URL, params=params, timeout=10)
    data = resp.json()
except Exception as e:
    raise SystemExit(f"Network or JSON error: {e}")

# Basic validation
if not isinstance(data, dict) or not data.get("success", True):
    # Some responses include 'success': false and an 'error' object
    err = data.get("error", {})
    raise SystemExit(f"API error: {err.get('code')} {err.get('type')} {err.get('info')}")

rates = data.get("rates", {})
value_in_inr_per_gram = rates.get("MUMB-XAG")

if value_in_inr_per_gram is None:
    raise SystemExit("Missing rate for MUMB-XAG")

try:
    price = Decimal(str(value_in_inr_per_gram))
except InvalidOperation:
    raise SystemExit("Invalid numeric format for MUMB-XAG rate")

# At this point, 'price' is the Mumbai silver price in INR per gram.
print(f"Mumbai silver (MUMB-XAG): {price} INR/gram")

# Optional: read timestamp and base if present
timestamp = data.get("timestamp")
base = data.get("base")
if timestamp:
    print(f"Timestamp: {timestamp}")
if base:
    print(f"Base currency: {base}")

What the response means

Below is an official sample response. The date shown in the sample reflects when that payload was captured; your live response will differ.

{"success": true, "timestamp": 1791223754, "base": "INR", "date": "2026-10-05", "rates": {"MUMB-XAG": 235}, "unit": "per gram"}

Key fields you will actually use:

  • success: Boolean indicating whether the query succeeded. Check this before reading rates.
  • timestamp: When present, the Unix epoch time of the price snapshot. Use it to cache or to show “as of” time to users.
  • base: The base currency for all returned quotes. For this endpoint the base is INR.
  • rates.MUMB-XAG: The Mumbai silver rate you need, denominated in INR per gram. This is the number you will render or store.
  • error: When success is false, this object (if present) describes what went wrong. Always log the error fields.

If the official sample shows a different symbol in rates, the structure is otherwise the same—set symbols=MUMB-XAG in your request to receive the Mumbai silver rate.

Integration details that will save you time

Units and conversions

  • Unit: the endpoint returns INR per gram. No troy-ounce math is required.
  • If your UI needs milligrams or kilograms, convert from grams after reading the number. Keep your internal storage as decimal, not double, to preserve precision.

Base currency

  • All rates from this endpoint are INR-based. Do not expect USD or cross-currency quotes here.
  • If your product also supports other currencies, perform conversion separately in your stack after retrieving the INR value, or query other currency endpoints from Metals-API as appropriate.

Timestamps and timezone

  • When the response includes timestamp, treat it as a Unix epoch (UTC). Convert to your user’s timezone in presentation only.
  • When no timestamp is included, treat the value as live at response time and apply your own seen-at timestamp.

Caching and request usage

  • Cache the last successful payload by symbols value and timestamp. On transient failures, serve the cached rate with an “as of” note.
  • If your UI polls frequently, consider a client or edge cache with a short TTL (e.g., 15–60 seconds) to avoid unnecessary duplicate calls.
  • Store the last-good value alongside the retrieved timestamp so you can compare for changes and avoid repainting your UI when rates are unchanged.

Weekends, holidays, and market hours

  • City-level quotes can update less frequently on weekends and market holidays. If the timestamp is unchanged across polls, keep serving the last value and avoid spurious alerts.
  • In alerting systems, require a minimum elapsed time or a new timestamp before evaluating threshold rules.

Error handling patterns

  • Always check success. If it is false, inspect and log any error.code, error.type, and error.info fields.
  • Validate that rates exists and that rates.MUMB-XAG is non-null and numeric before use.
  • Implement exponential backoff on network failures and a circuit breaker that falls back to the cached last-good value.

Designing your domain model

  • Store: symbol (MUMB-XAG), price (as decimal string or fixed-precision numeric), unit (gram), currency (INR), and timestamp (epoch in seconds) when available.
  • Track provenance: endpoint path (/api/gold-price-india) and request params (symbols) for reproducibility and debugging.

Testing, staging, and production rollout

  • Begin in a staging environment with the same symbols you plan to use in production (MUMB-XAG) so serialization and parsing match.
  • Assert on presence and type of all fields you consume. Unit-test your parser against both a success payload and an error payload.
  • Record and inspect a few live responses during peak hours to validate your TTL, delta detection, and rounding rules.

Discover symbols and read the docs

Before you expand to other city benchmarks or metals, review the symbol list and endpoint details:

  • Symbols: find supported codes and naming conventions.
  • Documentation: parameters, authentication, and response formats for each endpoint.
  • MCP: reference material for metals and pricing context.

Quality checks before shipping

  • Rounding: choose a display precision (e.g., to 2 decimal places) separately from storage precision (store full precision from the API).
  • Change detection: only notify or reprice when the timestamp or rate actually changes beyond your defined epsilon to avoid flicker.
  • Resilience: if success=false or rates.MUMB-XAG is missing, keep the last-good rate and surface a non-blocking warning.

FAQ

Is the Mumbai silver price returned in grams or troy ounces?
It is INR per gram. No ounce conversion is required for this endpoint.

Which endpoint should I call for MUMB-XAG?
Use GET /api/gold-price-india with symbols=MUMB-XAG. This symbol is not available via generic latest-rates endpoints.

What currency is returned?
INR only for this endpoint. If you need other currencies, handle conversion in your system or consult other endpoints documented by Metals-API.

How do I handle errors or missing fields?
Check success, log any error details, verify rates.MUMB-XAG is present and numeric, and fall back to the last-good cached rate when necessary.

How often should I poll?
Use a short cache window (e.g., seconds) and only refresh when the timestamp or rate changes. Expect slower updates on weekends and holidays.

Ready to integrate Mumbai silver into your pricing or trading workflow? Create an account, get your API key, and call the INR-per-gram endpoint for MUMB-XAG in minutes: Register. For full parameter and response details, see the Documentation.