Retrieve Delhi Gold (XAU-DELH) Historical Prices through this API

Retrieve Delhi Gold (XAU-DELH) Historical Prices through this API
In the ever-evolving landscape of precious metals trading, the ability to access real-time and historical data is paramount for traders, investors, and developers alike. One of the most sought-after metals is Gold, represented by the symbol XAU. This blog post will delve into how to retrieve historical prices for Gold in Delhi using the Metals-API. We will explore the innovative features of this API, its capabilities, and how it empowers developers to build next-generation applications that leverage real-time metals data.
About Gold (XAU)
Gold has long been a symbol of wealth and a safe-haven asset in times of economic uncertainty. As the world embraces digital transformation, the precious metals market is no exception. The integration of technology in trading has revolutionized how investors access and analyze market data. With the rise of data analytics, traders can gain valuable insights into market trends, price movements, and investment opportunities.
The digital transformation of precious metals trading has led to innovative solutions for price discovery. By utilizing advanced algorithms and data analytics, traders can make informed decisions based on real-time data. The Metals-API plays a crucial role in this transformation, providing developers with the tools necessary to create applications that can analyze historical prices, track fluctuations, and convert currencies seamlessly.
API Description
The Metals-API is a powerful tool that offers comprehensive access to metals pricing data. It provides a wide range of endpoints that allow users to retrieve real-time and historical prices for various metals, including Gold (XAU). The API is designed with innovation and technological advancement in mind, enabling developers to harness the transformative potential of real-time metals data.
With the Metals-API, developers can build applications that cater to various use cases, from simple price tracking tools to complex trading platforms. The API's capabilities include retrieving the latest rates, historical rates, bid and ask prices, and much more. This flexibility allows for the creation of tailored solutions that meet the specific needs of users in the precious metals market.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that provide different functionalities, each designed to cater to specific needs. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data for Gold and other metals, updated every 60 minutes or more frequently. This is essential for traders who need the most current pricing information.
- Historical Rates Endpoint: Users can access historical rates for Gold dating back to 2019. By appending a specific date to the API request, developers can retrieve past prices, which is invaluable for trend analysis and forecasting.
- Bid and Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for Gold, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion feature, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two chosen dates, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: Users can track how Gold prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve Gold rates by carat, which is essential for jewelers and consumers interested in specific purity levels.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for Gold over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for Gold, which are critical for technical analysis.
- Historical LME Endpoint: This feature allows access to historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- API Key: Each user is assigned a unique API key, which is essential for authentication and accessing the API's features.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- 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 in India, making it particularly relevant for local traders.
- 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 various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1747112418,
"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 latest rate for Gold (XAU) is 0.000482 per troy ounce, with data updated as of the specified timestamp.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1747026018,
"base": "USD",
"date": "2025-05-12",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows a historical rate for Gold on a specific date, allowing users to analyze past pricing trends.
Time-Series Endpoint
{
"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 a time series of Gold prices over a specified period, enabling users to visualize trends and fluctuations.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747112418,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example illustrates how to convert an amount from USD to Gold (XAU), providing the result in troy ounces.
Fluctuation Endpoint
{
"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 prices have fluctuated over a specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1747112418,
"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 endpoint provides critical data for technical analysis, allowing traders to assess market performance over a specific time frame.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1747112418,
"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, which are essential for traders looking to execute buy or sell orders effectively.
Conclusion
The Metals-API is an invaluable resource for developers and traders looking to access real-time and historical data for Gold (XAU) and other precious metals. By leveraging the API's extensive features, users can build sophisticated applications that provide insights into market trends, price fluctuations, and investment opportunities.
With the ability to retrieve the latest rates, historical prices, and detailed market data, the Metals-API empowers users to make informed decisions in the dynamic world of precious metals trading. Whether you are a developer looking to integrate metals data into your applications or a trader seeking to analyze market trends, the Metals-API offers the tools you need to succeed.
For more information on how to get started, visit the Metals-API Documentation and explore the Metals-API Supported Symbols page for a comprehensive list of available metals. Start harnessing the power of real-time metals data today!