Learn how to get Chandigarh Gold 22k (CHAN-22k) Historical Prices with this API
 
                                Introduction
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. For developers and traders interested in Chandigarh Gold 22k (CHAN-22k), the Metals-API provides a powerful solution for retrieving historical prices and other essential data. This blog post will explore how to effectively utilize the Metals-API to access historical prices for gold and other metals, focusing on the innovative features that make this API a game-changer in the precious metals market.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth and investment. As a digital transformation sweeps through the financial sector, the integration of data analytics and technology in precious metals trading is becoming increasingly important. The Metals-API allows developers to harness real-time data, providing insights that were previously difficult to obtain.
With the rise of digital asset solutions, traders can now leverage advanced data analytics to make better decisions. The Metals-API not only offers historical price data but also empowers developers to build applications that can analyze market trends, track price fluctuations, and optimize trading strategies. This innovation in price discovery is essential for anyone looking to stay ahead in the competitive world of precious metals.
API Description
The Metals-API is designed to provide developers with comprehensive access to metals pricing data. Its capabilities include real-time updates, historical data retrieval, and various endpoints that cater to different needs. By integrating this API into their applications, developers can create next-generation solutions that enhance trading efficiency and market analysis.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on your subscription plan, the API can provide updates every 60 minutes, every 10 minutes, or even more frequently. This level of granularity allows traders to react swiftly to market changes, ensuring they never miss an opportunity.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that serve different purposes, making it a versatile tool for developers. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates endpoint provides real-time exchange rates for all available metals. This endpoint is essential for traders who need up-to-the-minute pricing information. The response includes the base currency, the date of the rates, and the current rates for various metals.
{
    "success": true,
    "timestamp": 1761350543,
    "base": "USD",
    "date": "2025-10-25",
    "rates": {
        "XAU": 0.000482,
        "XAG": 0.03815,
        "XPT": 0.000912,
        "XPD": 0.000744
    },
    "unit": "per troy ounce"
}Historical Rates Endpoint
For those interested in analyzing past trends, the Historical Rates endpoint allows users to access historical exchange rates dating back to 2019. By appending a specific date to the API call, developers can retrieve valuable data that can inform trading strategies.
{
    "success": true,
    "timestamp": 1761264143,
    "base": "USD",
    "date": "2025-10-24",
    "rates": {
        "XAU": 0.000485,
        "XAG": 0.03825,
        "XPT": 0.000915,
        "XPD": 0.000748
    },
    "unit": "per troy ounce"
}Bid And Ask Endpoint
The Bid and Ask endpoint is a powerful feature that enables users to retrieve real-time bid and ask prices for metals. This information is crucial for traders looking to execute orders at the best possible prices.
{
    "success": true,
    "timestamp": 1761350543,
    "base": "USD",
    "date": "2025-10-25",
    "rates": {
        "XAU": {
            "bid": 0.000481,
            "ask": 0.000483,
            "spread": 2.0e-6
        },
        "XAG": {
            "bid": 0.0381,
            "ask": 0.0382,
            "spread": 0.0001
        }
    },
    "unit": "per troy ounce"
}Convert Endpoint
The Convert endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders who need to quickly assess the value of their holdings in different currencies.
{
    "success": true,
    "query": {
        "from": "USD",
        "to": "XAU",
        "amount": 1000
    },
    "info": {
        "timestamp": 1761350543,
        "rate": 0.000482
    },
    "result": 0.482,
    "unit": "troy ounces"
}Time-Series Endpoint
The Time-Series endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for conducting in-depth analyses of price movements over time.
{
    "success": true,
    "timeseries": true,
    "start_date": "2025-10-18",
    "end_date": "2025-10-25",
    "base": "USD",
    "rates": {
        "2025-10-18": {
            "XAU": 0.000485,
            "XAG": 0.03825
        },
        "2025-10-20": {
            "XAU": 0.000483,
            "XAG": 0.0382
        },
        "2025-10-25": {
            "XAU": 0.000482,
            "XAG": 0.03815
        }
    },
    "unit": "per troy ounce"
}Fluctuation Endpoint
The Fluctuation endpoint provides information about how currencies fluctuate on a day-to-day basis. This data can help traders identify trends and make predictions about future price movements.
{
    "success": true,
    "fluctuation": true,
    "start_date": "2025-10-18",
    "end_date": "2025-10-25",
    "base": "USD",
    "rates": {
        "XAU": {
            "start_rate": 0.000485,
            "end_rate": 0.000482,
            "change": -3.0e-6,
            "change_pct": -0.62
        }
    },
    "unit": "per troy ounce"
}Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price endpoint allows users to retrieve open, high, low, and close prices for a specific time period. This data is essential for traders looking to understand market volatility and price trends.
{
    "success": true,
    "timestamp": 1761350543,
    "base": "USD",
    "date": "2025-10-25",
    "rates": {
        "XAU": {
            "open": 0.000485,
            "high": 0.000487,
            "low": 0.000481,
            "close": 0.000482
        }
    },
    "unit": "per troy ounce"
}Historical LME Endpoint
The Historical LME endpoint provides access to historical rates for LME symbols dating back to 2008. This feature is particularly useful for traders interested in the London Metal Exchange.
API Key and Authentication
To access the Metals-API, users must obtain an API key, which is passed into the API base URL's access_key parameter. This key ensures that only authorized users can access the data, providing a layer of security and control.
API Response Structure
The API responses are structured to provide clarity and ease of use. By default, exchange rates are relative to USD, and all data is returned in a JSON format. Understanding the structure of these responses is crucial for developers looking to integrate the API into their applications.
Common Use Cases and Integration Strategies
Developers can leverage the Metals-API in various ways to enhance their applications. Here are some common use cases:
- Trading Platforms: Integrate real-time pricing data to provide users with up-to-date information on metal prices.
- Market Analysis Tools: Use historical data to analyze trends and make predictions about future price movements.
- Portfolio Management: Track the value of metal holdings and convert between different currencies seamlessly.
When integrating the Metals-API, developers should consider performance optimization strategies, such as caching frequently accessed data and implementing rate limiting to avoid exceeding API usage quotas.
Conclusion
The Metals-API is a powerful tool for developers looking to access historical prices and real-time data for precious metals like Chandigarh Gold 22k (CHAN-22k). By leveraging its innovative features, developers can create applications that provide valuable insights and enhance trading strategies. With comprehensive documentation available at the Metals-API Documentation and a complete list of supported symbols at the Metals-API Supported Symbols, developers have all the resources they need to get started. Embracing the digital transformation in precious metals trading is essential for staying competitive in today's market.