Query Patna Gold 18k (PATN-18k) Historical Prices for investment insights using this API
Introduction
Investing in gold has long been a favored strategy for those looking to diversify their portfolios and hedge against economic uncertainty. With the rise of digital transformation in the financial sector, accessing historical prices for gold, specifically Patna Gold 18k (PATN-18k), has become easier than ever. The Metals-API provides a robust platform for developers to retrieve real-time and historical data on precious metals, including gold (XAU). This blog post will delve into the capabilities of the Metals-API, exploring how it empowers developers to gain insights into gold prices and make informed investment decisions.
About Gold (XAU)
Gold, represented by the symbol XAU, is not just a commodity; it is a symbol of wealth and stability. As the world shifts towards digital solutions, the integration of technology in trading gold has transformed how investors access market data. The Metals-API stands at the forefront of this transformation, offering developers the tools needed to analyze gold prices through data analytics and market insights.
With the advent of digital asset solutions, investors can now leverage real-time data to make informed decisions. The Metals-API provides a comprehensive suite of endpoints that allow users to explore various aspects of gold trading, from price discovery to historical trends. By utilizing this API, developers can create innovative applications that enhance the trading experience and provide valuable insights into market fluctuations.
API Description
The Metals-API is a powerful tool designed for developers seeking to access real-time and historical data on precious metals. It offers a wide range of functionalities, enabling users to build next-generation applications that cater to the evolving needs of investors. With its focus on innovation and technological advancement, the Metals-API empowers developers to harness the transformative potential of real-time metals data.
For more information, you can visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, allowing developers to access a wealth of information about gold and other precious metals. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for gold and other metals. Depending on the subscription plan, this endpoint can return data updated every 60 minutes or even every 10 minutes. This feature is crucial for traders who need to stay informed about the latest market conditions.
{
"success": true,
"timestamp": 1779841092,
"base": "USD",
"date": "2026-05-27",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for gold dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the Metals-API for past rates, enabling them to analyze trends over time.
{
"success": true,
"timestamp": 1779754692,
"base": "USD",
"date": "2026-05-26",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that provides real-time bid and ask prices for gold and other metals. This information is essential for traders looking to make quick decisions based on current market conditions.
{
"success": true,
"timestamp": 1779841092,
"base": "USD",
"date": "2026-05-27",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for investors who want to understand the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1779841092,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint enables users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for conducting in-depth analyses of price movements over specific periods.
{
"success": true,
"timeseries": true,
"start_date": "2026-05-20",
"end_date": "2026-05-27",
"base": "USD",
"rates": {
"2026-05-20": {
"XAU": 0.000485
},
"2026-05-27": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how gold prices fluctuate on a day-to-day basis. By tracking rate changes between two dates, developers can gain insights into market volatility.
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-20",
"end_date": "2026-05-27",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows users to retrieve the open, high, low, and close prices for gold over a specified period. This data is crucial for technical analysis and helps traders make informed decisions based on historical performance.
{
"success": true,
"timestamp": 1779841092,
"base": "USD",
"date": "2026-05-27",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint allows users to query the API for the lowest and highest prices of gold over a specified date range. This feature is beneficial for identifying price extremes and making strategic investment decisions.
{
"success": true,
"timestamp": 1779841092,
"base": "USD",
"date": "2026-05-27",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for developers interested in analyzing historical data for various metals.
{
"success": true,
"timestamp": 1779754692,
"base": "USD",
"date": "2026-05-26",
"rates": {
"XAU": 0.000485
},
"unit": "per troy ounce"
}
API Key and Response
Your API Key is essential for accessing the Metals-API. It is passed into the API base URL's access_key parameter to authenticate requests. The API delivers exchange rates relative to USD by default, ensuring that users receive consistent data across different queries.
For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
Practical Use Cases and Integration Strategies
Developers can leverage the Metals-API in various ways to enhance their applications. Here are some practical use cases:
Investment Analysis Tools
By integrating the Metals-API into investment analysis tools, developers can provide users with real-time data on gold prices, historical trends, and price fluctuations. This information can help investors make informed decisions based on market conditions.
Trading Platforms
Trading platforms can utilize the API to offer users real-time bid and ask prices, enabling them to execute trades at optimal times. The integration of the Bid and Ask Endpoint can enhance the trading experience by providing users with accurate market data.
Portfolio Management Applications
Portfolio management applications can benefit from the historical rates and time-series endpoints, allowing users to track their investments over time and analyze performance. By providing insights into price movements, these applications can help users optimize their portfolios.
Conclusion
The Metals-API is a powerful resource for developers looking to access real-time and historical data on gold and other precious metals. By leveraging its various endpoints, developers can create innovative applications that provide valuable insights into market trends and price fluctuations. Whether you are building investment analysis tools, trading platforms, or portfolio management applications, the Metals-API offers the capabilities needed to enhance user experiences and drive informed decision-making.
For more detailed information on how to implement these features, refer to the Metals-API Documentation. By understanding the capabilities of this API, developers can harness the power of real-time metals data to create impactful solutions in the financial sector.