How to retrieve Ludhiana Gold 24k (LUDH-24k) prices using this API

XAU. For those looking to retrieve Ludhiana Gold 24k (LUDH-24k) prices, leveraging the Metals-API can provide a seamless experience. This blog post will delve into the capabilities of the Metals-API, its various endpoints, and how developers can utilize this powerful tool to access gold prices and other metal data efficiently.
Metals-API Information
About Gold (XAU)
API Description
Metals-API is designed to provide developers with access to real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API empowers developers to create applications that can track prices, analyze trends, and provide valuable insights into the metals market.
Key Features and Endpoints
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint provides real-time exchange rate data for metals, updated every 60 minutes or more frequently. This is crucial for traders who need the latest pricing information to make timely decisions.
- Historical Rates Endpoint: Access historical rates dating back to 2019. By appending a specific date to your query, you can retrieve past pricing data, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows you to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and helping traders gauge the best times to buy or sell.
- Convert Endpoint: This endpoint enables the conversion of any amount from one metal to another or to/from USD, facilitating easy transactions and calculations for traders.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This is particularly useful for analyzing price movements over specific periods.
- Fluctuation Endpoint: Retrieve information about how metal prices fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Get detailed information about gold rates by carat, which is essential for jewelers and consumers looking to buy gold jewelry.
- Lowest/Highest Price Endpoint: Query the API to find the lowest and highest prices for metals over a specified period, aiding in investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for metals, which are critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for those trading in industrial metals.
- API Key: Your unique API key is essential for accessing the API and should be included in the base URL's access_key parameter.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API features multiple endpoints, each providing distinct functionalities tailored to various user needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metal symbols, ensuring users have access to the latest data.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: Stay updated with the latest news articles related to various metals, helping traders stay informed about market movements.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1747357370,
"base": "USD",
"date": "2025-05-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": 1747270970,
"base": "USD",
"date": "2025-05-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-05-09",
"end_date": "2025-05-16",
"base": "USD",
"rates": {
"2025-05-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-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": 1747357370,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-09",
"end_date": "2025-05-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) Endpoint
{
"success": true,
"timestamp": 1747357370,
"base": "USD",
"date": "2025-05-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": 1747357370,
"base": "USD",
"date": "2025-05-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
Metals-API Documentation, which provides detailed guidance on how to implement these features effectively. Additionally, the Metals-API Supported Symbols page offers a comprehensive list of all available metal symbols, ensuring you have the necessary data at your fingertips. Finally, visit the Metals-API Website for further insights and updates on this powerful API.