How to Get Copper (XCU) prices using this API for real-time data

Introduction
Metals-API, a powerful tool that provides developers with access to real-time and historical data for various metals. We will explore the significance of Copper in the market, the transformative potential of the Metals-API, and how it can empower developers to create innovative applications that leverage real-time data analytics.
Metals-API Information
About Copper (XCU)
API Description
Metals-API is designed to provide developers with a comprehensive suite of tools for accessing metal prices and currency conversions. The API's capabilities are built around the need for accurate and timely data, allowing users to build next-generation applications that can respond to market changes in real-time. With its user-friendly interface and extensive documentation, the Metals-API is an invaluable resource for developers looking to integrate metal pricing data into their applications.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for Copper (XCU) and other metals. The data is updated based on your subscription plan, ensuring you have the most current information available.
- Historical Rates Endpoint: Access historical rates dating back to 2019. This feature allows users to analyze trends over time by appending a specific date to the API request.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for Copper and other metals. This endpoint is particularly useful for traders looking to make informed decisions based on market conditions.
- Convert Endpoint: This endpoint allows users to convert any amount from one metal to another or to/from USD, providing flexibility in financial transactions.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This feature is essential for analyzing price movements over specific periods.
- Fluctuation Endpoint: Track how Copper prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which can be useful for jewelers and investors in precious metals.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for Copper over a specified period, aiding in investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for Copper, allowing for detailed market analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for users interested in long-term trends.
- API Key: Your unique API key is required to access the 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 for easy integration.
- Available Endpoints: The Metals-API provides a comprehensive list of endpoints, each offering different functionalities to cater to various user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available metal symbols, ensuring you have the latest information at your fingertips.
- Gold Price India Endpoint: Retrieve the latest gold price in India, which can be crucial for investors in the region.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context to market movements.
List of Symbols
Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1755691234,
"base": "USD",
"date": "2025-08-20",
"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
{
"success": true,
"timestamp": 1755604834,
"base": "USD",
"date": "2025-08-19",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-08-13",
"end_date": "2025-08-20",
"base": "USD",
"rates": {
"2025-08-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-08-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-08-20": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1755691234,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-08-13",
"end_date": "2025-08-20",
"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
{
"success": true,
"timestamp": 1755691234,
"base": "USD",
"date": "2025-08-20",
"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
{
"success": true,
"timestamp": 1755691234,
"base": "USD",
"date": "2025-08-20",
"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
Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation.