The Easiest Way to Get Bhopal Gold 24k (BHOP-24k) Historical Rates with a Simple API Call
The Easiest Way to Get Bhopal Gold 24k (BHOP-24k) Historical Rates with a Simple API Call
In today's digital age, accessing real-time and historical data for precious metals like Gold (XAU) has become increasingly vital for traders, investors, and developers alike. The Metals-API provides a seamless solution for obtaining historical prices of Gold and other metals through a simple API call. This blog post will guide you through the process of retrieving Gold historical prices using the Metals-API, detailing the various endpoints, parameters, and data formats involved.
About Gold (XAU)
Gold has long been considered a safe-haven asset and a hedge against inflation. As the world transitions into a more digital economy, the integration of technology in trading precious metals is becoming essential. The Metals-API stands at the forefront of this digital transformation, offering developers the tools to harness data analytics and market insights effectively. By leveraging the power of real-time metals data, developers can create innovative applications that enhance price discovery and provide digital asset solutions.
API Description
The Metals-API is a powerful tool that allows users to access real-time and historical data for various metals, including Gold (XAU). With its user-friendly interface and comprehensive documentation, developers can easily integrate this API into their applications. The API empowers users to build next-generation applications that can analyze market trends, track price fluctuations, and make informed trading decisions.
For more information, you can visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on your plan, you can receive updates every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a date in the format YYYY-MM-DD, you can query the Metals-API for historical rates.
- Bid and Ask Endpoint: This powerful feature allows you to retrieve real-time Bid and Ask prices for various metals, enabling traders to make informed decisions based on current market conditions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one currency to another, facilitating seamless transactions.
- Time-Series Endpoint: This endpoint enables users to query the API for daily historical rates between two specified dates, providing insights into market trends over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis with this endpoint, which provides valuable information for traders looking to capitalize on market movements.
- Carat Endpoint: Retrieve information about Gold rates by Carat, allowing for more precise valuations based on the purity of the metal.
- Lowest/Highest Price Endpoint: This endpoint allows you to query the API to get the lowest and highest prices for a specified date, offering insights into market volatility.
- Open/High/Low/Close (OHLC) Price Endpoint: Get detailed OHLC data for a specific time period, which is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Your unique API Key is essential for accessing the API and should be passed into the API base URL's access_key parameter.
- API Response: The Metals-API delivers exchange rates relative to USD, ensuring consistency across all data returned.
- Available Endpoints: With 14 API endpoints, each providing different functionalities, users can tailor their data requests to meet specific needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest information.
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 integration. 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": 1784394457,
"base": "USD",
"date": "2026-07-18",
"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": 1784308057,
"base": "USD",
"date": "2026-07-17",
"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-11",
"end_date": "2026-07-18",
"base": "USD",
"rates": {
"2026-07-11": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-13": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-18": {
"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": 1784394457,
"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-11",
"end_date": "2026-07-18",
"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": 1784394457,
"base": "USD",
"date": "2026-07-18",
"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": 1784394457,
"base": "USD",
"date": "2026-07-18",
"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
Accessing historical Gold prices through the Metals-API is a straightforward process that can significantly enhance your trading strategies and market analysis. By utilizing the various endpoints offered by the API, developers can retrieve real-time and historical data, track fluctuations, and convert between different currencies with ease. The comprehensive documentation available on the Metals-API Documentation site provides all the necessary information to get started.
As the financial landscape continues to evolve, leveraging advanced tools like the Metals-API will be crucial for staying ahead in the competitive market of precious metals trading. Whether you are a seasoned trader or a developer looking to integrate metals data into your applications, the Metals-API offers the resources and capabilities needed to succeed.