Retrieve Copper (NYM $/lbs) Front Month (HG1) - Per Pound Historical Prices using this API

Retrieve Copper (NYM $/lbs) Front Month (HG1) - Per Pound Historical Prices using this API
Copper, represented by the symbol XCU, is one of the most widely used metals in various industries, ranging from electrical wiring to plumbing. As a critical component in many applications, understanding its historical prices is essential for traders, manufacturers, and investors alike. In this blog post, we will explore how to retrieve historical prices for copper using the Metals-API. We will delve into the API's capabilities, focusing on its innovative features, technological advancements, and the transformative potential of real-time metals data.
About Copper (XCU)
Copper has undergone a digital transformation in the metal markets, driven by advancements in technology and data analytics. The integration of smart technologies has enabled stakeholders to gain insights into market trends, price fluctuations, and demand forecasts. As industries increasingly rely on data-driven decision-making, the ability to access historical price data for copper becomes paramount.
Technological innovation has paved the way for sophisticated data analytics tools that can process vast amounts of information in real time. This capability allows businesses to make informed decisions based on current market conditions and historical trends. The Metals-API provides developers with the tools necessary to build applications that leverage this data, enabling them to create solutions that enhance operational efficiency and market responsiveness.
API Description
The Metals-API is a powerful tool that offers real-time and historical data for various metals, including copper. It empowers developers to build next-generation applications that can access and analyze metals data efficiently. The API's capabilities include retrieving the latest rates, historical prices, and various other functionalities that cater to the needs of traders and analysts.
With the Metals-API, users can access a wide range of endpoints designed to provide specific data points. For example, the Latest Rates Endpoint allows users to retrieve real-time exchange rate data, while the Historical Rates Endpoint provides access to historical prices dating back to 2019. This flexibility enables users to tailor their data requests according to their specific needs.
Key Features and Endpoints
The Metals-API offers a comprehensive suite of features that cater to various use cases. Here are some of the key endpoints and their functionalities:
- 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 up-to-the-minute pricing information.
- Historical Rates Endpoint: Users can query the API for historical rates by appending a specific date. This endpoint allows for the retrieval of copper prices over time, facilitating trend analysis and market forecasting.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for copper and other metals. Understanding the bid-ask spread is essential for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a currency conversion feature that allows users to convert amounts from one metal to another or to/from USD. This is particularly useful for businesses operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice. It is ideal for conducting in-depth analyses of price movements over specific periods.
- Fluctuation Endpoint: Users can track how copper prices fluctuate on a day-to-day basis, providing insights into market volatility and helping traders make informed decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with the open, high, low, and close prices for copper over a specified time period, essential for technical analysis.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest price of copper for a specific date, which is useful for identifying price extremes.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, allowing users to analyze long-term trends in copper pricing.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format for easy integration into applications.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available metal symbols, ensuring users can access the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
Understanding the API's response structure is crucial for effective integration. Below are examples of JSON responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1759467639,
"base": "USD",
"date": "2025-10-03",
"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"
}
The response indicates the success of the request, the timestamp of the data, the base currency (USD), and the rates for various metals, including copper (XCU).
Historical Rates Endpoint
{
"success": true,
"timestamp": 1759381239,
"base": "USD",
"date": "2025-10-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows historical rates for a specific date, allowing users to analyze past pricing trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-09-26",
"end_date": "2025-10-03",
"base": "USD",
"rates": {
"2025-09-26": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-09-28": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This example illustrates how to retrieve exchange rates for a specific time period, enabling users to visualize trends over time.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1759467639,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows how to convert an amount from one metal to another, providing the conversion rate and the result.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-09-26",
"end_date": "2025-10-03",
"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 endpoint allows users to track fluctuations in prices, providing insights into market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1759467639,
"base": "USD",
"date": "2025-10-03",
"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 response provides the open, high, low, and close prices for copper, essential for traders conducting technical analysis.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1759467639,
"base": "USD",
"date": "2025-10-03",
"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 endpoint provides current bid and ask prices, helping traders understand market conditions and optimize their trading strategies.
Conclusion
In conclusion, the Metals-API offers a robust solution for retrieving historical prices and real-time data for copper and other metals. By leveraging the API's innovative features, developers can create applications that provide valuable insights into market trends and pricing dynamics. The ability to access comprehensive data through various endpoints, such as the Latest Rates, Historical Rates, and Fluctuation endpoints, empowers users to make informed decisions in a rapidly changing market.
As the metal markets continue to evolve, the integration of smart technologies and data analytics will play a crucial role in shaping the future of trading and investment strategies. By utilizing the Metals-API Documentation, developers can explore the full potential of this powerful tool and unlock new opportunities in the world of metals trading.
For a complete list of supported symbols, visit the Metals-API Supported Symbols page. Whether you are a trader, analyst, or developer, the Metals-API provides the resources you need to stay ahead in the competitive landscape of metal markets.