The Easiest Way to Get Pune Gold 24k (PUNE-24k) Historical Rates Using API Documentation
The Easiest Way to Get Pune Gold 24k (PUNE-24k) Historical Rates Using API Documentation
In the world of precious metals trading, access to accurate and timely data is crucial for making informed decisions. For those interested in tracking the historical prices of Gold (XAU), the Metals-API provides a robust solution. This blog post will guide you through the process of obtaining Gold historical prices using the Metals-API, detailing its features, endpoints, and practical applications. Whether you are a developer looking to integrate this data into your applications or a trader seeking insights into market trends, this guide will equip you with the knowledge you need.
About Gold (XAU)
Gold has long been a symbol of wealth and a safe haven for investors. In recent years, the digital transformation of precious metals trading has revolutionized how traders access and analyze market data. The integration of technology in trading has enabled real-time data analytics, allowing for better market insights and innovative price discovery methods. As digital asset solutions continue to evolve, the importance of having access to accurate historical data cannot be overstated.
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 (XAU). By leveraging this API, developers can build next-generation applications that offer users insights into market trends, price fluctuations, and historical data analysis. The API's capabilities extend beyond simple data retrieval; it empowers users to create sophisticated financial applications that can analyze trends and make predictions based on historical data.
For more information, you can visit the Metals-API Website or explore the Metals-API Documentation for detailed technical specifications.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data needs. Each endpoint is designed to provide specific functionalities that can be leveraged for various applications. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for Gold and other metals, updated every 60 minutes or more frequently depending on your subscription plan. This feature is essential for traders who require up-to-the-minute pricing information.
- Historical Rates Endpoint: Users can access historical rates for Gold dating back to 2019. By appending a specific date in the format YYYY-MM-DD, you can retrieve the historical price data for that day. This is particularly useful for analyzing trends over time.
- Bid And Ask Endpoint: This endpoint allows users to retrieve real-time bid and ask prices for Gold and other metals. Understanding the bid-ask spread is crucial for traders looking to make informed buying and selling decisions.
- Convert Endpoint: The Metals-API includes a currency conversion feature that enables users to convert amounts between different metals or from/to USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: This feature allows users to query daily historical rates between two specified dates. It is ideal for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: Users can track how Gold prices fluctuate over time by utilizing this endpoint. It provides insights into daily changes, helping traders understand market volatility.
- Carat Endpoint: This endpoint provides information about Gold rates based on carat measurements. It is essential for jewelers and consumers interested in purchasing gold jewelry.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for Gold over a specified period, which is valuable for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for Gold over a specified date, which is crucial for technical analysis.
- Historical LME Endpoint: This endpoint provides historical rates for LME symbols dating back to 2008, allowing users to analyze long-term trends.
- API Key: To access the Metals-API, users must include their unique API key in the request URL. This key is essential for authentication and authorization.
- 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 offers a total of 14 endpoints, each designed to provide specific functionalities for users.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals supported by the API.
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.
API Endpoint Examples and Responses
To better understand how to utilize the Metals-API for retrieving Gold historical prices, letβs explore some example endpoints and their corresponding JSON responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the following endpoint:
GET /latest
Example Response:
{
"success": true,
"timestamp": 1785305249,
"base": "USD",
"date": "2026-07-29",
"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 current price of Gold (XAU) is 0.000482 per troy ounce, relative to USD.
Historical Rates Endpoint
To access historical exchange rates for any date since 1999, you can use the following endpoint:
GET /historical/YYYY-MM-DD
Example Response:
{
"success": true,
"timestamp": 1785218849,
"base": "USD",
"date": "2026-07-28",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical price of Gold on July 28, 2026, indicating a price of 0.000485 per troy ounce.
Time-series Endpoint
To get exchange rates for a specific time period, you can use the following endpoint:
GET /timeseries?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example Response:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-22",
"end_date": "2026-07-29",
"base": "USD",
"rates": {
"2026-07-22": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-24": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-29": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of Gold prices between July 22 and July 29, 2026, allowing for trend analysis over that period.
Convert Endpoint
To convert any amount from one metal to another or to/from USD, you can use the following endpoint:
GET /convert?from=USD&to=XAU&amount=1000
Example Response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1785305249,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of Gold at the current exchange rate.
Fluctuation Endpoint
To track rate fluctuations between two dates, you can use the following endpoint:
GET /fluctuation?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example Response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-22",
"end_date": "2026-07-29",
"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 Gold prices fluctuated between July 22 and July 29, 2026, showing both the absolute change and percentage change.
OHLC (Open/High/Low/Close) Endpoint
To get OHLC data for a specific time period, you can use the following endpoint:
GET /open-high-low-close/YYYY-MM-DD
Example Response:
{
"success": true,
"timestamp": 1785305249,
"base": "USD",
"date": "2026-07-29",
"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 the open, high, low, and close prices for Gold on July 29, 2026, which is essential for traders conducting technical analysis.
Bid/Ask Endpoint
To get current bid and ask prices for metals, you can use the following endpoint:
GET /bid-ask
Example Response:
{
"success": true,
"timestamp": 1785305249,
"base": "USD",
"date": "2026-07-29",
"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 response provides the current bid and ask prices for Gold, which is crucial for traders looking to execute trades at optimal prices.
Conclusion
Accessing historical prices for Gold (XAU) through the Metals-API is a straightforward process that can significantly enhance your trading strategies and market analysis. By utilizing the various endpoints offered by the API, developers can create applications that provide real-time data, historical insights, and comprehensive analysis tools. Whether you are interested in tracking price fluctuations, conducting technical analysis, or converting between different metals, the Metals-API offers the necessary tools to succeed in the precious metals market.
For further exploration of the API's capabilities, refer to the Metals-API Documentation and familiarize yourself with the Metals-API Supported Symbols. By integrating these resources into your development process, you can unlock the full potential of precious metals data and enhance your trading experience.