Query Jaipur Gold 22k (JAIP-22k) Historical Prices using this API

Query Jaipur Gold 22k (JAIP-22k) Historical Prices using this API
Metals-API. This powerful API enables users to query historical prices for various metals, including Gold (XAU), which is particularly relevant for those interested in the Jaipur Gold 22k (JAIP-22k) market. In this blog post, we will explore how to effectively utilize the Metals-API to retrieve historical prices, delve into the significance of Gold in the digital age, and discuss the transformative potential of real-time metals data.
About Gold (XAU)
API Description
Metals-API is designed to provide comprehensive access to metals pricing data, enabling developers to create applications that can track, analyze, and visualize metal prices in real-time. The API offers a range of endpoints, each tailored to meet specific needs, from retrieving the latest rates to accessing historical data dating back to 2019.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals, including Gold (XAU). For example, a successful request might return a JSON response like this:
{
"success": true,
"timestamp": 1747015379,
"base": "USD",
"date": "2025-05-12",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
- Historical Rates Endpoint: For those interested in analyzing trends over time, the Historical Rates Endpoint allows users to access historical exchange rates for any date since 1999. A typical response might look like this:
{
"success": true,
"timestamp": 1746928979,
"base": "USD",
"date": "2025-05-11",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. For instance:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-05",
"end_date": "2025-05-12",
"base": "USD",
"rates": {
"2025-05-05": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-07": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-12": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
- Convert Endpoint: The Metals-API also includes a currency conversion endpoint, allowing users to convert any amount from one metal to another or to/from USD. For example:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1747015379,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis. For instance:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-05",
"end_date": "2025-05-12",
"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"
}
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows users to query the API for the open, high, low, and close prices for a specific time period. A typical response might look like this:
{
"success": true,
"timestamp": 1747015379,
"base": "USD",
"date": "2025-05-12",
"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: This powerful feature enables users to retrieve real-time Bid and Ask prices for metals. A typical response might look like this:
{
"success": true,
"timestamp": 1747015379,
"base": "USD",
"date": "2025-05-12",
"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"
}
List of Symbols
Metals-API Supported Symbols page. This resource is invaluable for developers looking to integrate specific metals into their applications.
Conclusion
Metals-API Documentation and explore the various endpoints available. With the right tools and insights, you can navigate the complexities of the precious metals market with confidence.