Get Chandigarh Gold 24k (CHAN-24k) prices in different currencies using this API
Introduction
In today's rapidly evolving financial landscape, the demand for accurate and real-time data on precious metals, particularly Gold (XAU), has surged. Developers and traders alike seek reliable sources to obtain current and historical pricing information across various currencies. The Metals-API stands out as a powerful tool that provides comprehensive access to gold prices and other metal rates. This blog post delves into the intricacies of the Metals-API, exploring its capabilities, endpoints, and how it can be leveraged to enhance trading strategies and market analysis.
About Gold (XAU)
Gold has long been regarded as a safe-haven asset and a store of value. Its significance in the global economy cannot be overstated, as it plays a crucial role in investment portfolios, jewelry manufacturing, and as a hedge against inflation. With the digital transformation of financial markets, the integration of technology in trading and price discovery has become essential. The Metals-API facilitates this transformation by providing real-time data analytics and market insights, empowering developers to create innovative applications that cater to the needs of traders and investors.
Digital Transformation in Precious Metals
The advent of digital technologies has revolutionized how precious metals are traded. The Metals-API exemplifies this transformation by offering a seamless interface for accessing real-time and historical data on gold and other metals. This API enables developers to build applications that can analyze market trends, track price fluctuations, and provide users with actionable insights. By harnessing the power of data analytics, traders can make informed decisions based on current market conditions.
API Description
The Metals-API is a robust JSON API that provides real-time and historical pricing data for various metals, including Gold (XAU). It empowers developers to build next-generation applications that require accurate and timely information. With features such as the latest rates, historical rates, and currency conversion, the Metals-API is designed to meet the diverse needs of the financial community. For detailed documentation on how to implement the API, visit the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data retrieval 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 the plan, updates can occur every 60 minutes or every 10 minutes. This feature is crucial for traders who need the most current pricing information to make timely decisions.
- Historical Rates Endpoint: Access historical rates dating back to 2019 for most currencies. By appending a specific date in the format YYYY-MM-DD, users can retrieve past pricing data, which is essential for trend analysis and market research.
- 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 vital for traders looking to optimize their entry and exit points in the market.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that enables users to convert any amount from one currency to another. This is particularly useful for traders operating in multiple currencies, as it simplifies the process of calculating equivalent values.
- Time-Series Endpoint: Users can query the API for daily historical rates between two specified dates. This feature is beneficial for analyzing price movements over time and identifying patterns that may influence trading strategies.
- Fluctuation Endpoint: This endpoint provides insights into how currencies fluctuate on a day-to-day basis. By tracking fluctuations, traders can better understand market volatility and adjust their strategies accordingly.
- Carat Endpoint: Retrieve information about gold rates by carat. This feature is particularly useful for jewelers and consumers interested in the value of gold jewelry.
- Lowest/Highest Price Endpoint: Users can query the API to obtain the lowest and highest prices for a specified date, allowing for a comprehensive analysis of market performance.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific time period, which is essential for technical analysis and trading strategies.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008. This endpoint is valuable for users interested in long-term trends in the metals market.
- API Key: Each user is assigned a unique API key that must be included in the API requests to authenticate and authorize access to the data.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API provides 14 different endpoints, each designed to fulfill specific data retrieval needs, ensuring comprehensive coverage of the metals market.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, allowing users to stay informed about the symbols they can query.
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 structure of API responses is crucial for effective implementation. Below are examples of responses from various endpoints:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1784592643,
"base": "USD",
"date": "2026-07-21",
"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": 1784506243,
"base": "USD",
"date": "2026-07-20",
"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": "2026-07-14",
"end_date": "2026-07-21",
"base": "USD",
"rates": {
"2026-07-14": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-16": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-21": {
"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": 1784592643,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-14",
"end_date": "2026-07-21",
"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": 1784592643,
"base": "USD",
"date": "2026-07-21",
"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": 1784592643,
"base": "USD",
"date": "2026-07-21",
"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 an invaluable resource for developers and traders seeking accurate and real-time data on precious metals, particularly Gold (XAU). With its extensive range of endpoints, including the latest rates, historical data, and conversion capabilities, the API empowers users to make informed trading decisions and analyze market trends effectively. By integrating the Metals-API into their applications, developers can harness the power of real-time data analytics to create innovative solutions that cater to the evolving needs of the financial community. 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 symbols.