Get Magnesium (MG) Historical Prices using this API for Financial Modeling

Get Magnesium (MG) Historical Prices using this API for Financial Modeling
Metals-API, a powerful tool designed for financial modeling and analysis.
Metals-API Information
About Magnesium (MG)
API Description
Metals-API is a robust platform that offers a suite of features designed to provide real-time and historical data for various metals, including Magnesium. This API empowers developers to build applications that can access and analyze metals data seamlessly. With its user-friendly interface and comprehensive documentation, the Metals-API is an invaluable resource for anyone looking to integrate metals data into their applications.
Key Features and Endpoints
Latest Rates Endpoint
{
"success": true,
"timestamp": 1752120059,
"base": "USD",
"date": "2025-07-10",
"rates": {
"XMG": 0.000482
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
{
"success": true,
"timestamp": 1752033659,
"base": "USD",
"date": "2025-07-09",
"rates": {
"XMG": 0.000485
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
{
"success": true,
"timestamp": 1752120059,
"base": "USD",
"date": "2025-07-10",
"rates": {
"XMG": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XMG",
"amount": 1000
},
"info": {
"timestamp": 1752120059,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-07-03",
"end_date": "2025-07-10",
"base": "USD",
"rates": {
"2025-07-03": {
"XMG": 0.000485
},
"2025-07-10": {
"XMG": 0.000482
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-07-03",
"end_date": "2025-07-10",
"base": "USD",
"rates": {
"XMG": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
Open/High/Low/Close (OHLC) Price Endpoint
{
"success": true,
"timestamp": 1752120059,
"base": "USD",
"date": "2025-07-10",
"rates": {
"XMG": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
API Key and Authentication
API Response
List of Symbols
Metals-API Supported Symbols page. This resource is invaluable for developers who need to ensure they are using the correct symbols in their API requests.
Conclusion