Integrate this API to Get Historical Prices of Copper - LME 3-month (XCU3M)
Integrate this API to Get Historical Prices of Copper - LME 3-month (XCU3M)
Copper, represented by the symbol XCU, is a crucial metal in various industries, from construction to electronics. As the demand for copper continues to rise, understanding its historical prices becomes essential for investors, traders, and developers alike. In this blog post, we will explore how to obtain historical prices of copper using the Metals-API. We will delve into the capabilities of this API, its innovative features, and how it can empower developers to create next-generation applications that leverage real-time metals data.
About Copper (XCU)
Copper has been a cornerstone of human civilization for thousands of years. Its excellent conductivity, malleability, and resistance to corrosion make it an indispensable material in electrical wiring, plumbing, and various alloys. As industries evolve, the digital transformation in metal markets has become increasingly significant. The integration of smart technologies and data analytics is reshaping how we understand and interact with metal prices.
Technological advancements have paved the way for innovative solutions that provide insights into market trends and fluctuations. The Metals-API is at the forefront of this transformation, offering developers access to a wealth of data that can be harnessed to build applications that respond to market changes in real-time. By utilizing the Metals-API, developers can gain insights into historical price trends, analyze data, and make informed decisions based on comprehensive analytics.
API Description
The Metals-API is a powerful tool designed to provide real-time and historical data for various metals, including copper. This API allows developers to access a range of endpoints that deliver essential information about metal prices, enabling them to create applications that cater to the needs of traders, investors, and analysts.
One of the standout features of the Metals-API is its ability to provide historical rates dating back to 2019. This functionality is crucial for those looking to analyze price trends over time. The API also supports various endpoints that cater to different needs, such as the Latest Rates Endpoint, Historical Rates Endpoint, and Time-Series Endpoint, among others. Each of these endpoints offers unique capabilities that can be leveraged for various applications.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to provide specific functionalities that can be utilized in different scenarios. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for 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 data.
- Historical Rates Endpoint: Users can access historical rates for most metals, including copper, dating back to 2019. By appending a specific date to the API request, developers can retrieve historical price data, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders who operate in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates, making it easier to analyze price movements over a defined period.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides detailed OHLC data for metals, allowing users to analyze price movements within a specific timeframe.
- Historical LME Endpoint: This endpoint offers access to historical rates for LME symbols, including copper, dating back to 2008. This is particularly useful for those looking to analyze long-term trends in the copper market.
- API Key: Each user is assigned a unique API key, which is required to access the API's features. This key must be included in the API request to authenticate the user.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments and trends.
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 metal data into their applications.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints, along with their expected responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1769300228,
"base": "USD",
"date": "2026-01-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": 1769213828,
"base": "USD",
"date": "2026-01-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": "2026-01-18",
"end_date": "2026-01-25",
"base": "USD",
"rates": {
"2026-01-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-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": 1769300228,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-18",
"end_date": "2026-01-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": 1769300228,
"base": "USD",
"date": "2026-01-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": 1769300228,
"base": "USD",
"date": "2026-01-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"
}
Conclusion
In conclusion, the Metals-API provides a robust and comprehensive solution for accessing historical prices of copper and other metals. By leveraging its various endpoints, developers can create applications that offer real-time insights, historical data analysis, and market trend forecasting. The integration of smart technology and data analytics into the metal markets is transforming how we interact with these essential resources.
As the demand for copper continues to grow, understanding its price dynamics through the Metals-API will be invaluable for traders, investors, and developers alike. With features like the Latest Rates Endpoint, Historical Rates Endpoint, and Time-Series Endpoint, the API empowers users to make informed decisions based on accurate and timely data.
For more information on how to implement the Metals-API in your applications, refer to the Metals-API Documentation. To explore the full range of supported symbols, visit the Metals-API Supported Symbols page. Embrace the future of metal trading with the innovative capabilities of the Metals-API.