Get Rebar China Spot (REB-CH) prices in real-time using this API
Get Rebar China Spot (REB-CH) Prices in Real-Time Using the Metals-API
The world of metals trading is rapidly evolving, driven by technological advancements and the increasing demand for real-time data. One of the most significant developments in this space is the ability to access real-time prices for metals, such as Gold (XAU), through APIs. The Metals-API provides a comprehensive solution for developers looking to integrate real-time metals data into their applications. This blog post will delve into the capabilities of the Metals-API, focusing on how it can be used to access Gold prices and other metal data efficiently.
Understanding the GraniteShares Gold Trust (BAR)
The GraniteShares Gold Trust (BAR) represents a significant innovation in the gold investment landscape. As a physically-backed gold ETF, it offers investors a way to gain exposure to gold prices without the complexities of physical ownership. The digital transformation in metal markets has made it easier for investors to access gold and other precious metals through various platforms. The integration of smart technology and data analytics has revolutionized how investors interact with these markets.
Technological advancements have enabled the development of sophisticated tools that provide insights into market trends and price fluctuations. The GraniteShares Gold Trust exemplifies how these innovations can be leveraged to enhance investment strategies. By utilizing data analytics, investors can make informed decisions based on real-time market conditions, thereby optimizing their portfolios.
API Description
The Metals-API is a powerful tool that allows developers to access real-time and historical data for various metals, including Gold (XAU). This API is designed to empower developers to build next-generation applications that can provide users with up-to-date information on metal prices. With its user-friendly interface and comprehensive documentation, the Metals-API makes it easy to integrate metals data into any application.
For more information on how to implement this API, you can refer to the Metals-API Documentation. This resource provides detailed guidance on the various endpoints available, including how to retrieve real-time prices, historical data, and much more.
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
The Latest Rates endpoint is a cornerstone of the Metals-API. Depending on your subscription plan, this endpoint provides real-time exchange rate data that is updated every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for applications that require up-to-the-minute pricing information.
{
"success": true,
"timestamp": 1780532015,
"base": "USD",
"date": "2026-06-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"
}
Historical Rates Endpoint
For applications that require historical data, the Historical Rates endpoint allows users to access exchange rates dating back to 2019. This is particularly useful for trend analysis and market research.
{
"success": true,
"timestamp": 1780445615,
"base": "USD",
"date": "2026-06-03",
"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 is another powerful feature that provides real-time bid and ask prices for metals. This is crucial for traders who need to make quick decisions based on current market conditions.
{
"success": true,
"timestamp": 1780532015,
"base": "USD",
"date": "2026-06-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"
}
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 capabilities.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1780532015,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series endpoint allows users to query the API for daily historical rates between two dates of their choice. This is particularly useful for analyzing trends over specific periods.
{
"success": true,
"timeseries": true,
"start_date": "2026-05-28",
"end_date": "2026-06-04",
"base": "USD",
"rates": {
"2026-05-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-05-30": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-04": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation endpoint provides information about how metal prices fluctuate on a day-to-day basis. This is essential for traders looking to understand market volatility.
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-28",
"end_date": "2026-06-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"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price endpoint allows users to retrieve the open, high, low, and close prices for a specific time period. This data is crucial for traders who rely on candlestick charts for technical analysis.
{
"success": true,
"timestamp": 1780532015,
"base": "USD",
"date": "2026-06-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"
}
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. This resource is invaluable for developers looking to understand the various metals available for trading and analysis.
Conclusion
In conclusion, the Metals-API is an essential tool for developers looking to access real-time and historical data for metals like Gold (XAU). Its robust features, including the Latest Rates, Historical Rates, and Bid/Ask endpoints, provide a comprehensive solution for integrating metals data into applications. By leveraging the capabilities of the Metals-API, developers can create innovative applications that empower users to make informed decisions in the dynamic world of metals trading.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and start building your application today. The future of metals trading is here, and with the right tools, you can be at the forefront of this exciting market.