Retrieve Patna Gold 24k (PATN-24k) prices through this API

Retrieve Patna Gold 24k (PATN-24k) Prices Through This API
In the ever-evolving landscape of precious metals trading, the ability to access real-time data is crucial for developers and traders alike. The Metals-API provides a robust solution for retrieving the latest prices of gold, including Patna Gold 24k (PATN-24k), along with other metals like silver, platinum, and palladium. This blog post delves into the intricacies of the Metals-API, exploring its capabilities, features, and how it can empower developers to create innovative applications in the precious metals market.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a symbol of wealth and stability. In recent years, the digital transformation in precious metals has led to a surge in the use of data analytics and market insights. The integration of technology in trading has revolutionized how investors approach gold trading, enabling them to make informed decisions based on real-time data. The Metals-API plays a pivotal role in this transformation by providing developers with the tools needed to access and analyze gold prices efficiently.
With the rise of digital asset solutions, the demand for accurate and timely gold pricing has never been higher. The Metals-API not only facilitates price discovery but also offers innovative features that allow developers to build next-generation applications tailored to the needs of traders and investors. By leveraging the power of real-time metals data, developers can create applications that enhance trading strategies, optimize investment portfolios, and provide users with actionable insights.
API Description
The Metals-API is a powerful tool designed to provide real-time and historical data for various metals, including gold. Its capabilities extend beyond mere price retrieval; it empowers developers to create applications that can analyze trends, track fluctuations, and convert currencies seamlessly. The API's innovative design allows for easy integration into existing systems, making it an ideal choice for developers looking to enhance their applications with metals data.
For more detailed information about the API's capabilities, you can refer to the Metals-API Documentation. This resource provides comprehensive guidance on how to implement the API effectively, including endpoint descriptions, parameter details, and response structures.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to serve specific needs within the realm of metals trading. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or even every 10 minutes, ensuring that you have the most current information at your fingertips.
- Historical Rates Endpoint: Access historical rates dating back to 2019. By appending a specific date to your query, you can retrieve past prices, allowing for in-depth analysis of market trends over time.
- Bid And Ask Endpoint: This feature enables you to retrieve real-time bid and ask prices for metals, providing critical information for traders looking to make informed buying or selling decisions.
- Convert Endpoint: The conversion endpoint allows you to convert any amount from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling you to analyze trends and fluctuations over specific periods.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and helping traders make informed decisions.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers looking to understand the value of gold jewelry.
- Lowest/Highest Price Endpoint: This endpoint allows you to query the API for the lowest and highest prices of metals over a specified period, giving you a clear picture of market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for a specific time period, which is essential for technical analysis and trading strategies.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends over a significant period.
- API Key: Your unique API key is essential for accessing the API. It must be included in the API base URL's access_key parameter to authenticate your requests.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in your data analysis.
- Available Endpoints: The Metals-API offers a wide range of endpoints, each providing different functionalities tailored to the needs of developers and traders.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring that you have access to the latest symbols and their specifications.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for traders operating in the Indian market.
- News Endpoint: Stay updated with the latest news articles related to various metals, helping you stay 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's response structure is crucial for effective implementation. Here are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1746860416,
"base": "USD",
"date": "2025-05-10",
"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"
}
The response indicates a successful request, providing the latest rates for various metals, including gold (XAU). The rates are expressed in terms of troy ounces, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1746774016,
"base": "USD",
"date": "2025-05-09",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specific date, allowing developers to analyze past market performance. Each rate is again expressed in troy ounces.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-05-03",
"end_date": "2025-05-10",
"base": "USD",
"rates": {
"2025-05-03": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-05": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-10": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides rates for specific dates, enabling developers to visualize trends over time. This is particularly useful for creating charts and graphs in trading applications.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1746860416,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The convert endpoint allows users to convert amounts between different metals or currencies. In this example, 1000 USD is converted to gold, resulting in 0.482 troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-03",
"end_date": "2025-05-10",
"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 response provides insights into how the rates of metals fluctuate over a specified period. Understanding these fluctuations is essential for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1746860416,
"base": "USD",
"date": "2025-05-10",
"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"
}
The OHLC endpoint provides critical data for traders, allowing them to analyze market performance over a specific period. This data is essential for technical analysis and decision-making.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1746860416,
"base": "USD",
"date": "2025-05-10",
"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"
}
The bid/ask endpoint provides essential pricing information for traders, allowing them to understand the current market conditions and make informed decisions.
Conclusion
The Metals-API is an invaluable resource for developers and traders in the precious metals market. By providing real-time and historical data for metals like gold, silver, platinum, and palladium, the API empowers users to make informed decisions based on accurate information. With features such as the latest rates, historical data, conversion capabilities, and fluctuation tracking, the Metals-API offers a comprehensive suite of tools for anyone involved in metals trading.
For those looking to integrate this powerful API into their applications, the Metals-API Website offers extensive resources, including documentation and support. By leveraging the capabilities of the Metals-API, developers can create innovative solutions that enhance trading strategies and provide users with the insights they need to succeed in the dynamic world of precious metals.