Fetch Hyderabad Gold (XAU-HYDE) - Per Ounce Historical Prices effortlessly with this API

Fetch Hyderabad Gold (XAU-HYDE) - Per Ounce Historical Prices Effortlessly with this API
In today's fast-paced financial landscape, the demand for real-time data and analytics has never been higher, especially in the precious metals market. Gold, represented by the symbol XAU, has long been a cornerstone of investment portfolios and a safe haven during economic uncertainty. With the advent of APIs like Metals-API, fetching historical prices for gold (XAU-HYDE) has become an effortless task for developers and traders alike. This blog post will delve into the capabilities of Metals-API, focusing on how to access historical prices and leverage the power of data analytics in the precious metals market.
About Gold (XAU)
Gold has been a symbol of wealth and prosperity for centuries. Its intrinsic value, scarcity, and universal acceptance make it a preferred asset for investors. In recent years, digital transformation has significantly impacted how gold is traded and valued. The integration of technology in trading platforms has enabled real-time price discovery and enhanced market insights.
Data analytics plays a crucial role in understanding market trends and making informed investment decisions. By utilizing advanced analytics, traders can identify patterns, forecast price movements, and optimize their trading strategies. The integration of digital asset solutions has further revolutionized the way gold is perceived, allowing for seamless transactions and enhanced liquidity.
Metals-API Overview
The Metals-API is a powerful tool designed for developers looking to access real-time and historical data on various metals, including gold. This API provides a comprehensive suite of endpoints that enable users to retrieve exchange rates, historical prices, and other valuable insights. With its user-friendly interface and robust functionality, Metals-API empowers developers to build next-generation applications that can transform the way precious metals are traded.
One of the standout features of Metals-API is its ability to deliver real-time data, which is essential for traders who need to make quick decisions based on market fluctuations. The API's innovative architecture ensures that users receive accurate and timely information, allowing them to stay ahead of the competition.
Key Features of Metals-API
Metals-API offers a variety of endpoints that cater to different needs within the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data updated every 60 minutes or even every 10 minutes. This feature is crucial for traders who require the most current information to make informed decisions.
- 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 gold and other metals, enabling them to analyze trends over time.
- Bid and Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals. Understanding the bid-ask spread is essential for traders looking to optimize their entry and exit points.
- Convert Endpoint: The conversion endpoint enables 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.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. By analyzing time-series data, traders can identify trends and make predictions about future price movements.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and helping traders make informed decisions.
- Carat Endpoint: This endpoint provides information about gold rates by carat, allowing users to assess the value of gold jewelry and other items based on their purity.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is essential for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, giving traders a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for in-depth analysis of market trends.
- API Key: Each user is provided with a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: Metals-API comes with a comprehensive list of endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring users have access to the latest symbols and their specifications.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for traders operating in the Indian market.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context and insights into market movements.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for developers looking to integrate Metals-API into their applications. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1748761217,
"base": "USD",
"date": "2025-06-01",
"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"
}
The response indicates a successful request, providing the latest exchange rates for various metals, including gold (XAU). The rates are expressed per troy ounce, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1748674817,
"base": "USD",
"date": "2025-05-31",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This endpoint allows users to access historical exchange rates for a specific date. The response includes the rates for gold and other metals, enabling traders to analyze past performance.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-05-25",
"end_date": "2025-06-01",
"base": "USD",
"rates": {
"2025-05-25": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-27": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-01": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint provides a range of historical rates between two specified dates. This data is invaluable for traders looking to identify trends and make predictions based on historical performance.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1748761217,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The convert endpoint allows users to convert amounts between different metals or currencies. In this example, 1000 USD is converted to gold (XAU), providing the result in troy ounces.
Fluctuation Endpoint
{
"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
},
"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 endpoint tracks fluctuations in metal prices over a specified period. Understanding these fluctuations is vital for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1748761217,
"base": "USD",
"date": "2025-06-01",
"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"
}
The OHLC endpoint provides a comprehensive view of market performance for a specific date, allowing traders to assess price movements throughout the trading day.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1748761217,
"base": "USD",
"date": "2025-06-01",
"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 endpoint provides current bid and ask prices for metals, which is essential for traders looking to optimize their trading strategies based on market conditions.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers and traders seeking to access real-time and historical data on precious metals like gold (XAU). By leveraging the various endpoints available, users can gain insights into market trends, optimize their trading strategies, and make informed decisions based on accurate data. The API's capabilities, including real-time rates, historical data, and conversion features, empower developers to build innovative applications that can transform the way precious metals are traded.
For more information on how to get started with Metals-API, visit the Metals-API Documentation for comprehensive guidance. To explore the full range of supported symbols, check out the Metals-API Supported Symbols page. With the right tools and insights, you can navigate the precious metals market with confidence and precision.