Fetch Malappuram Gold 24k (MALA-24k) Historical Prices from this API

Introduction
In the ever-evolving landscape of financial technology, the demand for accurate and real-time data has never been more critical, especially in the realm of precious metals trading. For developers and traders alike, accessing historical prices for gold, specifically the 24k gold symbolized as XAU, is essential for making informed decisions. This blog post delves into how to fetch historical prices for Malappuram Gold 24k (MALA-24k) using the Metals-API, a powerful tool that provides comprehensive data on various metals, including gold.
Metals-API Information
About Gold (XAU)
Gold has long been regarded as a safe haven asset, a hedge against inflation, and a store of value. In recent years, the digital transformation in precious metals has revolutionized how traders and investors interact with this commodity. The integration of data analytics and market insights has enabled stakeholders to make data-driven decisions, enhancing their trading strategies.
With the rise of technology in trading, the innovation in price discovery processes has become paramount. The Metals-API empowers developers to build next-generation applications that leverage real-time metals data, allowing for seamless integration of gold pricing into various platforms. This API not only provides the latest rates but also historical data, enabling users to analyze trends and make informed predictions.
API Description
The Metals-API offers a robust set of features designed to meet the needs of developers seeking to incorporate metals data into their applications. With a focus on innovation and technological advancement, this API provides real-time and historical data that can transform how users interact with precious metals.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated frequently based on the user's subscription plan. This capability is crucial for traders who require the most current information to make timely decisions. Furthermore, the API's historical rates allow users to access data dating back to 2019, providing a rich dataset for analysis.
Developers can utilize various endpoints to retrieve specific data, including the latest rates, historical rates, bid and ask prices, and even conversion rates between different metals and currencies. This versatility makes the Metals-API an invaluable resource for anyone involved in the trading of precious metals.
Key Features and Endpoints
The Metals-API is equipped with several key features that enhance its functionality:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or every 10 minutes. This feature is essential for traders who need the latest market information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API call, developers can retrieve past prices, which is crucial for trend analysis.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: This endpoint enables users to convert any amount from one currency to another, facilitating seamless transactions across different markets.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice, allowing for comprehensive analysis over specific periods.
- Fluctuation Endpoint: This feature provides information about how currencies fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers looking for precise pricing.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API to get the lowest and highest prices for a specified date, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can obtain OHLC data for a specific time period, which is vital for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, offering a wealth of data for analysis.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API offers a comprehensive list of endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest data.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: This feature allows users to access the latest news articles related to various metals, keeping them informed about market developments.
API Endpoint Examples and Responses
To illustrate the functionality of the Metals-API, let's explore some example responses for various endpoints:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1746749523,
"base": "USD",
"date": "2025-05-09",
"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 gold (XAU) is 0.000482 per troy ounce, relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1746663123,
"base": "USD",
"date": "2025-05-08",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical price of gold on May 8, 2025, allowing users to analyze past trends.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"base": "USD",
"rates": {
"2025-05-02": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-04": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-09": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of gold prices over a specified period, enabling users to track price movements.
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": 1746749523,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of gold.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"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 response provides insights into how gold prices fluctuated over the specified period, highlighting both the absolute change and percentage change.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1746749523,
"base": "USD",
"date": "2025-05-09",
"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 gold, which are critical for traders conducting technical analysis.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1746749523,
"base": "USD",
"date": "2025-05-09",
"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 the current bid and ask prices for gold, which are essential for traders looking to execute buy or sell orders.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers and traders seeking to access real-time and historical data for precious metals, particularly gold. With its comprehensive set of features, including the ability to fetch historical prices, track fluctuations, and convert between currencies, the API empowers users to make informed trading decisions.
By leveraging the capabilities of the Metals-API, developers can create innovative applications that enhance the trading experience, providing users with the insights they need to navigate the complexities of the metals market. Whether you are a seasoned trader or a developer looking to integrate metals data into your applications, the Metals-API offers the tools and resources necessary to succeed.
For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals. Embrace the future of trading with the Metals-API and unlock the potential of real-time metals data.