Get Mysore Gold 24k (MYSO-24k) prices for financial modeling using this API
Introduction
In the ever-evolving landscape of financial modeling, obtaining accurate and real-time data is crucial for making informed decisions. One such valuable asset is gold, represented by the symbol XAU. With the advent of technology, APIs have become essential tools for developers seeking to integrate financial data into their applications. The Metals-API provides a comprehensive solution for accessing gold prices and other precious metals, enabling developers to harness the power of real-time data for financial modeling.
Metals-API Information
About Gold (XAU)
Gold has long been regarded as a safe haven asset, especially during times of economic uncertainty. Its value is influenced by various factors, including market demand, geopolitical events, and currency fluctuations. As digital transformation takes hold in the precious metals market, data analytics and market insights are becoming increasingly important. The integration of technology in trading has led to innovative approaches in price discovery, allowing traders and investors to make more informed decisions.
With the rise of digital asset solutions, the ability to access real-time gold prices through APIs like the Metals-API is a game changer. Developers can create applications that provide users with up-to-date information, allowing them to react swiftly to market changes. This capability not only enhances trading strategies but also empowers users with the insights needed to navigate the complexities of the financial landscape.
API Description
The Metals-API is designed to deliver real-time and historical data on precious metals, including gold, silver, platinum, and palladium. By leveraging this API, developers can build next-generation applications that require accurate and timely metals data. The API's capabilities extend beyond mere price retrieval; it offers a suite of features that enable comprehensive financial modeling and analysis.
One of the standout features of the Metals-API is its ability to provide real-time exchange rate data, updated at intervals based on the user's subscription plan. This ensures that developers have access to the most current information, which is vital for applications that rely on accurate pricing. Additionally, the API supports historical data queries, allowing users to analyze trends over time and make predictions based on past performance.
Key Features and Endpoints
The Metals-API offers a variety of endpoints, each designed to cater to specific needs within the financial modeling space. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for precious metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. This feature is essential for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Developers can access historical rates dating back to 2019. By appending a specific date to the API call, users can retrieve past pricing data, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals. Understanding the spread between these prices is crucial for traders looking to optimize their buying and selling strategies.
- Convert Endpoint: The Metals-API includes a currency conversion feature, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates. It is ideal for applications that need to analyze price movements over a defined period.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis. This feature provides insights into market volatility and helps developers create applications that can alert users to significant price changes.
- Carat Endpoint: This unique feature allows users to retrieve gold rates by carat. By appending a base value, developers can provide users with precise pricing based on the purity of gold.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access OHLC data for specific time periods, which is essential for technical analysis and understanding market trends.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive analysis of market performance.
- API Key: Each user is assigned a unique API key that must be included in API requests, ensuring secure access to the data.
- API Response: The Metals-API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The API features 14 different endpoints, each providing distinct functionalities to cater to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
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
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1767572044,
"base": "USD",
"date": "2026-01-05",
"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": 1767485644,
"base": "USD",
"date": "2026-01-04",
"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": "2025-12-29",
"end_date": "2026-01-05",
"base": "USD",
"rates": {
"2025-12-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-12-31": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-05": {
"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": 1767572044,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-29",
"end_date": "2026-01-05",
"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": 1767572044,
"base": "USD",
"date": "2026-01-05",
"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": 1767572044,
"base": "USD",
"date": "2026-01-05",
"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
The Metals-API is a powerful tool for developers looking to integrate real-time and historical data on precious metals into their applications. With features like the Latest Rates Endpoint, Historical Rates Endpoint, and Bid/Ask Endpoint, developers can create sophisticated financial models that respond to market changes in real-time. The ability to convert currencies, track fluctuations, and access OHLC data further enhances the API's utility.
As the financial landscape continues to evolve, leveraging APIs like the Metals-API will be essential for developers aiming to provide accurate and timely information to their users. By utilizing the comprehensive features of this API, developers can create applications that not only meet the demands of today's market but also anticipate future trends. For more detailed information, be sure to check out the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete understanding of the available data.