How to Get Real-Time Faridabad Gold 24k (FARI-24k) Prices with API Calls in JavaScript with Metals-API
Introduction
In today's fast-paced financial landscape, accessing real-time market data is crucial for traders and investors alike. For those interested in the precious metals market, particularly Gold (XAU), the Metals-API provides a powerful solution. This blog post will guide you through the process of obtaining real-time Faridabad Gold 24k (FARI-24k) prices using API calls in JavaScript. We will explore the capabilities of the Metals-API, its endpoints, and how you can leverage this technology to enhance your trading strategies.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and its market dynamics are influenced by various factors, including economic indicators, geopolitical events, and market sentiment. The digital transformation in precious metals trading has opened up new avenues for data analytics and market insights. With the integration of technology in trading, investors can now access real-time data, enabling them to make informed decisions quickly.
The Metals-API stands at the forefront of this transformation, offering developers the tools needed to build next-generation applications that can provide innovative price discovery and digital asset solutions. By utilizing the Metals-API, you can tap into a wealth of information about Gold and other precious metals, allowing for a deeper understanding of market trends and price movements.
API Description
The Metals-API is a comprehensive JSON API that provides real-time and historical data for various metals, including Gold (XAU). It empowers developers to create applications that can access up-to-date market information, enabling them to respond to changes in the market swiftly. The API offers a range of endpoints, each designed to cater to specific data needs, from the latest rates to historical trends.
For more information, you can visit the Metals-API Documentation, which provides detailed insights into the API's capabilities and usage.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that serve different purposes, allowing developers to access the data they need efficiently. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for Gold and other metals, updated based on your subscription plan. Depending on your plan, you can receive updates every 60 minutes or even every 10 minutes.
- Historical Rates Endpoint: Access historical rates dating back to 2019. By appending a specific date to your request, you can retrieve past exchange rates for analysis.
- Bid And Ask Endpoint: This feature allows you to retrieve real-time bid and ask prices, giving you insight into the current market spread.
- Convert Endpoint: Use this endpoint to convert amounts between different metals or to/from USD, facilitating easy calculations for trading.
- Time-Series Endpoint: Query daily historical rates between two dates of your choice, allowing for trend analysis over time.
- Fluctuation Endpoint: Track how prices fluctuate on a day-to-day basis, providing insights into market volatility.
- Carat Endpoint: Retrieve information about Gold rates by carat, which is essential for jewelers and traders dealing in various purities.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for Gold over a specified period, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, useful for comprehensive market studies.
- API Key: Your unique API key is required to authenticate your requests, ensuring secure access to the data.
- API Response: The API delivers exchange rates relative to USD, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API includes 14 different endpoints, each designed to provide specific functionalities.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
- Intraday Endpoint: Query intraday exchange rate data for a single symbol, allowing for real-time trading decisions.
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
Latest Rates Endpoint
The Latest Rates Endpoint allows you to get real-time exchange rates for all available metals. Here’s an example of a typical response:
{
"success": true,
"timestamp": 1786580334,
"base": "USD",
"date": "2026-08-13",
"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"
}
In this response, the rates object contains the exchange rates for various metals, with Gold (XAU) priced at 0.000482 per troy ounce.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999. Here’s an example response:
{
"success": true,
"timestamp": 1786493934,
"base": "USD",
"date": "2026-08-12",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for Gold and other metals on a specific date, allowing for analysis of past market behavior.
Time-series Endpoint
The Time-series Endpoint enables you to get exchange rates for a specific time period. Here’s an example:
{
"success": true,
"timeseries": true,
"start_date": "2026-08-06",
"end_date": "2026-08-13",
"base": "USD",
"rates": {
"2026-08-06": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-08": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-13": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for Gold over a specified period, which can be useful for trend analysis and forecasting.
Convert Endpoint
The Convert Endpoint allows you to convert any amount from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1786580334,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to Gold (XAU), resulting in 0.482 troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates with the Fluctuation Endpoint. Here’s an example:
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-06",
"end_date": "2026-08-13",
"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"
}
This response provides insights into how Gold and other metals fluctuated over the specified period, which can inform trading strategies.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period with the following response:
{
"success": true,
"timestamp": 1786580334,
"base": "USD",
"date": "2026-08-13",
"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"
}
This response provides the opening, high, low, and closing prices for Gold, which are essential for technical analysis and trading decisions.
Bid/Ask Endpoint
Retrieve current bid and ask prices for metals with the following response:
{
"success": true,
"timestamp": 1786580334,
"base": "USD",
"date": "2026-08-13",
"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"
}
This response provides the current bid and ask prices for Gold, allowing traders to make informed decisions based on market conditions.
Conclusion
Accessing real-time Faridabad Gold 24k (FARI-24k) prices using the Metals-API is a straightforward process that can significantly enhance your trading capabilities. By leveraging the various endpoints offered by the API, you can obtain the latest rates, historical data, and valuable insights into market fluctuations.
With the ability to convert currencies, track price changes, and analyze historical trends, the Metals-API equips developers with the tools necessary to build robust applications that cater to the needs of traders and investors. For more detailed information on how to implement these features, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available data.
As you embark on your journey to integrate real-time Gold pricing into your applications, remember to consider best practices for security, performance optimization, and error handling to ensure a seamless user experience. The future of precious metals trading is digital, and with the right tools, you can stay ahead of the curve.