Accessing SPDR Gold MiniShares (GLDM) prices via this API
Accessing SPDR Gold MiniShares (GLDM) Prices via Metals-API
In the ever-evolving landscape of financial markets, accessing real-time data is crucial for investors and developers alike. One of the most sought-after assets is gold, particularly through investment vehicles like SPDR Gold MiniShares (GLDM). This blog post will delve into how you can access GLDM prices and other gold-related data using the Metals-API. We will explore the API's capabilities, its innovative features, and how it empowers developers to create next-generation applications that leverage real-time metals data.
Understanding Gold (XAU)
Gold has long been a symbol of wealth and stability, often referred to as a safe-haven asset. In recent years, the digital transformation in precious metals trading has opened new avenues for investors. The integration of data analytics and technology has revolutionized how market insights are derived, making it easier for traders to make informed decisions. The Metals-API plays a pivotal role in this transformation, providing developers with the tools needed to access real-time and historical gold prices, including those for GLDM.
API Description
The Metals-API is a powerful tool that provides real-time and historical data for various metals, including gold (XAU). It allows developers to build applications that can track price movements, analyze trends, and convert between different currencies. The API's innovative design ensures that users can access accurate and timely data, which is essential for making informed trading decisions.
By utilizing the Metals-API, developers can create applications that not only display current prices but also analyze historical trends, providing a comprehensive view of the gold market. This capability is particularly beneficial for those looking to invest in SPDR Gold MiniShares (GLDM), as it allows for a deeper understanding of price movements and market dynamics.
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: 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 is crucial for traders who need the latest information to make quick decisions.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your query. This feature allows users to analyze past performance and identify trends that may influence future prices.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices, which are essential for understanding market liquidity and making informed trading decisions.
- Convert Endpoint: Easily convert any amount from one currency to another, facilitating transactions and investment strategies across different markets.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling detailed analysis of price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and potential investment risks.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date, helping traders identify key price levels.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed price data for a specific time period, which is essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends.
- API Key: Your unique API key is required for authentication and is passed into the API base URL's access_key parameter.
- API Response: Exchange rates are delivered relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API includes 14 endpoints, each providing different functionalities to cater to various user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals, ensuring you have the latest information at your fingertips.
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, let's explore some example responses from various endpoints:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1782432522,
"base": "USD",
"date": "2026-06-26",
"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
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1782346122,
"base": "USD",
"date": "2026-06-25",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-06-19",
"end_date": "2026-06-26",
"base": "USD",
"rates": {
"2026-06-19": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-21": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-26": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1782432522,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-19",
"end_date": "2026-06-26",
"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) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1782432522,
"base": "USD",
"date": "2026-06-26",
"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
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1782432522,
"base": "USD",
"date": "2026-06-26",
"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
Accessing SPDR Gold MiniShares (GLDM) prices and other gold-related data has never been easier, thanks to the innovative capabilities of the Metals-API. By leveraging its various endpoints, developers can create powerful applications that provide real-time insights into the gold market. Whether you are interested in tracking the latest prices, analyzing historical trends, or converting between currencies, the Metals-API offers the tools you need to succeed.
For more information on how to implement these features, refer to the Metals-API Documentation. Additionally, explore the Metals-API Supported Symbols page to familiarize yourself with the available metal symbols. By integrating the Metals-API into your applications, you can stay ahead in the dynamic world of precious metals trading.