How to Get Bangalore Gold 18k (BANG-18k) Historical Prices using this API
Introduction
In the ever-evolving landscape of precious metals trading, the demand for accurate and timely data has never been more critical. For developers and traders alike, accessing historical prices for gold, particularly 18k gold (BANG-18k), is essential for making informed decisions. The Metals-API provides a robust solution for retrieving historical prices and real-time data, enabling users to harness the power of data analytics and market insights. This blog post will delve into the capabilities of the Metals-API, focusing on how to obtain historical prices for gold and exploring the broader implications of digital transformation in the precious metals market.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a symbol of wealth and stability. In recent years, the digital transformation of precious metals trading has revolutionized how investors and traders interact with this valuable asset. With the integration of technology and data analytics, traders can now access real-time market insights and historical data at their fingertips.
The innovation in price discovery mechanisms has allowed for more transparent and efficient trading practices. Digital asset solutions are emerging, enabling investors to trade gold in various forms, including digital tokens backed by physical gold. This transformation is not just about convenience; it is about leveraging technology to enhance trading strategies and optimize investment portfolios.
API Description
The Metals-API is a powerful tool that empowers developers to build next-generation applications for precious metals trading. With its real-time data capabilities, the API allows users to access a wealth of information about various metals, including gold, silver, platinum, and palladium. The API's innovative features enable seamless integration into trading platforms, financial applications, and market analysis tools.
For detailed information on how to implement the API, developers can refer to the Metals-API Documentation, which provides comprehensive guidance on utilizing the API's capabilities effectively.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs in the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This feature is crucial for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date (YYYY-MM-DD) to the endpoint, developers can retrieve historical price data for gold and other metals, enabling comprehensive analysis of market trends over time.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts between different metals or to/from USD. This feature is particularly useful for traders dealing with multiple currencies.
- Time-Series Endpoint: This endpoint enables users to query daily historical rates between two specified dates, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing valuable insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve gold rates based on carat values, which is essential for jewelers and traders dealing in different purities of gold.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for gold over a specified period, which is crucial for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, enabling traders to analyze market performance comprehensively.
- Historical LME Endpoint: For those interested in LME symbols, this endpoint provides historical rates dating back to 2008, allowing for extensive analysis of market trends.
- API Key: Each user is assigned a unique API key, which must be included in API requests to authenticate and authorize access.
- API Response: The Metals-API delivers exchange rates relative to USD, ensuring consistency in data presentation.
- Available Endpoints: With 14 API endpoints, the Metals-API offers diverse functionalities to cater to various trading needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols. For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1772842610,
"base": "USD",
"date": "2026-03-07",
"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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1772756210,
"base": "USD",
"date": "2026-03-06",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2026-02-28",
"end_date": "2026-03-07",
"base": "USD",
"rates": {
"2026-02-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1772842610,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-28",
"end_date": "2026-03-07",
"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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1772842610,
"base": "USD",
"date": "2026-03-07",
"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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1772842610,
"base": "USD",
"date": "2026-03-07",
"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"
}
Conclusion
The Metals-API stands out as a transformative tool for developers and traders in the precious metals market. By providing access to real-time and historical data, the API empowers users to make informed decisions based on accurate market insights. The ability to retrieve historical prices for gold, particularly 18k gold (BANG-18k), opens up new avenues for analysis and strategy development.
As the digital transformation of precious metals continues, leveraging APIs like Metals-API will be essential for staying competitive in the market. For further exploration of the API's capabilities, developers are encouraged to visit the Metals-API Documentation and familiarize themselves with the extensive range of features available. Additionally, the Metals-API Supported Symbols page provides valuable information on the various metals available for trading.
In summary, the Metals-API not only enhances the trading experience but also contributes to the broader narrative of innovation and technology integration in the financial markets. By embracing these advancements, traders can optimize their strategies and navigate the complexities of the precious metals market with confidence.