Access Hyderabad Gold 18k (HYDE-18k) API Usage Examples in JSON Format
Access Hyderabad Gold 18k (HYDE-18k) API Usage Examples in JSON Format
In the world of precious metals trading, having access to real-time data is crucial for making informed decisions. The Metals-API provides developers with the tools necessary to retrieve Gold (XAU) exchange rates in JSON format, enabling seamless integration into applications. This blog post will explore the capabilities of the Metals-API, focusing on how to effectively utilize its features to access and analyze gold prices, along with practical examples and integration tips.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and in today's digital age, it is undergoing a transformation through technology. The integration of data analytics and market insights into precious metals trading is revolutionizing how investors approach the market. With the rise of digital asset solutions, the demand for real-time data has never been higher. The Metals-API stands at the forefront of this transformation, providing developers with the ability to access and analyze gold prices in a way that was previously unimaginable.
API Description
The Metals-API is a powerful tool that offers 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 provide users with up-to-date information on metal prices, trends, and fluctuations. The API's capabilities extend beyond simple price retrieval; it empowers developers to create innovative solutions that enhance trading strategies and decision-making processes.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for comprehensive guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for gold and other metals, updated based on your subscription plan. Depending on your plan, you can receive updates every 60 minutes or every 10 minutes.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your query. This feature is invaluable for analyzing trends over time.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing traders to make informed decisions based on current market conditions.
- Convert Endpoint: Easily convert amounts from one metal to another or to/from USD, streamlining transactions and calculations.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, enabling detailed analysis of price movements over time.
- Fluctuation Endpoint: Track how metal prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve gold rates by carat, which is essential for jewelers and buyers looking for specific quality metrics.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for a specified date, which can help in identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed OHLC data for specific time periods, crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, useful for commodities trading.
- API Key: Your unique API key is essential for authentication and must be included in your requests.
- API Response: The API returns exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API features 14 endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
The Latest Rates Endpoint allows you to get real-time exchange rates for all available metals. Here’s an example response:
{
"success": true,
"timestamp": 1783022853,
"base": "USD",
"date": "2026-07-02",
"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"
}
In this response, the "rates" object contains the exchange rates for various metals, with "XAU" representing gold. The "unit" indicates that the rates are per troy ounce.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999. Here’s an example response:
{
"success": true,
"timestamp": 1782936453,
"base": "USD",
"date": "2026-07-01",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for gold and other metals on a specific date, allowing for trend analysis and historical comparisons.
Time-Series Endpoint
The Time-Series Endpoint enables you to get exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-06-25",
"end_date": "2026-07-02",
"base": "USD",
"rates": {
"2026-06-25": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-27": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-02": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for gold over a specified period, which is essential for analyzing price trends and making predictions.
Convert Endpoint
The Convert Endpoint allows you to convert any amount from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1783022853,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates that 1000 USD is equivalent to 0.482 troy ounces of gold, providing a straightforward conversion for users.
Fluctuation Endpoint
Track rate fluctuations between two dates using the Fluctuation Endpoint. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-25",
"end_date": "2026-07-02",
"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 and other metals have fluctuated over a specified period, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
The OHLC Endpoint provides open, high, low, and close prices for a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1783022853,
"base": "USD",
"date": "2026-07-02",
"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 is essential for traders who rely on technical analysis, as it provides a snapshot of price movements throughout the day.
Bid/Ask Endpoint
The Bid/Ask Endpoint allows you to get current bid and ask prices for metals. Here’s an example response:
{
"success": true,
"timestamp": 1783022853,
"base": "USD",
"date": "2026-07-02",
"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 crucial information for traders, allowing them to understand the current market conditions and make informed decisions.
Conclusion
The Metals-API is an invaluable resource for developers looking to integrate real-time gold exchange rates into their applications. By leveraging its various endpoints, you can access a wealth of data that enhances trading strategies and decision-making processes. From retrieving the latest rates to analyzing historical trends, the API offers comprehensive solutions tailored to the needs of technically proficient users.
For further exploration of the API's capabilities, refer to the Metals-API Documentation and the Metals-API Supported Symbols page. By understanding the intricacies of the API and its responses, you can unlock the full potential of precious metals trading in the digital age.