Get Sprott ESG Gold ETF (SESG) Historical Prices with Metals-API

Get Sprott ESG Gold ETF (SESG) Historical Prices with Metals-API
Metals-API Information
About Gold (XAU)
Key characteristics of Gold:
- Market significance: Gold is considered a major safe-haven asset and an effective hedge against inflation.
- Primary uses: It is widely used in investment, jewelry, electronics, dentistry, and aerospace industries.
- Major producers: The leading producers of gold include China, Australia, Russia, and the United States.
- Measurement: Gold is typically priced in troy ounces, with one troy ounce equaling 31.1034768 grams.
- Purity: The purity of gold is measured in karats (with 24k being pure gold) or fineness (where 999.9 indicates 99.99% purity).
- Trading: Gold is actively traded on major exchanges, including COMEX, LBMA, and the Shanghai Gold Exchange.
Gold Market Information
- Global economic conditions and inflation expectations
- Industrial demand and technological advancements
- Mining production and supply constraints
- Investment demand, including ETFs and physical holdings
- Currency fluctuations, particularly the US Dollar
- Geopolitical events and overall market uncertainty
API Description
Metals-API Website or check the Metals-API Documentation for detailed guidance on using the API. You can also explore the Metals-API Supported Symbols to find the relevant symbols for your queries.
Key Features and Endpoints
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or more frequently. This is essential for investors who need the most current pricing information.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. You can query the Metals-API for historical rates by appending a specific date to your request. This feature is particularly useful for analyzing price trends over time.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time Bid and Ask prices, which are crucial for traders looking to make informed buying and selling decisions.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling you to convert any amount from one currency to another. This is particularly useful for investors dealing in multiple currencies.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice, making it easier to conduct thorough analyses of price movements.
- Fluctuation Endpoint: With this endpoint, you can retrieve information about how currencies fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: This feature allows you to retrieve information about gold rates by carat, which is essential for jewelers and investors in the jewelry market.
- Lowest/Highest Price Endpoint: This endpoint enables you to query the API for the lowest and highest prices over a specified period, helping you identify market trends.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for a given day, which is vital for traders analyzing market performance.
- Historical LME Endpoint: This endpoint gives access to historical rates for LME symbols dating back to 2008, allowing for extensive historical analysis.
- API Key: Your unique API Key is required to access the API, ensuring secure and authorized usage.
- API Response: The exchange rates delivered by Metals-API are by default relative to USD, and all data is returned in a structured JSON format.
- Available Endpoints: The API comes with multiple endpoints, each providing different functionalities tailored to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metals, ensuring you have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for investors in the Indian market.
- News Endpoint: This feature allows you to retrieve the latest news articles related to various metals, keeping you informed about market developments.
Example API Responses
Latest Rates Endpoint Response:
{
"success": true,
"timestamp": 1741910913,
"base": "USD",
"date": "2025-03-14",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744,
"EUR": 0.92,
"GBP": 0.78,
"JPY": 110.45
}
}
- success: Indicates whether the API request was successful.
- timestamp: The time at which the data was retrieved.
- base: The base currency for the exchange rates.
- date: The date for which the rates are applicable.
- rates: An object containing the exchange rates for various metals and currencies.
Historical Rates Endpoint Response:
{
"success": true,
"timestamp": 1741824513,
"base": "USD",
"date": "2025-03-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
}
}
Convert Endpoint Response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1741910913,
"rate": 0.000482
},
"result": 0.482
}
- success: Indicates the success of the conversion request.
- query: Contains the details of the conversion request, including the source currency, target currency, and amount.
- info: Provides additional information, including the timestamp and conversion rate.
- result: The result of the conversion, showing how much of the target currency is equivalent to the specified amount of the source currency.
Common Use Cases for Metals-API
- Real-time Precious Metal Price Tracking: Investors can monitor the prices of gold, silver, platinum, and palladium in real-time, allowing for timely investment decisions.
- Historical Price Analysis: Analysts can study historical price trends to inform investment strategies and market predictions.
- Currency Conversion: The API facilitates easy conversion between different currencies and precious metals, which is essential for global investors.
- Price Alerts: Users can set up notifications to alert them when prices reach specific thresholds, enabling proactive trading.
- Financial Applications: Developers can integrate metal prices into financial dashboards and applications, enhancing user experience and functionality.
- Trading Platforms: Trading platforms can leverage accurate metal pricing data to provide users with reliable information for their trading activities.
- Investment Portfolio Tracking: Investors can track the value of their precious metal investments over time, helping them manage their portfolios effectively.
Implementation Guidance
- Error Handling: Implement robust error handling to manage network issues and unexpected API responses. This ensures that your application can gracefully handle failures.
- Data Validation: Validate and format the data received from the API for display purposes. This is crucial for maintaining data integrity and user experience.
- Conversion Calculations: Ensure accurate conversion calculations between different units and currencies, especially when dealing with precious metals.
- Historical Data Storage: Consider storing historical data for trend analysis, which can provide valuable insights over time.
Conclusion
Metals-API Documentation, browse the Metals-API Supported Symbols, and visit the Metals-API Website for more resources and information.