Get Chandigarh Gold 22k (CHAN-22k) Historical Prices for your application via this API
Get Chandigarh Gold 22k (CHAN-22k) Historical Prices for Your Application via This API
In the world of precious metals, gold remains a significant asset, both as a store of value and a trading commodity. For developers looking to integrate historical price data into their applications, the Metals-API offers a robust solution. This blog post will delve into the intricacies of the Metals-API, focusing on how to access historical prices for Gold (XAU) and other metals, while also exploring the broader implications of digital transformation in the precious metals market.
About Gold (XAU)
Gold, represented by the symbol XAU, is more than just a shiny metal; it is a cornerstone of the global economy. The digital transformation in precious metals trading has revolutionized how investors and developers interact with market data. With the rise of data analytics and technology integration, the landscape of trading has shifted dramatically. Developers can now leverage real-time data to gain market insights, innovate in price discovery, and create digital asset solutions that cater to a diverse range of users.
As the demand for accurate and timely data grows, the Metals-API stands out as a powerful tool for developers. This API not only provides access to current and historical prices but also enables users to analyze trends, fluctuations, and market movements effectively. By integrating the Metals-API into applications, developers can empower users with the information they need to make informed decisions in the precious metals market.
API Description
The Metals-API is designed to provide developers with seamless access to real-time and historical data for various metals, including Gold, Silver, Platinum, and Palladium. With its innovative capabilities, the API allows for the creation of next-generation applications that can analyze and visualize precious metal prices. The API's architecture supports a wide range of functionalities, making it an essential tool for anyone involved in trading or investing in metals.
For more detailed information, you can visit the Metals-API Website or check out the Metals-API Documentation for comprehensive guidance on implementation.
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 or even every 10 minutes. This feature is crucial for applications that require the most current pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve past prices, which is essential for trend analysis and forecasting.
- Bid and Ask Endpoint: This feature allows you to retrieve real-time Bid and Ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The conversion endpoint enables users to convert amounts from one metal to another or to/from USD. This is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This endpoint is invaluable for analyzing price movements over specific periods.
- Fluctuation Endpoint: Retrieve information about how metal prices fluctuate on a day-to-day basis, helping users understand market volatility.
- Carat Endpoint: This endpoint provides information about Gold rates by Carat, allowing for precise calculations in jewelry and other applications.
- Lowest/Highest Price Endpoint: 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 allows you to get the open, high, low, and close prices for a specific date, providing a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is crucial for users interested in long-term trends.
- API Key: Your unique API key is essential for accessing the API and must be included in your requests.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API provides 14 different endpoints, each designed to fulfill specific data needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring users can access the most relevant data.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users informed about market developments.
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's response structure is crucial for effective integration. Here are some examples of how the API responds to various requests:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1768782158,
"base": "USD",
"date": "2026-01-19",
"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 API successfully retrieved the latest rates for various metals, with Gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1768695758,
"base": "USD",
"date": "2026-01-18",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows a successful request for historical rates, providing the price of Gold on a specific date.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-12",
"end_date": "2026-01-19",
"base": "USD",
"rates": {
"2026-01-12": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-14": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-19": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response illustrates how to retrieve exchange rates for a specific time period, allowing for detailed analysis of price trends.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1768782158,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The Convert Endpoint allows users to convert amounts between different metals and currencies, providing a result of 0.482 troy ounces for 1000 USD.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-12",
"end_date": "2026-01-19",
"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 insights into how metal prices fluctuate over time, which is vital for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1768782158,
"base": "USD",
"date": "2026-01-19",
"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 data provides a comprehensive view of market performance for a specific date, essential for technical analysis.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1768782158,
"base": "USD",
"date": "2026-01-19",
"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 metals, which is crucial for traders looking to enter or exit positions.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for developers looking to integrate precious metals data into their applications. With features like real-time rates, historical data, and advanced endpoints for conversion and fluctuation tracking, the API empowers users to make informed decisions in the dynamic world of metal trading. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance user experience and provide valuable market insights.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Metals-API Supported Symbols page. Embrace the future of precious metals trading by integrating real-time data into your applications today!