Access Rebar China Spot (REB-CH) prices using this API
Access Rebar China Spot (REB-CH) Prices Using This API
In today's rapidly evolving financial landscape, the ability to access real-time data is paramount for developers and businesses alike. The Metals-API provides a robust solution for accessing gold (XAU) prices and other metal market data, enabling developers to build innovative applications that leverage real-time insights. This blog post will explore the capabilities of the Metals-API, focusing on how it can transform the way we interact with metal markets, particularly in the context of GraniteShares Gold Trust (BAR).
About GraniteShares Gold Trust (BAR)
The GraniteShares Gold Trust is an exchange-traded fund (ETF) that aims to track the price of gold bullion. As the demand for gold continues to rise, driven by its status as a safe-haven asset, the integration of technology into metal markets becomes increasingly vital. Digital transformation is reshaping how investors access and analyze market data, and the GraniteShares Gold Trust is at the forefront of this evolution.
Technological innovation in the financial sector has led to the development of advanced data analytics tools that provide insights into market trends. The integration of smart technology allows for real-time tracking of gold prices, enabling investors to make informed decisions based on current market conditions. As we look to the future, the possibilities for further advancements in the gold market are vast, with potential applications in predictive analytics and automated trading strategies.
API Description
The Metals-API is a powerful tool that provides developers with access to real-time and historical metals data. This API empowers users to build next-generation applications that can analyze market trends, track price fluctuations, and convert currencies seamlessly. With its user-friendly interface and comprehensive documentation, the Metals-API is designed to facilitate the integration of metal market data into various applications.
For more information, you can visit the Metals-API Documentation, which provides detailed guidance on how to utilize the API effectively. Additionally, the Metals-API Supported Symbols page offers a comprehensive list of all available metal symbols, including gold (XAU).
Key Features of the Metals-API
The Metals-API offers a variety of endpoints that cater to different needs within the metal markets. Each endpoint provides unique functionalities that can be leveraged for various applications:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently depending on your subscription plan. This feature is crucial for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your query. This allows developers to analyze past market trends and make informed predictions about future movements.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: This feature allows users to convert any amount from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling in-depth analysis of price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is essential for jewelers and those in the luxury goods market.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specific date, allowing for effective market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for a specific date, which is critical for traders looking to analyze market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of market trends.
- API Key: Your unique API key is essential for accessing the API and is passed into the base URL's access_key parameter.
- API Response: Exchange rates are delivered relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 different endpoints, each designed to provide specific functionalities tailored to user needs.
- Intraday Endpoint: Query intraday exchange rate data for a single symbol, which is particularly useful for day traders.
Understanding API Responses
The API responses are structured in JSON format, making them easy to parse and integrate into applications. Below are examples of various API responses for different endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1787875919,
"base": "USD",
"date": "2026-08-28",
"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"
}
This response indicates a successful request, providing the latest rates for various metals relative to USD. The "rates" object contains the exchange rates for gold (XAU) and other metals, allowing developers to access the necessary pricing information quickly.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1787789519,
"base": "USD",
"date": "2026-08-27",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical exchange rates for a specific date, allowing developers to analyze past market performance and trends.
Time-Series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-08-21",
"end_date": "2026-08-28",
"base": "USD",
"rates": {
"2026-08-21": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-23": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-28": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response shows the exchange rates for a specific time period, allowing developers to visualize trends and fluctuations over time.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1787875919,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates the conversion of an amount from USD to gold (XAU), providing the result in troy ounces. This feature is particularly useful for applications that require currency conversion for transactions.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-21",
"end_date": "2026-08-28",
"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 the rates have fluctuated over a specified period, which is essential for traders and analysts looking to understand market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1787875919,
"base": "USD",
"date": "2026-08-28",
"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 provides the open, high, low, and close prices for a specific date, which is critical for traders looking to analyze market performance and make informed decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1787875919,
"base": "USD",
"date": "2026-08-28",
"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 the current bid and ask prices for metals, which is essential for understanding market liquidity and pricing dynamics.
Conclusion
The Metals-API is a transformative tool for developers looking to access real-time and historical data on metals, particularly gold (XAU). By leveraging the various endpoints offered by the API, developers can create applications that provide valuable insights into market trends, price fluctuations, and currency conversions. The integration of such technology not only enhances the efficiency of trading and investment strategies but also empowers users with the knowledge needed to navigate the complexities of the metal markets.
As the financial landscape continues to evolve, the importance of real-time data and analytics will only grow. The Metals-API stands out as a leading solution for accessing critical market information, enabling developers to build innovative applications that meet the demands of today's investors. For more information on how to get started, visit the Metals-API Documentation and explore the comprehensive features available.