Get China Gold SGE AM (XAUCHNAM) Historical Prices using this API
Introduction
Gold (XAU) has long been a symbol of wealth and stability in financial markets. As a precious metal, it plays a crucial role in global economics, serving as a hedge against inflation and currency fluctuations. With the rise of digital transformation in the precious metals market, developers now have access to powerful tools that allow them to retrieve historical prices and real-time data efficiently. One such tool is the Metals-API, which provides comprehensive access to gold prices and other metal data through its robust API.
About Gold (XAU)
Gold is not just a commodity; it represents a complex interplay of market dynamics, investor sentiment, and geopolitical factors. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. By leveraging technology integration, traders can now utilize advanced data analytics to make informed decisions based on real-time market conditions. The innovation in price discovery mechanisms has also been enhanced through digital asset solutions, allowing for more accurate and timely pricing of gold and other metals.
Understanding the Metals-API
The Metals-API is designed to empower developers to build next-generation applications that require real-time and historical metals data. This API offers a variety of endpoints that cater to different needs, from retrieving the latest rates to accessing historical data dating back to 2019. The API's capabilities extend beyond mere data retrieval; it enables developers to create applications that can analyze trends, forecast prices, and even automate trading strategies.
API Description
The Metals-API provides a seamless way to access a wealth of information about precious metals, including gold. With its user-friendly interface and comprehensive documentation, developers can quickly integrate this API into their applications. The API supports a wide range of functionalities, including:
- Real-time exchange rate data
- Historical price data
- Currency conversion
- Bid and ask prices
- Time-series data
- Fluctuation tracking
- Open/High/Low/Close (OHLC) data
For detailed information on how to use the API, refer to the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to provide specific functionalities that can be utilized in various applications. Below, we explore some of the key features and their potential applications:
Latest Rates Endpoint
The Latest Rates Endpoint allows developers to retrieve real-time exchange rate data for metals. Depending on the subscription plan, this endpoint can return updates every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for applications that require up-to-the-minute pricing information, such as trading platforms or financial analysis tools.
{
"success": true,
"timestamp": 1784247432,
"base": "USD",
"date": "2026-07-17",
"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
Accessing historical rates is crucial for market analysis and trend forecasting. The Historical Rates Endpoint allows users to query historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve past pricing data, which is invaluable for back-testing trading strategies or conducting market research.
{
"success": true,
"timestamp": 1784161032,
"base": "USD",
"date": "2026-07-16",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables developers to retrieve real-time bid and ask prices for various metals. This information is essential for traders looking to make informed decisions based on current market conditions. Understanding the spread between bid and ask prices can also provide insights into market liquidity.
{
"success": true,
"timestamp": 1784247432,
"base": "USD",
"date": "2026-07-17",
"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"
}
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 applications that require currency conversion for pricing or trading purposes. By specifying the amount and the currencies involved, developers can easily integrate conversion functionalities into their applications.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1784247432,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows developers to query the API for daily historical rates between two dates of their choice. This feature is particularly useful for analyzing trends over specific periods, enabling users to visualize price movements and make informed decisions based on historical data.
{
"success": true,
"timeseries": true,
"start_date": "2026-07-10",
"end_date": "2026-07-17",
"base": "USD",
"rates": {
"2026-07-10": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-12": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-17": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how currencies fluctuate on a day-to-day basis. By tracking rate changes between two dates, developers can gain insights into market volatility and make more informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-10",
"end_date": "2026-07-17",
"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
The OHLC Price Endpoint allows developers to query the API for the open, high, low, and close prices for a specific time period. This data is essential for technical analysis and can help traders identify trends and potential entry or exit points in the market.
{
"success": true,
"timestamp": 1784247432,
"base": "USD",
"date": "2026-07-17",
"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"
}
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 developers working with industrial metals and seeking to analyze long-term trends in pricing.
For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for developers looking to access real-time and historical gold prices, along with a wide range of other metal data. By leveraging the various endpoints, developers can create powerful applications that analyze market trends, automate trading strategies, and provide valuable insights into the precious metals market. The API's capabilities, combined with its user-friendly documentation, make it an essential resource for anyone involved in trading or analyzing precious metals.
For further exploration of the API's features and to start building your applications, visit the Metals-API Website and dive into the Metals-API Documentation for detailed guidance on implementation and usage.