Download Patna Gold 18k (PATN-18k) Historical Prices through this API
Download Patna Gold 18k (PATN-18k) Historical Prices through this API
In today's digital age, the demand for accurate and real-time data is paramount, especially in the financial markets. For those interested in precious metals, particularly gold, accessing historical prices can provide invaluable insights for trading and investment strategies. The Metals-API offers a robust solution for developers looking to integrate historical price data for gold and other metals into their applications. This blog post will delve into the capabilities of the Metals-API, focusing on how to retrieve historical prices for Patna Gold 18k (PATN-18k) and other metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and investment for centuries. As a precious metal, it is not only a store of value but also a hedge against inflation and currency fluctuations. The digital transformation in the precious metals market has revolutionized how investors access and analyze gold prices. With the advent of data analytics and market insights, traders can now make informed decisions based on real-time data.
Technology integration in trading has led to innovative solutions for price discovery. The Metals-API stands at the forefront of this transformation, providing developers with the tools needed to build next-generation applications that leverage real-time metals data. By utilizing the API, developers can access a wealth of information, including historical prices, fluctuations, and conversion rates, all of which are essential for making strategic investment decisions.
API Description
The Metals-API is designed to empower developers with comprehensive access to metals pricing data. It offers a wide range of endpoints that cater to various needs, from retrieving the latest rates to accessing historical data dating back to 2019. The API's capabilities are not just limited to gold; it encompasses a variety of metals, including silver (XAG), platinum (XPT), and palladium (XPD).
One of the standout features of the Metals-API is its ability to provide real-time data updates. Depending on your subscription plan, the API can deliver exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This level of granularity allows developers to create applications that respond to market changes in real-time, enhancing the user experience and providing timely insights.
Key Features and Endpoints
The Metals-API includes several key features that make it a powerful tool for developers:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. Developers can access the latest rates for gold, silver, platinum, and more, ensuring they have the most current information at their fingertips.
- Historical Rates Endpoint: For those interested in analyzing trends, the historical rates endpoint allows users to query data dating back to 2019. By appending a specific date to the API request, developers can retrieve historical prices for any metal, including gold.
- Bid and Ask Endpoint: This feature enables developers to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts between different metals or to/from USD. This is particularly useful for traders who operate in multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two specified dates. This feature is invaluable for conducting in-depth analyses of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how metal prices fluctuate on a day-to-day basis, allowing traders to assess volatility and make informed decisions.
- Carat Endpoint: For those interested in gold rates by carat, this endpoint provides detailed information, enabling users to understand the value of gold in different purities.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access OHLC data for specific time periods, which is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a broader perspective on market trends.
- API Key: Each user is assigned a unique API key, which is required for authentication and access to the API's features.
- API Response: The Metals-API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The API boasts 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them 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 the API's response structure is crucial for effective integration. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1768782030,
"base": "USD",
"date": "2026-01-19",
"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
{
"success": true,
"timestamp": 1768695630,
"base": "USD",
"date": "2026-01-18",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-01-12",
"end_date": "2026-01-19",
"base": "USD",
"rates": {
"2026-01-12": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-14": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-19": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1768782030,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-12",
"end_date": "2026-01-19",
"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
{
"success": true,
"timestamp": 1768782030,
"base": "USD",
"date": "2026-01-19",
"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
{
"success": true,
"timestamp": 1768782030,
"base": "USD",
"date": "2026-01-19",
"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 seeking to integrate historical prices and real-time data for precious metals like gold into their applications. With its extensive range of endpoints and features, the API empowers users to access critical market information, analyze trends, and make informed trading decisions. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance the trading experience and provide users with the insights they need to succeed in the precious metals market.
For more detailed information on how to implement these features, refer to the Metals-API Documentation. Additionally, explore the Metals-API Supported Symbols page to familiarize yourself with the various metals available through the API. Start harnessing the power of real-time metals data today!