Fetch Mumbai Gold (XAU-MUMB) - Per Ounce prices easily using this API

Fetch Mumbai Gold (XAU-MUMB) - Per Ounce Prices Easily Using This API
Metals-API provides a robust solution for fetching the latest gold prices, including the Mumbai Gold (XAU-MUMB) rates. This blog post delves into the intricacies of the Metals-API, exploring its capabilities, features, and how it empowers developers to create innovative applications in the world of precious metals.
About Gold (XAU)
XAU, has long been a cornerstone of wealth and investment. As a digital transformation sweeps through the financial sector, the precious metals market is not left behind. The integration of data analytics and technology into trading practices has revolutionized how investors approach gold trading.
Understanding the Metals-API
Metals-API is a powerful tool designed to provide developers with real-time and historical data on various metals, including gold, silver, platinum, and palladium. This API is particularly beneficial for applications that require accurate and timely information on metal prices. By utilizing the Metals-API, developers can build next-generation applications that cater to the needs of traders and investors.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. For example, a typical response might look like this:
{
"success": true,
"timestamp": 1748739742,
"base": "USD",
"date": "2025-06-01",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
base field shows the currency used for the rates, which is USD in this case.
- Historical Rates Endpoint: Access historical exchange rates for any date since 1999. This is particularly useful for analyzing trends over time. A sample response might look like this:
{
"success": true,
"timestamp": 1748653342,
"base": "USD",
"date": "2025-05-31",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825
},
"unit": "per troy ounce"
}
- Bid And Ask Endpoint: This feature enables users to retrieve real-time bid and ask prices for metals. For example:
{
"success": true,
"timestamp": 1748739742,
"base": "USD",
"date": "2025-06-01",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
- Convert Endpoint: This endpoint allows users to convert any amount from one metal to another or to/from USD. For instance:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1748739742,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice. This is beneficial for analyzing trends over specific periods. A typical response might look like this:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-25",
"end_date": "2025-06-01",
"base": "USD",
"rates": {
"2025-05-25": {
"XAU": 0.000485
},
"2025-06-01": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis. For example:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-25",
"end_date": "2025-06-01",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows users to query the API for the open, high, low, and close prices for a specific time period. A sample response might look like this:
{
"success": true,
"timestamp": 1748739742,
"base": "USD",
"date": "2025-06-01",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008. This is particularly useful for those interested in long-term trends.
Metals-API Supported Symbols page.
API Response and Field Meanings
success, timestamp, base, and rates. Understanding these fields is essential for effectively utilizing the API.
success field indicates whether the API call was successful, while the timestamp provides the exact time of the response. The base field shows the currency used for the rates, and the rates field contains the actual exchange rates for the requested metals.
Common Developer Questions
- How do I authenticate my API requests? Each request must include your unique API key, which is passed into the API base URL's access_key parameter.
- What are the rate limits for API calls? Rate limits vary based on your subscription plan, so it's essential to review the documentation for specific details.
- How do I handle errors in API responses? The API provides error codes and messages that can help diagnose issues. Implementing robust error handling in your application is crucial for a seamless user experience.
Performance Optimization and Security Considerations
Conclusion
Metals-API Documentation. Whether you're looking to fetch the latest gold prices or analyze historical trends, the Metals-API is your go-to resource for all things related to precious metals trading.