Get Chennai Gold 22k (CHEN-22k) Daily Historical Prices using this API

Get Chennai Gold 22k (CHEN-22k) Daily Historical Prices using this API
In today's digital age, the demand for real-time data and analytics has transformed the landscape of precious metals trading. For developers and traders alike, having access to accurate and timely information about gold prices is crucial. This blog post will explore how to obtain historical prices for Chennai Gold 22k (CHEN-22k) using the Metals-API, a powerful tool that provides comprehensive data on various metals, including gold (XAU). We will delve into the capabilities of the Metals-API, its endpoints, and how it can empower developers to create innovative applications in the precious metals market.
About Gold (XAU)
Gold has long been regarded as a safe haven asset, particularly during times of economic uncertainty. Its value is influenced by various factors, including market demand, geopolitical events, and currency fluctuations. With the rise of digital transformation in the precious metals sector, traders now have access to advanced data analytics and market insights that were previously unavailable. The integration of technology in trading has revolutionized price discovery, enabling investors to make informed decisions based on real-time data.
The Metals-API plays a pivotal role in this transformation by providing developers with the tools necessary to access and analyze gold prices effectively. By leveraging the API's capabilities, developers can build applications that offer innovative digital asset solutions, allowing users to track gold prices, analyze trends, and make data-driven investment decisions.
API Description
The Metals-API is designed to provide real-time and historical data on various metals, including gold, silver, platinum, and palladium. It empowers developers to create next-generation applications that require accurate and timely metals data. The API offers a range of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, which is updated frequently based on the user's subscription plan. This ensures that developers and traders have access to the most current information, enabling them to react swiftly to market changes.
For more detailed information about the API's capabilities, you can refer to the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to fulfill specific requirements. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, every 10 minutes, or even more frequently, depending on the subscription plan. This feature is essential for traders who need to stay informed about the latest market movements.
- 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 past prices, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates, facilitating comprehensive analysis of price movements over time.
- Fluctuation Endpoint: Users can track how metal 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, catering to specific market needs in regions where gold is traded in different carat weights.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is crucial for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, enabling traders to analyze market performance comprehensively.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a broader perspective on metal pricing.
- API Key: Each user is assigned a unique API key, which is required for authentication when making requests to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The 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, allowing users to stay updated on the latest symbols supported by the API.
- Gold Price India Endpoint: This dedicated endpoint retrieves the latest gold price in India, catering to regional market demands.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them 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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. 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": 1746943219,
"base": "USD",
"date": "2025-05-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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1746856819,
"base": "USD",
"date": "2025-05-10",
"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": "2025-05-04",
"end_date": "2025-05-11",
"base": "USD",
"rates": {
"2025-05-04": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-06": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-11": {
"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": 1746943219,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-04",
"end_date": "2025-05-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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1746943219,
"base": "USD",
"date": "2025-05-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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1746943219,
"base": "USD",
"date": "2025-05-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"
}
Conclusion
The Metals-API is a powerful resource for developers looking to access real-time and historical data on precious metals, particularly gold. By utilizing its various endpoints, developers can create innovative applications that provide users with valuable insights into market trends and price movements. The ability to retrieve historical prices, track fluctuations, and convert between different metals and currencies makes the Metals-API an essential tool for anyone involved in the precious metals market.
For more information on how to implement these features and access the full range of capabilities offered by the Metals-API, be sure to check out the Metals-API Documentation. Whether you are a seasoned trader or a developer looking to build the next big application in the precious metals space, the Metals-API provides the data and tools you need to succeed.