Access historical data for Patna Gold 18k (PATN-18k) using this API
Access Historical Data for Patna Gold 18k (PATN-18k) Using This API
In the ever-evolving landscape of precious metals trading, the ability to access historical data for Gold (XAU) is crucial for developers and traders alike. The Metals-API provides a robust solution for obtaining real-time and historical gold prices, including specific data for Patna Gold 18k (PATN-18k). This blog post will explore the innovative capabilities of the Metals-API, focusing on how it empowers developers to create next-generation applications that leverage historical data analytics and market insights.
About Gold (XAU)
Gold has long been considered a safe haven asset, and its value is influenced by various factors including market demand, geopolitical events, and economic indicators. The digital transformation in precious metals trading has opened new avenues for data analytics and technology integration, allowing traders to make informed decisions based on real-time data. The Metals-API is at the forefront of this transformation, offering developers the tools they need to innovate in price discovery and digital asset solutions.
As the market for precious metals continues to grow, the integration of technology in trading practices becomes increasingly important. Developers can utilize the Metals-API to access comprehensive market insights, enabling them to build applications that provide users with up-to-date information on gold prices, historical trends, and fluctuations. This API not only simplifies the process of data retrieval but also enhances the overall trading experience.
API Description
The Metals-API is a powerful tool that provides developers with access to real-time and historical data for various metals, including gold. With its innovative features, the API allows for seamless integration into applications, enabling users to access critical market data effortlessly. The API's capabilities include retrieving the latest rates, historical prices, and even bid and ask prices, making it an essential resource for anyone involved in precious metals trading.
For more detailed information, you can visit the Metals-API Documentation which outlines all available features and endpoints.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs within the precious metals market. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to make quick decisions based on the latest market conditions.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the Metals-API for historical rates, allowing for in-depth analysis of price trends over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices, which are crucial for making informed trading decisions. The bid and ask prices reflect the current market sentiment and can vary based on market conditions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for traders dealing with multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates. This feature is invaluable for analyzing trends and making predictions based on historical data.
- Fluctuation Endpoint: With this endpoint, users can retrieve information about how currencies fluctuate on a day-to-day basis. This data is essential for understanding market volatility and making strategic trading decisions.
- Carat Endpoint: This feature provides information about gold rates by carat, allowing users to get precise pricing based on the purity of gold.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, which is useful for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is crucial for traders focusing on industrial metals.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: Exchange rates delivered by the Metals-API are relative to USD by default, and all data is returned in a structured JSON format.
- Available Endpoints: The Metals-API features 14 different endpoints, each providing unique functionalities to cater to various trading needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest information.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users informed about market developments.
For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. 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": 1775693910,
"base": "USD",
"date": "2026-04-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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1775607510,
"base": "USD",
"date": "2026-04-08",
"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": "2026-04-02",
"end_date": "2026-04-09",
"base": "USD",
"rates": {
"2026-04-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-09": {
"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": 1775693910,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-02",
"end_date": "2026-04-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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1775693910,
"base": "USD",
"date": "2026-04-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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1775693910,
"base": "USD",
"date": "2026-04-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"
}
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers looking to access historical data for Gold (XAU) and other precious metals. By leveraging the API's extensive features, including real-time rates, historical data, and various endpoints, developers can create sophisticated applications that enhance trading strategies and market analysis. The ability to access detailed market insights and fluctuations empowers traders to make informed decisions, ultimately leading to better investment outcomes.
For further exploration of the API's capabilities, visit the Metals-API Website to get started on your journey towards integrating real-time metals data into your applications.