Fetch Mysore Gold 22k (MYSO-22k) Historical Prices through this API
Introduction
In the world of precious metals, gold (XAU) stands out as a symbol of wealth and stability. For developers and financial analysts, accessing historical prices of gold is crucial for market analysis, investment strategies, and economic forecasting. The Metals-API provides a powerful solution for fetching historical prices of gold, including the Mysore Gold 22k (MYSO-22k). This blog post will explore the capabilities of the Metals-API, focusing on how to retrieve historical gold prices and the innovative features that make this API a valuable tool for developers.
About Gold (XAU)
Gold has been a cornerstone of financial systems for centuries, often viewed as a safe haven during economic uncertainty. With the digital transformation in precious metals trading, the integration of technology has revolutionized how investors and traders access market data. The Metals-API is at the forefront of this transformation, providing real-time and historical data analytics that empower developers to create next-generation applications.
As the demand for data analytics and market insights grows, the Metals-API stands out by offering comprehensive access to gold prices and other precious metals. By leveraging technology integration in trading, developers can innovate price discovery methods and create digital asset solutions that cater to modern financial needs.
API Description
The Metals-API is designed to provide developers with real-time and historical data on precious metals, including gold. With its robust capabilities, the API allows users to build applications that can track market trends, analyze price fluctuations, and convert currencies seamlessly. The API's transformative potential lies in its ability to deliver accurate and timely data, enabling developers to create applications that respond to market changes in real-time.
For more detailed information on how to use the API, refer to the Metals-API Documentation. This resource provides comprehensive guidance on the various endpoints and their functionalities.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data needs. Here are some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for precious metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes or every 10 minutes. This endpoint is essential for developers looking to integrate live pricing data into their applications.
{
"success": true,
"timestamp": 1784765776,
"base": "USD",
"date": "2026-07-23",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
Accessing historical rates is crucial for analyzing market trends over time. The Historical Rates Endpoint allows users to query historical rates dating back to 2019 by appending a specific date in the format YYYY-MM-DD. This feature is particularly useful for developers conducting long-term analyses or backtesting trading strategies.
{
"success": true,
"timestamp": 1784679376,
"base": "USD",
"date": "2026-07-22",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint provides real-time bid and ask prices for metals, allowing developers to understand market depth and pricing dynamics. This feature is essential for applications that require precise trading information.
{
"success": true,
"timestamp": 1784765776,
"base": "USD",
"date": "2026-07-23",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for applications that require currency conversion for pricing or reporting purposes.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1784765776,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint enables users to query daily historical rates between two specified dates. This feature is invaluable for developers looking to analyze trends over specific periods, allowing for more informed decision-making.
{
"success": true,
"timeseries": true,
"start_date": "2026-07-16",
"end_date": "2026-07-23",
"base": "USD",
"rates": {
"2026-07-16": {
"XAU": 0.000485,
"XAG": 0.03825
},
"2026-07-18": {
"XAU": 0.000483,
"XAG": 0.0382
},
"2026-07-23": {
"XAU": 0.000482,
"XAG": 0.03815
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint allows users to track rate fluctuations between two dates. This feature is essential for understanding market volatility and making informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-16",
"end_date": "2026-07-23",
"base": "USD",
"rates": {
"XAU": {
"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
The OHLC Price Endpoint provides open, high, low, and close prices for a specific time period. This data is crucial for technical analysis and helps traders identify market trends.
{
"success": true,
"timestamp": 1784765776,
"base": "USD",
"date": "2026-07-23",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint allows users to query the API for the lowest and highest prices within a specified date range. This feature is particularly useful for identifying market extremes and making strategic trading decisions.
{
"success": true,
"timestamp": 1784765776,
"base": "USD",
"date": "2026-07-23",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is essential for developers working with London Metal Exchange data.
{
"success": true,
"timestamp": 1784679376,
"base": "USD",
"date": "2026-07-22",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825
},
"unit": "per troy ounce"
}
API Key and Authentication
To access the Metals-API, developers must use an API key, which is a unique identifier passed into the API base URL's access_key parameter. This key ensures secure access to the API and helps manage usage limits. Developers should keep their API keys confidential to prevent unauthorized access.
API Response Structure
The API responses are structured in JSON format, providing a clear and concise way to access data. Each response includes a success status, timestamp, base currency, date, and rates for various metals. Understanding the structure of these responses is crucial for developers to effectively parse and utilize the data in their applications.
Common Use Cases
Developers can leverage the Metals-API in various applications, including:
- Building financial dashboards that display real-time and historical gold prices.
- Creating trading bots that analyze price fluctuations and execute trades based on predefined criteria.
- Integrating currency conversion features into e-commerce platforms that deal with precious metals.
- Developing market analysis tools that provide insights into trends and price movements over time.
Conclusion
The Metals-API offers a comprehensive solution for developers seeking to access historical prices of gold and other precious metals. With its innovative features and robust capabilities, the API empowers users to build applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. By utilizing the Metals-API, developers can stay ahead in the rapidly evolving world of precious metals trading.
For more information on the API's capabilities, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation. Additionally, check the Metals-API Supported Symbols page for a complete list of available metal symbols.