Explore Patna Gold 22k (PATN-22k) Historical Prices with this API

Introduction
In the ever-evolving landscape of financial markets, the ability to access and analyze historical prices of precious metals like gold is crucial for investors, traders, and developers alike. This blog post delves into the historical prices of Patna Gold 22k (PATN-22k) and explores how to efficiently retrieve this data using the Metals-API. With its innovative approach to real-time metals data, Metals-API empowers developers to create next-generation applications that can analyze market trends, optimize trading strategies, and enhance decision-making processes.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. As a precious metal, it plays a pivotal role in the global economy, serving as a hedge against inflation and currency fluctuations. The digital transformation in precious metals trading has opened new avenues for investors and developers, allowing for the integration of advanced data analytics and market insights into trading strategies.
The integration of technology in trading has revolutionized the way market participants access information. With the advent of APIs like Metals-API, developers can harness the power of real-time data to innovate in price discovery and create digital asset solutions that cater to the needs of modern investors. This API not only provides historical prices but also offers a suite of features that enhance the trading experience.
API Description
The Metals-API is designed to provide comprehensive access to metals pricing data, enabling developers to build applications that require accurate and timely information. With a focus on innovation and technological advancement, this API allows users to retrieve real-time and historical data for various metals, including gold, silver, platinum, and palladium.
One of the standout features of Metals-API is its ability to deliver real-time exchange rate data, updated at intervals based on the user's subscription plan. This capability is essential for developers looking to create applications that require up-to-the-minute pricing information. Furthermore, the API's historical rates endpoint allows users to access data dating back to 2019, making it an invaluable resource for trend analysis and market research.
Key Features and Endpoints
Metals-API offers a range of endpoints that cater to different data retrieval needs. The Latest Rates Endpoint provides real-time exchange rate data for all available metals, allowing developers to access current market prices effortlessly. Depending on the subscription plan, this endpoint can return data updated every 60 minutes or even more frequently.
The Historical Rates Endpoint is particularly useful for those interested in analyzing past market performance. Users can query historical rates by appending a specific date to the API request, enabling them to retrieve data for any date since 2019. This feature is essential for conducting thorough market analyses and understanding price trends over time.
Another powerful feature is the Bid and Ask Endpoint, which provides real-time bid and ask prices for metals. This information is crucial for traders looking to make informed decisions based on current market conditions. The API's Convert Endpoint allows users to convert amounts from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
The Time-Series Endpoint enables users to query daily historical rates between two specified dates, providing a comprehensive view of price movements over time. This is particularly beneficial for developers looking to analyze trends and fluctuations in the market.
For those interested in understanding market volatility, the Fluctuation Endpoint offers insights into how currencies fluctuate on a day-to-day basis. This feature is invaluable for risk management and strategic planning.
The Carat Endpoint allows users to retrieve gold rates by carat, providing a more granular view of gold pricing that can be useful for jewelers and consumers alike. Additionally, the Lowest/Highest Price Endpoint enables users to query the API for the lowest and highest prices within a specified timeframe, offering insights into market extremes.
For a more detailed analysis, the Open/High/Low/Close (OHLC) Price Endpoint provides essential data points that traders often rely on for technical analysis. This endpoint allows users to retrieve the open, high, low, and close prices for a specific date, facilitating informed trading decisions.
Furthermore, the Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008, making it a valuable resource for those interested in the London Metal Exchange.
To access these features, users must utilize their unique API Key, which is passed into the API base URL's access_key parameter. The API response delivers exchange rates relative to USD by default, ensuring consistency across data retrieval.
For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page. This resource is essential for developers looking to understand the range of metals available through the API.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for developers. Below are examples of various API endpoints and their corresponding JSON responses.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1759968179,
"base": "USD",
"date": "2025-10-09",
"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 retrieval of the latest rates, with the base currency being USD. The rates for various metals are provided in terms of troy ounces.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1759881779,
"base": "USD",
"date": "2025-10-08",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for a specific date, allowing users to analyze past market performance.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-10-02",
"end_date": "2025-10-09",
"base": "USD",
"rates": {
"2025-10-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-10-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-09": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of exchange rates, allowing users to visualize trends over a specified period.
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": 1759968179,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates a successful conversion from USD to gold, providing the equivalent amount in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-02",
"end_date": "2025-10-09",
"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"
}
This response provides insights into how the rates have fluctuated over a specified period, which is essential for understanding market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1759968179,
"base": "USD",
"date": "2025-10-09",
"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 response provides essential data points for traders, allowing them to analyze market trends and make informed decisions.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1759968179,
"base": "USD",
"date": "2025-10-09",
"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"
}
This response provides the current bid and ask prices, which are crucial for traders looking to execute trades at optimal prices.
Conclusion
In conclusion, the Metals-API offers a robust and comprehensive solution for accessing historical prices of precious metals like Patna Gold 22k (PATN-22k). With its suite of features, including real-time rates, historical data, and various endpoints tailored for different needs, developers can create powerful applications that enhance trading strategies and market analysis.
By leveraging the capabilities of Metals-API, developers can tap into the transformative potential of real-time metals data, enabling them to innovate in price discovery and create solutions that meet the demands of modern investors. Whether you're looking to analyze historical trends or access current market data, Metals-API provides the tools necessary to succeed in the dynamic world of precious metals trading.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Metals-API Supported Symbols page for a complete list of available metals. Embrace the future of trading with Metals-API and unlock the potential of precious metals data.