Get Delhi Gold (XAU-DELH) Weekly Average Prices using this API

Get Delhi Gold (XAU-DELH) Weekly Average Prices using this API
In the ever-evolving landscape of precious metals trading, the ability to access real-time and historical data is paramount for developers and traders alike. One of the most sought-after metals is Gold, represented by the symbol XAU. This blog post delves into how to obtain historical prices for Gold using the Metals-API, a powerful tool that provides comprehensive data on various metals, including Gold, Silver, Platinum, and Palladium. We will explore the innovative features of the Metals-API, its endpoints, and how it can empower developers to create next-generation applications in the precious metals market.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and its value is influenced by a myriad of factors, including market demand, geopolitical events, and economic indicators. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. With the integration of technology in trading, developers can leverage real-time data to enhance their trading strategies and decision-making processes.
The Metals-API stands at the forefront of this transformation, offering developers the tools necessary to innovate in price discovery and digital asset solutions. By utilizing the API, developers can access historical price data, analyze trends, and make informed decisions based on comprehensive market insights.
API Description
The Metals-API provides a robust suite of features designed to meet the needs of developers and traders. With its user-friendly interface and extensive documentation, the API enables users to retrieve real-time and historical data for various metals. The transformative potential of real-time metals data cannot be overstated, as it empowers developers to build applications that can adapt to market changes instantaneously.
Among the key features of the Metals-API are:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This allows traders to stay informed about the latest market movements.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve past prices for analysis and reporting.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time Bid and Ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, allowing users to convert any amount from one currency to another, facilitating seamless transactions.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling trend analysis over specific periods.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, which is crucial for understanding market volatility.
- Carat Endpoint: Get information about Gold rates by Carat, which is essential for jewelers and consumers alike.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date range, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, which is vital for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, offering a broader perspective on market trends.
- API Key: Your unique API key is essential for accessing the API's features and ensuring secure transactions.
- API Response: Exchange rates delivered by the Metals-API are relative to USD by default, providing a consistent basis for comparison.
- Available Endpoints: The API comes with 14 endpoints, each providing different functionalities tailored to various 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 the dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context for market movements.
Key Features and Endpoints
The Metals-API is designed to cater to the diverse needs of developers and traders. Below, we explore some of the most significant endpoints in detail, providing examples and explanations to illustrate their functionality.
Latest Rates Endpoint
The Latest Rates Endpoint is a crucial feature for traders who require up-to-the-minute information on metal prices. Depending on your subscription plan, this endpoint can return real-time exchange rates updated at intervals that suit your trading strategy.
{
"success": true,
"timestamp": 1757559691,
"base": "USD",
"date": "2025-09-11",
"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 includes a timestamp, base currency, date, and a list of rates for various metals, allowing traders to make informed decisions based on the latest market data.
Historical Rates Endpoint
Accessing historical rates is vital for analyzing market trends and making predictions. The Historical Rates Endpoint allows users to retrieve past prices for any date since 1999.
{
"success": true,
"timestamp": 1757473291,
"base": "USD",
"date": "2025-09-10",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This endpoint is particularly useful for backtesting trading strategies and understanding how market conditions have changed over time.
Time-Series Endpoint
The Time-Series Endpoint allows developers to query the API for daily historical rates between two specified dates. This feature is essential for conducting trend analysis over a defined period.
{
"success": true,
"timeseries": true,
"start_date": "2025-09-04",
"end_date": "2025-09-11",
"base": "USD",
"rates": {
"2025-09-04": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-09-06": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-09-11": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint provides a clear view of price movements over time, enabling traders to identify patterns and make data-driven decisions.
Convert Endpoint
The Convert Endpoint is a valuable tool for traders who need to convert amounts between different metals or to/from USD. This feature simplifies transactions and enhances user experience.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1757559691,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates the amount of Gold (in troy ounces) that corresponds to a specified amount in USD, facilitating easy conversions for traders.
Fluctuation Endpoint
Understanding market fluctuations is crucial for traders. The Fluctuation Endpoint provides insights into how metal prices change over time, allowing users to track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-09-04",
"end_date": "2025-09-11",
"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 provides a comprehensive view of price changes, helping traders understand market dynamics and make informed decisions.
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint is essential for technical analysis, providing open, high, low, and close prices for a specific date. This data is crucial for traders looking to analyze price movements and make predictions.
{
"success": true,
"timestamp": 1757559691,
"base": "USD",
"date": "2025-09-11",
"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 response provides a snapshot of price activity for the specified date, enabling traders to assess market performance effectively.
Bid/Ask Endpoint
The Bid/Ask Endpoint is a powerful feature that allows users to retrieve current bid and ask prices for metals. This information is vital for understanding market liquidity and making informed trading decisions.
{
"success": true,
"timestamp": 1757559691,
"base": "USD",
"date": "2025-09-11",
"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 essential pricing information, enabling traders to make quick and informed decisions based on current market conditions.
Conclusion
The Metals-API is a powerful tool for developers and traders seeking to access real-time and historical data for precious metals like Gold (XAU). With its extensive range of endpoints, the API empowers users to analyze market trends, make informed decisions, and innovate in the field of precious metals trading. By leveraging the capabilities of the Metals-API, developers can create applications that provide valuable insights and enhance trading strategies.
For more information on how to get started with the Metals-API, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals. Visit the Metals-API Website to learn more about how this innovative API can transform your approach to precious metals trading.