Access Bangalore Gold (XAU-BANG) - Per Ounce Historical Prices through this API

Access Bangalore Gold (XAU-BANG) - Per Ounce Historical Prices through this API
In the rapidly evolving world of finance, the demand for accurate and timely data has never been more critical, especially in the realm of precious metals trading. One of the most sought-after metals is gold, represented by the symbol XAU. Accessing historical prices for gold, particularly in markets like Bangalore, can be achieved seamlessly through the Metals-API. This blog post will delve into the capabilities of the Metals-API, focusing on how developers can leverage this powerful tool to obtain historical prices and other valuable data related to gold.
About Gold (XAU)
Gold has long been a symbol of wealth and stability. In recent years, the digital transformation of precious metals trading has opened new avenues for investors and traders alike. The integration of data analytics and market insights into trading strategies has become essential for making informed decisions. With the rise of technology in trading, the ability to access real-time data and historical prices has transformed how traders approach the market.
One of the most innovative aspects of trading today is the use of APIs to access vital market data. The Metals-API stands out as a leading solution, providing developers with the tools necessary to build next-generation applications that can analyze, visualize, and act upon real-time metals data. This API empowers users to discover price trends, monitor fluctuations, and make data-driven decisions.
API Description
The Metals-API is designed to provide comprehensive access to metal prices and currency conversion data. It offers a range of endpoints that allow developers to retrieve the latest rates, historical prices, and other essential information related to precious metals. The API's capabilities are not just limited to retrieving data; it also enables users to integrate this data into their applications, enhancing their functionality and user experience.
One of the key features of the Metals-API is its ability to deliver real-time data. Depending on your subscription plan, the API can return the latest exchange rate data updated every 60 minutes or even every 10 minutes. This ensures that traders have access to the most current information, allowing them to make timely decisions in a fast-paced market.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to serve specific needs. Here are some of the most notable features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rates for all available metals. The data is updated frequently, ensuring that users have access to the most current market information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve historical prices for analysis and reporting.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insight into market conditions and helping traders make informed decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one currency to another, facilitating transactions and analysis.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is particularly useful for jewelers and traders dealing in various purities of gold.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API to get the lowest and highest prices for a specified date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can retrieve open, high, low, and close prices for a specific time period, which is essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Each user is assigned a unique API key, which must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price specifically for the Indian market.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of how to use various endpoints, along with explanations of the JSON responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the latest rates endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1747094953,
"base": "USD",
"date": "2025-05-13",
"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"
}
This response indicates that the request was successful, providing the current exchange rates for various metals relative to USD.
Historical Rates Endpoint
Accessing historical exchange rates is straightforward. Here’s an example response for a specific date:
{
"success": true,
"timestamp": 1747008553,
"base": "USD",
"date": "2025-05-12",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for gold and other metals on a specific date, allowing for analysis of price movements over time.
Time-Series Endpoint
For analyzing trends over a specific period, the time-series endpoint is invaluable. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-06",
"end_date": "2025-05-13",
"base": "USD",
"rates": {
"2025-05-06": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-08": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-13": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for the specified period, enabling users to visualize trends and fluctuations in gold prices.
Convert Endpoint
The convert endpoint allows users to convert amounts between different metals or currencies. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747094953,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of gold, providing a clear conversion result.
Fluctuation Endpoint
Tracking rate fluctuations is essential for understanding market dynamics. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-06",
"end_date": "2025-05-13",
"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"
}
This response provides insights into how gold and other metals have fluctuated over the specified period, highlighting both the absolute change and percentage change.
OHLC (Open/High/Low/Close) Price Endpoint
For traders interested in technical analysis, the OHLC endpoint is crucial. Here’s an example response:
{
"success": true,
"timestamp": 1747094953,
"base": "USD",
"date": "2025-05-13",
"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"
}
This response provides the open, high, low, and close prices for gold and other metals, essential for traders looking to analyze market trends.
Bid/Ask Endpoint
Understanding the current bid and ask prices is vital for traders. Here’s an example response:
{
"success": true,
"timestamp": 1747094953,
"base": "USD",
"date": "2025-05-13",
"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"
}
This response provides the current bid and ask prices for gold and other metals, along with the spread, which is crucial for traders to understand market liquidity.
Conclusion
The Metals-API is a powerful tool for developers looking to access historical prices and real-time data for precious metals like gold. With its extensive range of endpoints, the API allows for comprehensive analysis and integration into various applications. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance trading strategies and provide valuable insights into market trends.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals. The Metals-API Website is also a great resource for understanding the full potential of this API and how it can transform your approach to trading precious metals.