Fetch Gold Ask (XAU-ASK) Historical Prices via this API
Introduction
In the world of finance and investment, understanding the historical prices of precious metals like Gold (XAU) is crucial for making informed decisions. With the rise of digital transformation in the precious metals market, accessing real-time and historical data has never been easier, thanks to the Metals-API. This powerful API provides developers with the tools necessary to fetch Gold Ask (XAU-ASK) historical prices and much more, enabling them to build innovative applications that leverage data analytics and market insights.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and investment for centuries. In recent years, the digital transformation of the precious metals market has opened new avenues for traders and investors. The integration of technology in trading has led to enhanced price discovery mechanisms, allowing for more accurate and timely valuations of Gold. With the advent of digital asset solutions, investors can now access Gold prices in real-time, analyze market trends, and make data-driven decisions.
Data analytics plays a pivotal role in understanding market dynamics. By utilizing the Metals-API, developers can gain insights into historical price movements, fluctuations, and trends, which are essential for forecasting future prices. This capability is particularly valuable in a volatile market where timely information can lead to significant financial gains.
API Description
The Metals-API is designed to empower developers with real-time metals data, enabling them to create next-generation applications. The API offers a wide range of functionalities, including the ability to retrieve the latest rates, historical prices, and even bid and ask prices for various metals. This level of access to data not only enhances trading strategies but also fosters innovation in how precious metals are traded and valued.
One of the standout features of the Metals-API is its ability to provide historical rates dating back to 2019. This allows developers to query the API for specific dates, enabling them to analyze trends over time. The API's robust architecture supports various endpoints, each designed to cater to specific needs, whether it's tracking fluctuations, converting currencies, or retrieving OHLC (Open, High, Low, Close) data.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different aspects of metals trading. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is crucial for traders who need the most current data to make informed decisions.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve the historical price of Gold (XAU) and other metals, allowing for in-depth analysis of price trends over time.
- Bid And Ask Endpoint: This powerful feature enables you to retrieve real-time bid and ask prices for Gold and other metals. Understanding the spread between these prices is essential for traders looking to optimize their entry and exit points.
- Convert Endpoint: The API includes a currency conversion endpoint, allowing you to convert any amount from one metal to another or to/from USD. This is particularly useful for investors who deal with multiple currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This endpoint is invaluable for analyzing trends and making predictions based on historical data.
- Fluctuation Endpoint: Retrieve information about how prices fluctuate on a day-to-day basis. This endpoint provides insights into market volatility, helping traders to strategize effectively.
- Carat Endpoint: Access information about Gold rates by carat. This feature is particularly useful for jewelers and investors dealing with different purities of Gold.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price of Gold (XAU) for a specified date. This information is crucial for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve OHLC data for a specific time period. This data is essential for technical analysis and helps traders identify trends and reversals.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for those trading metals on the London Metal Exchange.
- API Key: Your unique API key is required to access the Metals-API. This key is passed into the API base URL's access_key parameter, ensuring secure access to the data.
- 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 features 14 different endpoints, each providing unique functionalities to cater to various trading needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, allowing developers to stay informed about the latest symbols supported by the API.
- News Endpoint: Retrieve the latest news articles related to various metals, providing context and insights into market movements.
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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1761364926,
"base": "USD",
"date": "2025-10-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"
}
This response indicates that 1 troy ounce of Gold (XAU) is equivalent to 0.000482 of the base currency (USD). The timestamp provides the exact time the data was retrieved, ensuring that users are aware of the currency's current status.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1761278526,
"base": "USD",
"date": "2025-10-24",
"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 a specific date, allowing developers to analyze price movements over time.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-10-18",
"end_date": "2025-10-25",
"base": "USD",
"rates": {
"2025-10-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-10-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-25": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This time-series response provides daily rates for Gold over a specified period, enabling 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": 1761364926,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of Gold, providing a straightforward conversion for traders and investors.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-18",
"end_date": "2025-10-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"
}
This fluctuation response provides insights into how Gold and other metals have changed over a specified period, which is essential 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": 1761364926,
"base": "USD",
"date": "2025-10-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"
}
This OHLC response provides critical data for technical analysis, allowing traders to assess market conditions and make informed decisions.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1761364926,
"base": "USD",
"date": "2025-10-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"
}
This response provides the current bid and ask prices for Gold, Silver, and Platinum, along with the spread, which is crucial for traders looking to execute orders efficiently.
Conclusion
The Metals-API is a powerful tool for developers looking to access real-time and historical data for precious metals like Gold (XAU). By leveraging its extensive features, including the ability to retrieve the latest rates, historical prices, and bid/ask data, developers can create innovative applications that enhance trading strategies and market analysis.
As the digital transformation of the precious metals market continues, the importance of data analytics and technology integration cannot be overstated. The Metals-API not only provides access to vital market data but also empowers developers to build solutions that can adapt to the ever-changing landscape of precious metals trading.
For more information on how to get started with the Metals-API, explore the Metals-API Documentation and check out the Metals-API Supported Symbols page for a comprehensive list of available metals. With the right tools and insights, you can navigate the complexities of the precious metals market with confidence.