The Easiest Way to Get High Grade Copper Jan 2025 (HGF26) Historical Rates Using API Access
The Easiest Way to Get High Grade Copper Jan 2025 (HGF26) Historical Rates Using API Access
In the ever-evolving landscape of metal markets, obtaining accurate historical prices for metals like Copper (symbol: XCU) has become increasingly vital for developers and analysts alike. With the rise of digital transformation and technological innovation, accessing real-time and historical data through APIs has revolutionized how we interact with market information. This blog post will guide you through the process of retrieving historical prices for Copper using the Metals-API, detailing the endpoints, parameters, and data formats involved.
About Copper (XCU)
Copper is a fundamental metal in various industries, from electrical wiring to construction. As we delve into the digital transformation of metal markets, we see how data analytics and smart technology integration are shaping the future of Copper trading. The Metals-API provides a robust platform for accessing Copper's historical rates, enabling developers to build applications that leverage real-time data for market analysis, investment strategies, and more.
API Description
The Metals-API is a comprehensive JSON API that offers real-time and historical data for various metals, including Copper. This API empowers developers to create next-generation applications by providing seamless access to metal prices, currency conversion, and market insights. With its innovative capabilities, the Metals-API transforms how businesses and individuals interact with metal market data.
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: This endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on your plan, you can receive updates every 60 minutes or even more frequently.
- Historical Rates Endpoint: Access historical rates for Copper and other metals dating back to 2019. By appending a specific date to your request, you can retrieve historical pricing data.
- Bid and Ask Endpoint: This feature allows you to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: Easily convert amounts between different metals or to/from USD, facilitating seamless transactions and calculations.
- Time-Series Endpoint: Query for daily historical rates between two dates of your choice, enabling comprehensive analysis over specific periods.
- Fluctuation Endpoint: Track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve detailed OHLC data for specific time periods, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for in-depth market research.
- API Key: Your unique API key is essential for accessing the Metals-API, ensuring secure and authorized usage.
- API Response: The API delivers exchange rates relative to USD, with all data returned in a structured JSON format.
- News Endpoint: Stay updated with the latest news articles related to various metals, enhancing your market awareness.
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.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of various endpoints and their responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1763388136,
"base": "USD",
"date": "2025-11-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"
}
This response indicates that the current price of Copper (XCU) is 0.294118 per troy ounce, relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1763301736,
"base": "USD",
"date": "2025-11-16",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical price for Copper on a specific date, allowing for detailed analysis of price trends over time.
Time-Series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-11-10",
"end_date": "2025-11-17",
"base": "USD",
"rates": {
"2025-11-10": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-12": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-11-17": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint is particularly useful for analyzing price movements over a defined period, allowing developers to visualize trends and make informed decisions.
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": 1763388136,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert a specific amount of USD into troy ounces of Gold (XAU), showcasing the versatility of the API.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-10",
"end_date": "2025-11-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"
}
This endpoint provides insights into how prices have changed over a specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1763388136,
"base": "USD",
"date": "2025-11-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"
}
This endpoint is essential for traders and analysts who rely on OHLC data for technical analysis and market forecasting.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1763388136,
"base": "USD",
"date": "2025-11-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"
}
This response provides crucial information for traders looking to make informed decisions based on current market conditions.
Conclusion
Accessing historical rates for Copper (XCU) through the Metals-API is a straightforward process that opens up a world of possibilities for developers and analysts. By leveraging the various endpoints available, you can gain insights into market trends, perform detailed analyses, and make informed trading decisions. The API's capabilities, such as real-time data access, historical pricing, and conversion features, empower you to build robust applications that can adapt to the dynamic nature of metal markets.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation and explore the Metals-API Supported Symbols page for a comprehensive list of available metals. Embrace the future of metal trading with the power of real-time data at your fingertips.