Get Bangalore Gold 18k (BANG-18k) Historical Prices using the new API documentation
Introduction
In the ever-evolving landscape of financial technology, the demand for real-time data on precious metals, particularly Gold (XAU), has surged. Developers and traders alike are seeking innovative solutions to access historical prices and market insights efficiently. The Metals-API offers a robust platform for retrieving historical prices of 18k gold (BANG-18k) and other metals, empowering users to make informed decisions based on accurate data. This blog post delves into the capabilities of the Metals-API, exploring its features, endpoints, and the transformative potential of integrating real-time metals data into applications.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and economic uncertainty. With the rise of digital transformation in the precious metals market, the integration of technology into trading practices has become paramount. The Metals-API stands at the forefront of this transformation, providing developers with the tools necessary to access and analyze gold prices in real-time.
Data analytics plays a crucial role in understanding market trends and making informed trading decisions. By leveraging the Metals-API, developers can harness the power of data analytics to gain insights into gold price fluctuations, historical trends, and market dynamics. This API not only facilitates price discovery but also enables the creation of digital asset solutions that cater to the needs of modern investors.
API Description
The Metals-API is a comprehensive solution for accessing real-time and historical data on precious metals, including gold, silver, platinum, and palladium. With a focus on innovation and technological advancement, this API empowers developers to build next-generation applications that require accurate and timely metals data. The API provides a wide range of endpoints, each designed to serve specific functionalities, from retrieving the latest rates to accessing historical data dating back to 2019.
For detailed information on how to implement the API, refer to the Metals-API Documentation. This resource offers comprehensive guidance on utilizing the API's capabilities effectively.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints that cater to different data retrieval needs. Hereβs an overview of some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for precious metals. Depending on your subscription plan, this endpoint can return updated rates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who require up-to-the-minute pricing information to make timely decisions.
Historical Rates Endpoint
Accessing historical rates is crucial for analyzing trends and making predictions. The Historical Rates Endpoint allows users to retrieve data for most currencies dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the Metals-API for historical rates, enabling them to conduct thorough analyses of price movements over time.
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that provides real-time bid and ask prices for metals. This information is vital for traders looking to execute buy and sell orders at optimal prices. Depending on the subscription plan, users can access this data to enhance their trading strategies.
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders who operate in multiple currencies and need to quickly assess the value of their holdings in different metals.
Time-Series Endpoint
The Time-Series Endpoint enables users to query the API for daily historical rates between two specified dates. This functionality is essential for conducting in-depth analyses of price trends over specific periods, allowing traders to identify patterns and make informed decisions.
Fluctuation Endpoint
Using the Fluctuation Endpoint, users can retrieve information about how currencies fluctuate on a day-to-day basis. This feature provides insights into market volatility, helping traders to understand the risks associated with their investments.
Carat Endpoint
The Carat Endpoint allows users to retrieve information about gold rates by carat. This feature is particularly relevant for jewelers and consumers interested in the value of gold jewelry, as it provides precise pricing based on the purity of the gold.
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint enables users to query the API to get the lowest and highest prices for a specified date. This information is crucial for traders looking to identify price extremes and make strategic trading decisions.
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint provides users with the open, high, low, and close prices for a specified date. This data is essential for technical analysis, allowing traders to assess market trends and make predictions based on historical price movements.
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for users interested in analyzing the performance of metals traded on the London Metal Exchange.
API Key and Response
To access the Metals-API, users must obtain an API Key, which is passed into the API base URL's access_key parameter. The API delivers exchange rates relative to USD by default, and all data is returned in a structured JSON format, making it easy for developers to integrate into their applications.
Available Endpoints
The Metals-API offers a total of 14 endpoints, each providing unique functionalities. For a complete list of supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of responses for various endpoints:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1784074475,
"base": "USD",
"date": "2026-07-15",
"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": 1783988075,
"base": "USD",
"date": "2026-07-14",
"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-07-08",
"end_date": "2026-07-15",
"base": "USD",
"rates": {
"2026-07-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-15": {
"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": 1784074475,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-08",
"end_date": "2026-07-15",
"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": 1784074475,
"base": "USD",
"date": "2026-07-15",
"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": 1784074475,
"base": "USD",
"date": "2026-07-15",
"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 provides a powerful and flexible solution for accessing historical prices and real-time data on precious metals, including gold. By leveraging the various endpoints offered by the API, developers can build sophisticated applications that cater to the needs of traders and investors in the precious metals market. The ability to access historical rates, real-time pricing, and detailed market insights empowers users to make informed decisions based on accurate data.
As the financial landscape continues to evolve, the integration of technology into trading practices will only become more critical. The Metals-API stands as a testament to this transformation, offering developers the tools they need to innovate and thrive in a competitive market. For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation.
In summary, the Metals-API is not just a data provider; it is a gateway to understanding the complexities of the precious metals market, enabling developers to create applications that drive innovation and enhance trading strategies.