Access Gold UAE 18 k (XAUUAE18) - Per Gram Exchange Rates API Documentation in JSON Format
Access Gold UAE 18 k (XAUUAE18) - Per Gram Exchange Rates API Documentation in JSON Format
In today's fast-paced financial landscape, the ability to retrieve real-time exchange rates for precious metals such as Gold (XAU) is crucial for developers and businesses alike. The Metals-API provides a robust solution for accessing these rates in JSON format, allowing for seamless integration into applications. This blog post will delve into the capabilities of the Metals-API, focusing on how to retrieve exchange rates for Gold (XAU) and other metals, along with sample API responses and integration tips.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, making it a vital asset in financial markets. As digital transformation continues to reshape the landscape of precious metals trading, the integration of data analytics and technology is more important than ever. The Metals-API empowers developers to harness real-time data for price discovery, enabling innovative digital asset solutions. By utilizing this API, businesses can gain market insights and enhance their trading strategies through advanced analytics.
API Description
The Metals-API is designed to provide developers with access to real-time and historical data for various metals, including Gold (XAU), Silver (XAG), Platinum (XPT), and Palladium (XPD). With its user-friendly interface and comprehensive documentation, developers can easily integrate the API into their applications. The API supports multiple endpoints, each offering unique functionalities that cater to different use cases.
For more detailed information, you can refer to the Metals-API Documentation, which outlines the various features and capabilities of the API.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that enable developers to access real-time and historical exchange rates. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. It allows users to access the most current rates for Gold and other metals.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019 by appending a specific date to the API request. This feature is invaluable for analyzing trends and making informed decisions based on past performance.
- Bid and Ask Endpoint: This powerful feature retrieves real-time bid and ask prices for metals, helping traders make timely decisions based on market conditions.
- Convert Endpoint: The conversion endpoint allows users to convert any amount from one metal to another or to/from USD, facilitating easy calculations for transactions.
- Time-Series Endpoint: This endpoint enables users to query the API for daily historical rates between two specified dates, providing insights into price movements over time.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, which is essential for understanding market volatility.
- Carat Endpoint: This feature allows users to retrieve information about Gold rates by carat, catering to specific market needs.
- Lowest/Highest Price Endpoint: This endpoint provides the lowest and highest prices for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for a specific time period, which is critical for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a wealth of data for analysis.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API features 14 different endpoints, each designed to provide specific functionalities.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve 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 structure of API responses is crucial for effective integration. Below are examples of various endpoints along with their JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1766621703,
"base": "USD",
"date": "2025-12-25",
"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": 1766535303,
"base": "USD",
"date": "2025-12-24",
"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": "2025-12-18",
"end_date": "2025-12-25",
"base": "USD",
"rates": {
"2025-12-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-12-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-12-25": {
"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": 1766621703,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-18",
"end_date": "2025-12-25",
"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": 1766621703,
"base": "USD",
"date": "2025-12-25",
"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": 1766621703,
"base": "USD",
"date": "2025-12-25",
"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"
}
Integration Tips
Integrating the Metals-API into your application can significantly enhance your ability to provide real-time data to users. Here are some tips for successful integration:
- Authentication: Ensure that you include your unique API key in every request to authenticate your access. This is crucial for maintaining security and ensuring that your application functions correctly.
- Rate Limiting: Be aware of the rate limits associated with your subscription plan. Implementing caching strategies can help reduce the number of API calls and improve performance.
- Error Handling: Implement robust error handling to manage potential issues such as network failures or invalid requests. This will enhance the user experience by providing clear feedback when something goes wrong.
- Data Validation: Always validate the data received from the API before using it in your application. This helps prevent errors and ensures that your application operates smoothly.
- Performance Optimization: Consider optimizing your API calls by requesting only the data you need. This can reduce response times and improve the overall performance of your application.
Conclusion
The Metals-API offers a powerful solution for developers looking to access real-time and historical exchange rates for precious metals like Gold (XAU). With its extensive range of endpoints and capabilities, the API empowers businesses to leverage data analytics and technology for enhanced trading strategies. By following the integration tips outlined in this post, developers can effectively implement the API into their applications, ensuring they provide accurate and timely information to users.
For further exploration, visit the Metals-API Website and dive into the Metals-API Documentation for comprehensive guidance on utilizing this innovative API. Stay informed with the latest updates and access a complete list of supported symbols at the Metals-API Supported Symbols page.