Access Patna Gold 22k (PATN-22k) Historical Prices Easily with Metals-API

Access Patna Gold 22k (PATN-22k) Historical Prices Easily with Metals-API
In today's fast-paced financial landscape, the ability to access historical prices for precious metals like gold is essential for traders, investors, and developers alike. The Metals-API provides a powerful solution for obtaining real-time and historical data on various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). This blog post delves into the capabilities of the Metals-API, focusing on how to effectively retrieve historical prices for Patna Gold 22k (PATN-22k) and other precious metals.
About Gold (XAU)
Gold has long been regarded as a safe haven asset, a hedge against inflation, and a store of value. In recent years, the digital transformation in the precious metals market has revolutionized how investors and traders interact with gold. The integration of data analytics and market insights has enabled more informed decision-making, while technology has streamlined trading processes and enhanced price discovery.
As the demand for digital asset solutions grows, the need for reliable and real-time data becomes paramount. The Metals-API stands at the forefront of this transformation, offering developers the tools necessary to build next-generation applications that leverage real-time metals data. With its robust API, users can access a wealth of information, including historical prices, market trends, and fluctuations, all of which are crucial for making informed investment decisions.
API Description
The Metals-API is a comprehensive JSON API that provides access to real-time and historical prices for various metals. It empowers developers to create applications that can analyze market trends, perform currency conversions, and retrieve detailed price information. The API's capabilities are designed to support a wide range of use cases, from simple price retrieval to complex data analysis.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated at intervals depending on the user's subscription plan. This ensures that developers and traders have access to the most current information available, allowing for timely decision-making.
For those interested in historical data, the Metals-API offers a Historical Rates Endpoint that allows users to query prices dating back to 2019. This is particularly useful for analyzing market trends over time and making predictions based on historical performance.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to cater to specific needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. Depending on your subscription plan, updates can occur every 60 minutes or every 10 minutes. This is essential for traders who need the latest information to make quick decisions.
- Historical Rates Endpoint: Users can access historical exchange rates for any date since 2019. By appending a specific date to the API request, developers can retrieve valuable historical data for analysis.
- Bid and Ask Endpoint: This feature allows users to obtain real-time bid and ask prices for metals. Understanding the spread between these prices is crucial for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that allows users to convert amounts between different metals or to/from USD. This is particularly useful for traders operating in multiple currencies.
- Time-Series Endpoint: This endpoint enables users to query daily historical rates between two specified dates. It is ideal for analyzing trends over specific periods.
- Fluctuation Endpoint: Users can track how metal prices fluctuate between two dates. This information can help traders understand market volatility and make informed decisions.
- Carat Endpoint: This feature allows users to retrieve gold rates by carat, providing a more granular view of gold pricing.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for a specified date range, which is useful for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for extensive market analysis.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access 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 offers a comprehensive list of endpoints, each tailored to specific functionalities, which can be explored in detail in the Metals-API Documentation.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available metal symbols, ensuring users have access to the latest information.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: The Metals-API also includes a news endpoint that retrieves the latest 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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1744005618,
"base": "USD",
"date": "2025-04-07",
"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 a successful request, providing the latest exchange rates for various metals relative to USD. Each rate is expressed in terms of troy ounces, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1743919218,
"base": "USD",
"date": "2025-04-06",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example demonstrates how to retrieve historical rates for a specific date. The response includes the rates for gold, silver, platinum, and palladium, allowing for comparative analysis.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-03-31",
"end_date": "2025-04-07",
"base": "USD",
"rates": {
"2025-03-31": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows users to analyze trends over a specified period. The response includes daily rates for each date within the range, making it easier to visualize price movements.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1744005618,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert a specified amount from one currency to another. In this case, it shows the conversion of 1000 USD to gold (XAU), providing the equivalent amount in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-03-31",
"end_date": "2025-04-07",
"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"
}
The fluctuation endpoint provides insights into how prices have changed over a specified period. This information is crucial for traders looking to understand market dynamics and make informed decisions.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1744005618,
"base": "USD",
"date": "2025-04-07",
"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 endpoint provides a comprehensive view of market performance for a specific date, detailing the opening, highest, lowest, and closing prices for each metal. This data is essential for traders looking to analyze daily market trends.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1744005618,
"base": "USD",
"date": "2025-04-07",
"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"
}
The bid/ask endpoint provides critical information for traders, allowing them to understand the current market spread for each metal. This data is vital for executing trades at optimal prices.
Conclusion
The Metals-API is a powerful tool for developers and traders looking to access real-time and historical data on precious metals like gold. With its extensive range of endpoints, users can retrieve the latest rates, historical prices, and detailed market insights, enabling them to make informed decisions in a rapidly changing market.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that harness the power of real-time data analytics, enhancing their trading strategies and market analysis. Whether you are looking to track the historical prices of Patna Gold 22k (PATN-22k) or analyze market trends, the Metals-API provides the necessary tools to succeed.
For more information on how to get started, refer to the Metals-API Documentation and explore the various endpoints available. Don't forget to check the Metals-API Supported Symbols page for a comprehensive list of available metals. Start integrating the Metals-API into your applications today and unlock the potential of real-time metals data.