Get Patna Gold 22k (PATN-22k) Yearly Historical Prices using this API

Get Patna Gold 22k (PATN-22k) Yearly Historical Prices using this API
In the dynamic world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. This is particularly true for gold, represented by the symbol XAU, which has long been a standard for wealth preservation and investment. In this blog post, we will explore how to obtain historical prices for Patna Gold 22k (PATN-22k) using the Metals-API, a powerful tool that provides real-time and historical data for various metals, including gold.
About Gold (XAU)
Gold has been a symbol of wealth and a medium of exchange for centuries. In recent years, the digital transformation in precious metals has revolutionized how investors and traders access and analyze gold prices. With the advent of data analytics, market insights can now be derived from vast amounts of historical data, enabling traders to make more informed decisions.
The integration of technology in trading has also led to innovative solutions for price discovery. For instance, the Metals-API allows developers to build applications that can provide real-time updates on gold prices, analyze trends, and even predict future movements based on historical data. This capability is essential for anyone looking to invest in gold, whether for personal wealth or as part of a larger investment strategy.
Moreover, the rise of digital asset solutions has made it easier for investors to trade gold in various forms, including ETFs and digital gold currencies. As a result, having access to accurate and timely data is more important than ever. The Metals-API empowers developers to create next-generation applications that leverage real-time metals data, enhancing the trading experience.
API Description
The Metals-API is a comprehensive solution for accessing metals prices and historical data. It offers a range of endpoints that provide developers with the tools needed to build robust applications. The API is designed with innovation and technological advancement in mind, making it a transformative resource for anyone involved in the precious metals market.
For more information, you can visit the Metals-API Website or check the Metals-API Documentation for detailed guidance on how to use the API effectively.
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, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This is essential for traders who need the most current prices to make quick decisions.
- 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 for gold and other metals.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices, which are crucial for understanding market dynamics and making informed trading decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling you to convert any amount from one currency to another, facilitating transactions across different markets.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice, providing insights into price trends over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, which can help in understanding market volatility and making strategic decisions.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers looking to buy or sell gold jewelry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Get detailed OHLC data for a specific time period, which is essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: The API delivers exchange rates relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API provides a constantly updated list of all available currencies and metals.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local investors.
- News Endpoint: Stay updated with the latest news articles related to various metals, helping you keep abreast of 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 how to interact with the Metals-API is crucial for effective implementation. Below are examples of various endpoints and their JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1750147214,
"base": "USD",
"date": "2025-06-17",
"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 the current exchange rates for various metals, with XAU representing gold. The "unit" field specifies that the rates are per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1750060814,
"base": "USD",
"date": "2025-06-16",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to access historical rates for a specific date. The "rates" object contains the prices for gold and other metals on that date.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-06-10",
"end_date": "2025-06-17",
"base": "USD",
"rates": {
"2025-06-10": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-12": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-17": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint allows you to retrieve daily rates over a specified period, which is useful for trend analysis.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1750147214,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint demonstrates how to convert a specified amount from one metal to another, in this case, converting USD to gold.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-10",
"end_date": "2025-06-17",
"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, which is critical for understanding market trends.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1750147214,
"base": "USD",
"date": "2025-06-17",
"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 detailed OHLC data, which is essential for traders who rely on technical analysis to make decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1750147214,
"base": "USD",
"date": "2025-06-17",
"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 crucial information for traders, allowing them to understand the current market conditions and make informed decisions.
Conclusion
In conclusion, the Metals-API is an invaluable resource for anyone involved in the precious metals market, particularly for those interested in obtaining historical prices for Patna Gold 22k (PATN-22k). With its wide range of endpoints, the API provides developers with the tools needed to access real-time and historical data, enabling them to build innovative applications that enhance the trading experience.
By leveraging the capabilities of the Metals-API, traders can gain insights into market trends, make informed decisions, and ultimately improve their investment strategies. For more detailed information on how to implement these features, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals.
As the digital landscape continues to evolve, staying informed and utilizing advanced tools like the Metals-API will be essential for success in the precious metals market.