Get Patna Gold 22k (PATN-22k) Historical Prices for Investment Strategy using this API

Get Patna Gold 22k (PATN-22k) Historical Prices for Investment Strategy using this API
In the world of investment, understanding the historical prices of assets is crucial for making informed decisions. For those interested in precious metals, particularly gold, the Metals-API provides a powerful tool for accessing historical price data. This blog post will delve into the significance of Patna Gold 22k (PATN-22k) and how to effectively utilize the Metals-API to retrieve historical prices, empowering investors to devise robust investment strategies.
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth preservation and investment. Its allure transcends cultures and centuries, making it a preferred choice for investors seeking stability in uncertain economic climates. The digital transformation in the precious metals market has revolutionized how investors access and analyze data. With the advent of data analytics and market insights, investors can now leverage technology to make informed decisions based on real-time data.
The integration of technology in trading has led to innovative solutions for price discovery. Investors can now access digital asset solutions that provide transparency and efficiency in trading gold. The Metals-API stands at the forefront of this transformation, offering developers the tools necessary to build next-generation applications that harness the power of real-time metals data.
API Description
The Metals-API is a comprehensive JSON API that provides access to real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API empowers developers to create applications that can analyze market trends, track price fluctuations, and facilitate currency conversions. With its innovative capabilities, the Metals-API is a game-changer for anyone involved in the precious metals market.
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 ensures that investors have access to the most current information, allowing them to make timely decisions.
Moreover, the Metals-API offers a Historical Rates Endpoint that allows users to query historical rates dating back to 2019. This feature is invaluable for investors looking to analyze past performance and identify trends. By appending a specific date to the API request, users can retrieve historical prices for gold and other metals, enabling them to craft informed investment strategies.
Key Features and Endpoints
The Metals-API boasts 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 for all available metals. For example, a request to this endpoint might return the current price of gold in USD, allowing investors to gauge the market at a glance.
- Historical Rates Endpoint: Investors can access historical exchange rates for any date since 1999. This is particularly useful for analyzing trends over time and making predictions based on past performance.
- Bid And Ask Endpoint: This feature enables users to retrieve real-time bid and ask prices for metals, providing insight into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts from one metal to another or to/from USD. This is essential for investors dealing in multiple currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice. This is particularly useful for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: This endpoint provides information about how metal prices fluctuate on a day-to-day basis, helping investors understand volatility and market trends.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is essential for jewelers and consumers interested in purchasing gold jewelry.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest price for a specified date, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a broader perspective on metal prices.
- API Key: Users must pass their unique API key into the API base URL's access_key parameter to authenticate their requests.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API comes with a constantly updated endpoint returning all available currencies, ensuring users have access to the latest information.
- Gold Price India Endpoint: This dedicated endpoint allows users to retrieve the latest gold price in India, catering to a significant market segment.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
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
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1751853786,
"base": "USD",
"date": "2025-07-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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1751767386,
"base": "USD",
"date": "2025-07-06",
"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": "2025-06-30",
"end_date": "2025-07-07",
"base": "USD",
"rates": {
"2025-06-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-07-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-07": {
"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": 1751853786,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-30",
"end_date": "2025-07-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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1751853786,
"base": "USD",
"date": "2025-07-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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1751853786,
"base": "USD",
"date": "2025-07-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"
}
Conclusion
The Metals-API is an invaluable resource for developers and investors alike, providing comprehensive access to real-time and historical data for precious metals. By leveraging the capabilities of this API, investors can gain insights into market trends, analyze historical prices, and make informed decisions regarding their investments in gold and other metals.
With features such as the Latest Rates Endpoint, Historical Rates Endpoint, and Time-Series Endpoint, users can easily access the data they need to craft effective investment strategies. The API's flexibility and comprehensive documentation, available at the Metals-API Documentation, make it an essential tool for anyone looking to navigate the complexities of the precious metals market.
For a complete list of supported symbols, including gold, silver, platinum, and palladium, visit the Metals-API Supported Symbols page. Whether you are a seasoned investor or a developer looking to integrate metals data into your applications, the Metals-API offers the tools and insights necessary to succeed in today's dynamic market.
In summary, the ability to access historical prices and real-time data through the Metals-API empowers investors to make data-driven decisions, ensuring they stay ahead in the competitive world of precious metals investment.