Fetch real-time Gold Continuous Contract (GC00) prices using this API

Fetch Real-Time Gold Continuous Contract (GC00) Prices Using This API
In today's fast-paced financial landscape, the demand for real-time data is paramount, especially in the precious metals market. The Gold Continuous Contract (GC00) is a vital symbol for traders and investors looking to capitalize on fluctuations in gold prices. By leveraging the Metals-API, developers can access real-time gold prices and other critical market data, enabling them to create innovative applications that enhance trading strategies and market insights.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been regarded as a safe haven asset and a hedge against inflation. With the digital transformation of financial markets, the integration of technology in trading has become essential. The rise of data analytics and market insights allows traders to make informed decisions based on real-time data. The Metals-API plays a crucial role in this transformation by providing developers with the tools to access and analyze gold price data efficiently.
As technology continues to evolve, the innovation in price discovery mechanisms has led to the emergence of digital asset solutions that facilitate seamless trading experiences. The Metals-API empowers developers to build next-generation applications that can harness the power of real-time metals data, enabling users to track market trends and make strategic decisions.
API Description
The Metals-API is a powerful tool designed for developers seeking to integrate real-time and historical metals data into their applications. With its robust capabilities, the API offers a wide range of endpoints that cater to various needs, from retrieving the latest gold prices to accessing historical data for analysis. This API is not just about fetching data; it represents a technological advancement that can transform how traders interact with the metals market.
For those interested in exploring the full capabilities of the Metals-API, the documentation provides comprehensive guidance on how to utilize its features effectively. The API supports a variety of symbols, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD), allowing developers to access a comprehensive range of metal data. For a complete list of supported symbols, visit the Symbols List.
Key Features and Endpoints
The Metals-API offers several key features that enhance its functionality and usability for developers:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This allows developers to access the most current gold prices and other metal rates.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. Developers can query the Metals-API for historical rates by appending a specific date, enabling them to analyze trends over time.
- Bid And Ask Endpoint: This powerful feature allows developers to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert any amount from one currency to another, facilitating seamless transactions across different markets.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice, allowing for detailed analysis of price movements over time.
- Fluctuation Endpoint: This endpoint 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 essential for jewelers and those in the luxury goods market.
- Lowest/Highest Price Endpoint: This feature allows developers to query the API to get the lowest and highest price for a specified date, providing critical insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access open, high, low, and close prices for a specific time period, which is vital for technical analysis.
- Historical LME Endpoint: Historical rates for LME symbols are accessible, dating back to 2008, allowing for extensive historical analysis.
- API Key: Each user is provided with a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: Exchange rates delivered by the Metals-API are by default relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The API comes with a variety of endpoints, each providing different functionalities tailored to specific needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring developers have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for traders in the Indian market.
- News Endpoint: The Metals-API allows users to retrieve the latest news articles related to various metals, keeping traders informed of market developments.
API Endpoint Examples and Responses
Understanding the API's response structure is crucial for effective integration. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1746317589,
"base": "USD",
"date": "2025-05-04",
"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"
}
The response indicates a successful request, providing the current exchange rates for various metals relative to USD. The "rates" object contains the latest prices for gold (XAU), silver (XAG), platinum (XPT), and more.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1746231189,
"base": "USD",
"date": "2025-05-03",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This endpoint allows developers to access historical exchange rates for a specific date, enabling trend analysis and historical comparisons.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-04-27",
"end_date": "2025-05-04",
"base": "USD",
"rates": {
"2025-04-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint provides a detailed view of exchange rates over a specified period, allowing for comprehensive analysis of price movements.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1746317589,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint demonstrates the conversion of an amount from USD to gold (XAU), providing the conversion rate and the resulting amount in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-27",
"end_date": "2025-05-04",
"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"
}
The fluctuation endpoint provides insights into how prices have changed over a specified period, which is essential for understanding market dynamics.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1746317589,
"base": "USD",
"date": "2025-05-04",
"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 endpoint provides critical OHLC data, which is essential for traders conducting technical analysis and making informed trading decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1746317589,
"base": "USD",
"date": "2025-05-04",
"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"
}
The bid/ask endpoint provides real-time pricing information, which is crucial for traders looking to execute orders at the best possible prices.
Conclusion
The Metals-API is a transformative tool for developers looking to integrate real-time gold prices and other metal data into their applications. By leveraging its extensive features, including the latest rates, historical data, and various conversion options, developers can create innovative solutions that enhance trading strategies and market insights. The API's comprehensive documentation and support for multiple symbols make it an invaluable resource for anyone involved in the precious metals market.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Symbols List for a complete overview of supported symbols. The Metals-API Website is also a great starting point for understanding how to leverage this powerful tool in your trading applications.