Get Gold Turkey 22k (XAUTUR22) Historical Prices for your investment portfolio using this API
Introduction
Investing in gold has always been a strategic choice for many investors, particularly in times of economic uncertainty. With the rise of digital transformation in the financial sector, accessing historical prices for gold (XAU) has become easier than ever through APIs like Metals-API. This powerful tool allows developers to integrate real-time and historical data into their applications, providing valuable insights for investment portfolios. In this blog post, we will explore the capabilities of the Metals-API, focusing on how to retrieve historical prices for gold (XAUTUR22) and the various features that make this API a must-have for any serious investor.
About Gold (XAU)
Gold, represented by the symbol XAU, is one of the most sought-after precious metals in the world. Its value is not only derived from its physical properties but also from its historical significance as a store of value. In recent years, the digital transformation in precious metals trading has led to innovative solutions that enhance price discovery and market insights. By leveraging data analytics and technology integration, investors can now make informed decisions based on real-time data.
The Metals-API provides a comprehensive solution for accessing gold prices and other precious metals. With its robust features, developers can create applications that offer real-time updates, historical data analysis, and even currency conversion, making it an invaluable resource for anyone looking to invest in gold.
API Description
The Metals-API is a powerful JSON API that provides real-time and historical data for precious metals. It empowers developers to build next-generation applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. The API is designed with innovation in mind, allowing for easy integration into various platforms and applications.
For more information on how to get started, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for precious metals. Depending on your subscription plan, this endpoint can return updates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to stay updated on market movements.
{
"success": true,
"timestamp": 1779322455,
"base": "USD",
"date": "2026-05-21",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for gold and other metals dating back to 2019. By appending a specific date to the API request, developers can retrieve valuable historical data that can inform investment strategies.
{
"success": true,
"timestamp": 1779236055,
"base": "USD",
"date": "2026-05-20",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
This endpoint provides real-time bid and ask prices for metals, which is crucial for traders looking to execute buy or sell orders. The bid price represents the maximum price that a buyer is willing to pay, while the ask price is the minimum price that a seller is willing to accept.
{
"success": true,
"timestamp": 1779322455,
"base": "USD",
"date": "2026-05-21",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for investors who want to understand the value of their holdings in different currencies.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1779322455,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is invaluable for analyzing trends over specific periods, enabling investors to make data-driven decisions.
{
"success": true,
"timeseries": true,
"start_date": "2026-05-14",
"end_date": "2026-05-21",
"base": "USD",
"rates": {
"2026-05-14": {
"XAU": 0.000485
},
"2026-05-21": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
Using the Fluctuation Endpoint, developers can retrieve information about how currencies fluctuate on a day-to-day basis. This feature is essential for understanding market volatility and making informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-14",
"end_date": "2026-05-21",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint provides detailed price information for a specific time period, including the opening, highest, lowest, and closing prices. This data is crucial for technical analysis and understanding market trends.
{
"success": true,
"timestamp": 1779322455,
"base": "USD",
"date": "2026-05-21",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for investors interested in the London Metal Exchange prices.
{
"success": true,
"timestamp": 1779236055,
"base": "USD",
"date": "2026-05-21",
"rates": {
"XAU": 0.000482
},
"unit": "per troy ounce"
}
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.
Conclusion
In conclusion, the Metals-API offers a powerful and flexible solution for accessing historical prices and real-time data for gold and other precious metals. By leveraging its various endpoints, developers can create applications that provide valuable insights into market trends, price fluctuations, and investment opportunities. Whether you are a seasoned trader or a developer looking to enhance your financial applications, the Metals-API is an essential tool in your arsenal. For more information on how to implement these features, visit the Metals-API Documentation and start building your investment portfolio today.