Fetch MTL Historical Prices for Financial Planning using this API
Fetch MTL Historical Prices for Financial Planning using this API
In the world of finance, understanding the historical prices of metals like Gold (XAU) is crucial for effective financial planning. With the rise of digital transformation in metal markets, the need for real-time data has never been more pressing. The Metals-API offers a robust solution for developers looking to access historical prices and other valuable data points. This blog post will delve into the capabilities of the Metals-API, focusing on how to fetch historical prices for Gold and other metals, while exploring the technological innovations that make this possible.
About Nickel (NI)
Nickel, a key component in various industries, has seen a significant transformation due to technological advancements. The integration of smart technology and data analytics has revolutionized how we approach metal markets. As we explore the capabilities of the Metals-API, it's essential to consider how these innovations can empower developers to create next-generation applications that leverage real-time metals data.
API Description
The Metals-API is a powerful tool that provides developers with access to real-time and historical data on various metals, including Gold (XAU). This API is designed to facilitate the integration of metals pricing into applications, enabling users to make informed financial decisions. With its focus on innovation and technological advancement, the Metals-API empowers developers to build applications that can analyze trends, forecast prices, and provide insights into the metals market.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, making it a versatile tool for developers. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This feature is essential for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can retrieve past pricing 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, providing insights into market dynamics and helping traders make informed decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts between different metals or to/from USD. This is particularly useful for applications that deal with multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates, allowing for comprehensive analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information on how metal prices fluctuate on a day-to-day basis, helping users understand market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which is essential for jewelers and those in the jewelry industry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specific date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is essential for those tracking industrial metals.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency across responses.
- Available Endpoints: The Metals-API features 14 different endpoints, each designed to provide specific functionalities.
- Supported Symbols Endpoint: This endpoint returns all available currencies, ensuring developers have access to the latest symbols.
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
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1781568833,
"base": "USD",
"date": "2026-06-16",
"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": 1781482433,
"base": "USD",
"date": "2026-06-15",
"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-06-09",
"end_date": "2026-06-16",
"base": "USD",
"rates": {
"2026-06-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-16": {
"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": 1781568833,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-09",
"end_date": "2026-06-16",
"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": 1781568833,
"base": "USD",
"date": "2026-06-16",
"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": 1781568833,
"base": "USD",
"date": "2026-06-16",
"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 is an invaluable resource for developers looking to access historical prices and real-time data for metals like Gold (XAU). By leveraging the various endpoints offered by the API, developers can create applications that provide insights into market trends, analyze price fluctuations, and facilitate currency conversions. The API's comprehensive documentation and support for a wide range of symbols make it a versatile tool for financial planning and analysis.
For more detailed information on how to implement these features, refer to the Metals-API Documentation. Additionally, explore the Metals-API Supported Symbols page for a complete list of available symbols. By utilizing the Metals-API, developers can stay ahead in the rapidly evolving landscape of metal markets.