Get Gold UAE 22 k (XAUUAE22) - Per Gram market data using this API

Introduction
The world of precious metals trading is undergoing a significant transformation, driven by technological advancements and the increasing demand for real-time data. Among these precious metals, gold, represented by the symbol XAU, stands out as a critical asset in global markets. In this blog post, we will delve into the intricacies of the gold market in the UAE, focusing on the Metals-API and how it provides essential market data, including the price of 22k gold (XAUUAE22) per gram. We will explore the API's capabilities, its endpoints, and how developers can leverage this powerful tool to create innovative applications.
Metals-API Information
About Gold (XAU)
Gold has long been regarded as a safe haven asset, especially in times of economic uncertainty. Its value is influenced by various factors, including geopolitical events, inflation rates, and currency fluctuations. The digital transformation in precious metals trading has made it easier for investors and traders to access real-time data and analytics, enabling them to make informed decisions.
With the rise of data analytics, market insights into gold prices have become more accessible. The integration of technology in trading platforms allows for innovative price discovery methods, providing traders with the tools they need to navigate the complexities of the gold market. Digital asset solutions are also emerging, allowing for the tokenization of gold, which can enhance liquidity and broaden access to this valuable commodity.
API Description
The Metals-API is a powerful tool that provides developers with real-time metals data, enabling them to build next-generation applications. This API empowers users to access a wide range of functionalities, including the latest rates, historical data, and conversion capabilities. By leveraging the Metals-API, developers can create applications that provide users with up-to-date information on gold prices, market trends, and more.
For more detailed information, you can visit the Metals-API Documentation, which outlines the various features and endpoints available.
Key Features and Endpoints
The Metals-API offers several key features that enhance its usability for developers:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for gold and other metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or even every 10 minutes, ensuring that users have access to the most current market information.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019. This feature allows developers to query the API for specific dates, enabling them to analyze trends and make predictions based on past performance.
- Bid And Ask Endpoint: This endpoint retrieves real-time bid and ask prices for gold and other metals, providing crucial information for traders looking to make timely decisions.
- Convert Endpoint: The Metals-API includes a currency conversion feature that allows users to convert amounts from one metal to another or to/from USD, facilitating seamless transactions.
- Time-Series Endpoint: This feature allows users to query the API for daily historical rates between two selected dates, making it easier to analyze price movements over time.
- Fluctuation Endpoint: Users can track how gold prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This endpoint provides 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 feature allows users to query the API for the lowest and highest prices of gold over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can retrieve open, high, low, and close prices for gold, which are essential for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a comprehensive view of market trends.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API includes multiple endpoints, each designed to provide specific functionalities, making it a versatile tool for developers.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
- Gold Price India Endpoint: This dedicated endpoint retrieves the latest gold price in India, catering to a specific market segment.
- News Endpoint: Users can access the latest news articles related to various metals, keeping them 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.
API Endpoint Examples and Responses
Understanding the API responses is crucial for developers. Here are examples of various endpoints and their responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1746490512,
"base": "USD",
"date": "2025-05-06",
"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 the current exchange rates for various metals, with gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1746404112,
"base": "USD",
"date": "2025-05-05",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for gold and other metals on a specific date, allowing for trend analysis.
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2025-04-29",
"end_date": "2025-05-06",
"base": "USD",
"rates": {
"2025-04-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-01": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-06": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time series of exchange rates for gold over a specified period, allowing developers to visualize trends and fluctuations.
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": 1746490512,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to gold (XAU), resulting in 0.482 troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-29",
"end_date": "2025-05-06",
"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 have fluctuated over a specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1746490512,
"base": "USD",
"date": "2025-05-06",
"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, which are essential for technical analysis and trading strategies.
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1746490512,
"base": "USD",
"date": "2025-05-06",
"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 are critical for traders looking to execute buy or sell orders effectively.
Conclusion
The Metals-API is a transformative tool for developers looking to access real-time data on precious metals, particularly gold. By leveraging its various endpoints, developers can create applications that provide valuable insights into market trends, historical data, and price fluctuations. The ability to convert between different metals and currencies further enhances its utility, making it an essential resource for anyone involved in the precious metals market.
As the digital landscape continues to evolve, the integration of advanced technologies in trading platforms will only increase. The Metals-API stands at the forefront of this transformation, offering developers the tools they need to innovate and thrive in the competitive world of precious metals trading. For more information, visit the Metals-API Website and explore the extensive Metals-API Documentation to get started on your journey to harnessing the power of real-time metals data.