Access GraniteShares Gold Trust (BAR) market prices using this API

Access GraniteShares Gold Trust (BAR) Market Prices Using This API
The GraniteShares Gold Trust (BAR) is a popular investment vehicle for those looking to gain exposure to the price of gold without the complexities of physical ownership. In today's digital age, accessing real-time market prices for gold and other precious metals is crucial for investors and developers alike. The Metals-API provides a robust solution for retrieving market data, enabling developers to build innovative applications that leverage real-time and historical metals data.
Metals-API Information
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical data for various metals, including gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD). This API empowers users to integrate metals pricing into their applications seamlessly, facilitating better decision-making and trading strategies.
About Gold (XAU)
Gold has long been regarded as a safe haven asset, especially in times of economic uncertainty. The digital transformation in precious metals trading has opened new avenues for investors, allowing them to access market insights and analytics that were previously unavailable. With the integration of technology in trading, investors can now utilize data analytics to make informed decisions based on real-time price movements and historical trends.
Furthermore, the innovation in price discovery mechanisms has led to more transparent and efficient markets. Digital asset solutions, such as those provided by the Metals-API, allow developers to create applications that can track gold prices, analyze trends, and even automate trading strategies based on predefined criteria.
API Description
The Metals-API offers a comprehensive suite of features that cater to the needs of developers looking to integrate precious metals data into their applications. With a focus on innovation and technological advancement, this API enables users to access real-time market data, historical rates, and various analytical tools that can enhance trading strategies.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API provides several endpoints that allow users to access a wealth of information about precious metals. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. It allows developers to retrieve the current price of gold (XAU) and other metals in various currencies.
- Historical Rates Endpoint: Users can access historical rates for most metals dating back to 2019. By appending a specific date to the API call, developers can retrieve past prices, enabling them to analyze trends over time.
- Bid and Ask Endpoint: This feature allows users to obtain real-time bid and ask prices for metals, which is essential for traders looking to execute orders at the best possible prices.
- Convert Endpoint: The API includes a currency conversion feature, allowing users to convert amounts from one metal to another or to/from USD. This is particularly useful for investors dealing in multiple currencies.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two dates of their choice, providing insights into price movements over specific periods.
- Fluctuation Endpoint: This endpoint tracks how metal prices fluctuate on a day-to-day basis, giving users a clear picture of market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and those in the luxury goods market.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices of metals over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access the open, high, low, and close prices for metals, which are critical for technical analysis.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API offers 14 different endpoints, each designed to provide specific functionalities related to metals pricing.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring developers have access to the latest information.
- Gold Price India Endpoint: Users can retrieve the latest gold price specifically for the Indian market, which is essential for local investors.
- News Endpoint: This feature allows users to access the latest news articles related to various metals, keeping them informed about market developments.
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.
API Endpoint Examples and Responses
To illustrate the capabilities of the Metals-API, here are some example responses for various endpoints:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1760580031,
"base": "USD",
"date": "2025-10-16",
"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
{
"success": true,
"timestamp": 1760493631,
"base": "USD",
"date": "2025-10-15",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-10-09",
"end_date": "2025-10-16",
"base": "USD",
"rates": {
"2025-10-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-10-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-10-16": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1760580031,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-10-09",
"end_date": "2025-10-16",
"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"
}
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1760580031,
"base": "USD",
"date": "2025-10-16",
"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"
}
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1760580031,
"base": "USD",
"date": "2025-10-16",
"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"
}
Conclusion
The Metals-API is an invaluable resource for developers and investors looking to access real-time and historical data for precious metals like gold. By leveraging the various endpoints offered by the API, users can create sophisticated applications that provide insights into market trends, price fluctuations, and trading opportunities.
With features such as the Latest Rates Endpoint, Historical Rates Endpoint, and Bid/Ask Endpoint, the Metals-API equips developers with the tools necessary to build next-generation applications that can transform the way investors interact with precious metals. For more detailed information on how to implement these features, refer to the Metals-API Documentation.
As the market for precious metals continues to evolve, staying informed and utilizing the right tools will be essential for success. The Metals-API not only provides access to critical data but also empowers developers to innovate and create solutions that meet the demands of modern investors.