Integrate Gold Continuous Contract (GC00) prices into your application using this API

Integrate Gold Continuous Contract (GC00) Prices into Your Application Using This API
XAU. With the rise of digital transformation in precious metals trading, developers are increasingly looking for robust APIs to access real-time and historical gold prices. The Metals-API provides a comprehensive solution for integrating gold prices into your applications, offering a suite of features that empower developers to create innovative trading solutions.
About Gold (XAU)
Metals-API to access real-time gold prices, enabling them to build applications that provide users with up-to-date market information.
API Description
- 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 applications to provide users with the most current gold prices.
- Historical Rates Endpoint: Access historical rates for gold and other metals dating back to 2019. By appending a specific date to the API request, developers can retrieve past prices and analyze trends over time.
- Bid and Ask Endpoint: This feature enables developers to retrieve real-time bid and ask prices for gold, providing insights into market liquidity and helping traders make informed decisions.
- Convert Endpoint: This endpoint allows for the conversion of any amount from one metal to another or to/from USD, making it easy for applications to handle various currency conversions.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice, enabling detailed analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how gold prices fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, allowing applications to cater to specific user needs in the jewelry market.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest gold prices for a specified date range, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows developers to get the open, high, low, and close prices for gold, essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- API Key: Each developer is provided with a unique API key that must be included in requests to authenticate and authorize access to the API.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data representation.
- Available Endpoints: The Metals-API offers a constantly updated list of available endpoints, ensuring developers have access to the latest features.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, catering to a specific market.
- News Endpoint: Stay updated with the latest news articles related to various metals, providing context for market movements.
Key Features and Endpoints
Latest Rates Endpoint
{
"success": true,
"timestamp": 1755309692,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
{
"success": true,
"timestamp": 1755223292,
"base": "USD",
"date": "2025-08-15",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-08-09",
"end_date": "2025-08-16",
"base": "USD",
"rates": {
"2025-08-09": {
"XAU": 0.000485
},
"2025-08-11": {
"XAU": 0.000483
},
"2025-08-16": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1755309692,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-08-09",
"end_date": "2025-08-16",
"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
{
"success": true,
"timestamp": 1755309692,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1755309692,
"base": "USD",
"date": "2025-08-16",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
Common Use Cases and Integration Strategies
- Trading Platforms: Developers can create trading platforms that provide users with real-time gold prices, historical data, and analytical tools to make informed trading decisions.
- Investment Apps: Investment applications can leverage the API to provide users with insights into gold price trends, helping them manage their portfolios effectively.
- Market Analysis Tools: By integrating the Metals-API, developers can build tools that analyze market trends and provide users with actionable insights based on real-time data.
- Financial News Aggregators: Applications that aggregate financial news can utilize the API to provide users with the latest gold prices alongside relevant news articles.
Performance Optimization and Scaling
- Rate Limiting: Be aware of the API's rate limits and implement caching strategies to minimize the number of requests made to the API.
- Data Caching: Cache frequently accessed data to reduce latency and improve application performance.
- Asynchronous Requests: Utilize asynchronous requests to prevent blocking operations and enhance user experience.
Security Considerations
- API Key Management: Keep your API key secure and do not expose it in client-side code. Use environment variables to manage sensitive information.
- Data Validation: Always validate and sanitize user inputs to prevent injection attacks.
- HTTPS Protocol: Ensure that all API requests are made over HTTPS to protect data in transit.
Conclusion
Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals. Start integrating gold prices into your applications today and unlock the potential of real-time metals data!