How to Get Real-Time Franklin Responsibly Sourced Gold ETF (FGDL) Prices Using Metals-API

How to Get Real-Time Franklin Responsibly Sourced Gold ETF (FGDL) Prices Using Metals-API
Metals-API, developers can easily access real-time prices and historical data for gold and other metals, enabling them to build sophisticated applications that enhance trading strategies and investment decisions.
Understanding Metals-API
About Gold (XAU)
Getting Started with Metals-API
Metals-API Website. Once you have your API key, you can start making requests to the API to retrieve the data you need. Below are the steps to access real-time gold prices:
Step 1: Obtain Your API Key
Step 2: Access the Latest Rates Endpoint
https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XAU
YOUR_API_KEY with your actual API key. The response will include the latest price of gold in USD.
Example Response for Latest Rates
{
"success": true,
"timestamp": 1755741896,
"base": "USD",
"date": "2025-08-21",
"rates": {
"XAU": 0.000482
},
"unit": "per troy ounce"
}
Step 3: Access Historical Rates
https://metals-api.com/api/historical?access_key=YOUR_API_KEY&base=USD&symbols=XAU&date=YYYY-MM-DD
YYYY-MM-DD with the desired date. The response will provide the historical price of gold for that specific date.
Example Response for Historical Rates
{
"success": true,
"timestamp": 1755655496,
"base": "USD",
"date": "2025-08-20",
"rates": {
"XAU": 0.000485
},
"unit": "per troy ounce"
}
Step 4: Utilize the Time-Series Endpoint
https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&base=USD&symbols=XAU&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
start_date and end_date
with your desired date range. The response will include daily rates for gold within that period.
Example Response for Time-Series Data
{
"success": true,
"timeseries": true,
"start_date": "2025-08-14",
"end_date": "2025-08-21",
"base": "USD",
"rates": {
"2025-08-14": {
"XAU": 0.000485
},
"2025-08-21": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Step 5: Explore Additional Endpoints
- Convert Endpoint: Convert any amount from one metal to another or to/from USD. This is useful for applications that require currency conversion.
- Fluctuation Endpoint: Track rate fluctuations between two dates, providing insights into market volatility.
- Bid/Ask Endpoint: Get current bid and ask prices for metals, which is essential for trading applications.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve OHLC data for a specific time period, useful for technical analysis.
Metals-API Documentation.
Understanding API Responses
- 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 the requested metals.
- unit: The unit of measurement for the rates (e.g., per troy ounce).
Common Use Cases
- Trading Platforms: Integrate real-time pricing data to enable users to make informed trading decisions.
- Market Analysis Tools: Analyze historical price trends and fluctuations to provide insights into market behavior.
- Investment Applications: Create applications that help users track their investments in precious metals.
Performance Optimization and Best Practices
- Rate Limiting: Be aware of your subscription plan's rate limits to avoid throttling. Implement caching strategies to minimize redundant API calls.
- Error Handling: Implement robust error handling to manage API response errors gracefully.
- Data Validation: Ensure that all data received from the API is validated before use to prevent errors in your application.
Conclusion
Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metals. With the right tools and data at your disposal, you can stay ahead in the dynamic world of precious metals trading.