Discover How to Get Patna Gold 18k (PATN-18k) Historical Prices using this API
Discover How to Get Patna Gold 18k (PATN-18k) Historical Prices using this API
In the world of precious metals, understanding historical prices is crucial for investors, traders, and developers alike. One of the most sought-after metals is gold, represented by the symbol XAU. With the rise of digital transformation in precious metals trading, accessing historical prices has never been easier, thanks to the Metals-API. This blog post will delve into how you can leverage this powerful API to retrieve historical prices for Patna Gold 18k (PATN-18k) and other precious metals.
About Gold (XAU)
Gold has long been a symbol of wealth and stability. In recent years, the digital transformation of precious metals has revolutionized how we trade and invest in these valuable assets. The integration of data analytics and market insights has empowered traders to make informed decisions based on real-time data. With the advent of technology, trading platforms now offer innovative solutions for price discovery, allowing users to access historical data and current market trends seamlessly.
The Metals-API provides a robust framework for developers to build applications that can access real-time and historical data for various metals, including gold. This API not only facilitates the retrieval of current prices but also offers a comprehensive set of endpoints to access historical prices, fluctuations, and other essential data points.
API Description
The Metals-API is designed to provide developers with the tools necessary to create next-generation applications that can handle real-time metals data. With its innovative approach to data delivery, the API empowers users to access a wealth of information about precious metals, including gold, silver, platinum, and palladium. The API is built with a focus on technological advancement, ensuring that users can retrieve data quickly and efficiently.
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 level of granularity allows traders to stay ahead of market trends and make timely decisions based on the latest information.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for all available metals. You can retrieve the latest rates for gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD) with ease.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve historical prices for gold and other metals.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices for metals, giving you insights into market dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling you to convert any amount from one metal to another or to/from USD.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, allowing for in-depth analysis of price trends over time.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: Get information about gold rates by carat, which is essential for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specific date, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows you to get the open, high, low, and close prices for a specific date, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- 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 by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API comes with 14 different endpoints, each providing distinct functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, allowing you to stay updated on the latest symbols.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you 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 how to interact with the Metals-API is crucial for effective implementation. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1767399513,
"base": "USD",
"date": "2026-01-03",
"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 that the latest rate for gold (XAU) is 0.000482 per troy ounce, providing a snapshot of the current market.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1767313113,
"base": "USD",
"date": "2026-01-02",
"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, allowing users to analyze past performance and trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-12-27",
"end_date": "2026-01-03",
"base": "USD",
"rates": {
"2025-12-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-12-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of gold prices over a specified period, which is essential for trend analysis.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1767399513,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The convert endpoint allows users to convert a specified amount of currency into gold, providing practical utility for traders and investors.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-27",
"end_date": "2026-01-03",
"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 endpoint provides insights into how prices fluctuate over a specific period, which is vital for understanding market volatility.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1767399513,
"base": "USD",
"date": "2026-01-03",
"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 for traders looking to analyze market movements and make informed decisions based on open, high, low, and close prices.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1767399513,
"base": "USD",
"date": "2026-01-03",
"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 endpoint is crucial for traders who need to understand the current bid and ask prices for metals, allowing them to make timely trading decisions.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for accessing historical prices and real-time data for precious metals like gold. By utilizing the various endpoints available, developers can create powerful applications that provide valuable insights into market trends and fluctuations. Whether you are a trader looking to analyze price movements or a developer seeking to integrate metals data into your applications, the Metals-API is an invaluable resource.
For more information on how to get started, visit the Metals-API Documentation and explore the extensive capabilities of this API. Additionally, check the Metals-API Supported Symbols page for a complete list of available metal symbols. With the right tools and data at your fingertips, you can navigate the world of precious metals trading with confidence.