Retrieve Vijayawada Gold 22k (VIJA-22k) prices using this API

Introduction
In the ever-evolving landscape of precious metals trading, the ability to access real-time data is paramount for investors and developers alike. One such valuable resource is the Metals-API, which allows users to retrieve the latest prices for various metals, including the popular Gold (XAU). In this blog post, we will delve into the intricacies of the Metals-API, exploring its capabilities, features, and how it can be leveraged to enhance trading strategies and market insights.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, serving as a hedge against inflation and economic uncertainty. As digital transformation sweeps across industries, the precious metals market is no exception. The integration of data analytics and technology in trading has revolutionized how investors approach gold trading. With the Metals-API, developers can harness real-time data to create innovative applications that provide market insights, price discovery, and digital asset solutions.
The digital transformation in precious metals trading has led to a surge in demand for accurate and timely data. By utilizing the Metals-API, developers can access a wealth of information that empowers them to make informed decisions. The API's capabilities extend beyond mere price retrieval; it offers advanced features such as historical data analysis, fluctuation tracking, and bid/ask pricing, all of which are crucial for effective trading strategies.
API Description
The Metals-API is a powerful tool designed to provide developers with real-time metals data. It enables the creation of next-generation applications that can analyze market trends, track price fluctuations, and facilitate currency conversions. The API is built on a robust infrastructure that ensures high availability and low latency, making it an ideal choice for developers looking to integrate metals data into their applications.
With the Metals-API, developers can access a variety of endpoints that cater to different needs. Whether you are interested in the latest rates, historical data, or bid/ask prices, the API provides comprehensive solutions that can be tailored to specific use cases. The potential applications of this API are vast, ranging from financial applications to e-commerce platforms that require accurate pricing for precious metals.
Key Features and Endpoints
The Metals-API offers a range of features that enhance its usability and functionality. Here are some of the key endpoints and their applications:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. This feature is essential for traders who need to stay updated on market movements.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to the API request. This functionality is invaluable for analyzing past trends and making informed predictions about future price movements.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing traders to gauge market sentiment and make timely decisions.
- Convert Endpoint: This endpoint allows users to convert any amount from one metal to another or to/from USD, facilitating seamless transactions across different currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice. This feature is particularly useful for analyzing trends over specific periods.
- Fluctuation Endpoint: Track how metals fluctuate on a day-to-day basis, providing insights into market volatility and helping traders strategize accordingly.
- Carat Endpoint: Retrieve information about gold rates by carat, which is essential for jewelers and consumers looking to purchase gold jewelry.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest prices for a specified date, aiding in market analysis and decision-making.
- Open/High/Low/Close (OHLC) Price Endpoint: Obtain OHLC data for a specific time period, which is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a comprehensive view of market trends over time.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API comes with multiple endpoints, each providing distinct functionalities tailored to various user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals supported by the API.
- Gold Price India Endpoint: Retrieve the latest gold price in India using the dedicated endpoint, which is particularly useful for local traders.
- News Endpoint: Stay informed with the latest news articles related to various metals, helping traders keep abreast of market developments.
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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding the API's response structure is crucial for effective implementation. Below are examples of various API endpoints, showcasing their responses and the significance of each field.
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1744599774,
"base": "USD",
"date": "2025-04-14",
"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 success
field indicates whether the request was successful. The timestamp
provides the time of the response, while base
indicates the base currency (USD in this case). The rates
object contains the exchange rates for various metals, with each metal symbol as a key and its corresponding rate as the value. The unit
specifies the measurement unit used.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1744513374,
"base": "USD",
"date": "2025-04-13",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response structure is similar to the latest rates endpoint, but it provides historical data for a specific date. This feature is essential for traders looking to analyze past performance and trends.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-04-07",
"end_date": "2025-04-14",
"base": "USD",
"rates": {
"2025-04-07": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-09": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-14": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint allows users to track the performance of metals over a specified period, providing valuable insights into market trends and fluctuations.
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": 1744599774,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how the conversion endpoint works. The query
object shows the parameters used for the conversion, while the result
field provides the converted amount. This feature is particularly useful for traders and consumers who need to calculate values across different metals and currencies.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-07",
"end_date": "2025-04-14",
"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 endpoint provides insights into how metals fluctuate over time, which is crucial for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1744599774,
"base": "USD",
"date": "2025-04-14",
"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"
}
OHLC data is vital for technical analysis, allowing traders to assess market conditions and make informed decisions based on historical performance.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1744599774,
"base": "USD",
"date": "2025-04-14",
"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"
}
The bid/ask endpoint provides crucial information for traders, allowing them to understand market dynamics and make timely trading decisions.
Conclusion
The Metals-API is a transformative tool for developers and traders in the precious metals market. By providing real-time data, historical insights, and advanced features, it empowers users to make informed decisions and optimize their trading strategies. Whether you are interested in the latest gold prices, historical trends, or bid/ask pricing, the Metals-API offers a comprehensive solution tailored to your needs.
As the market continues to evolve, leveraging the capabilities of the Metals-API will be essential for staying ahead of the curve. For more information on how to implement this powerful API, refer to the Metals-API Documentation and explore the extensive features available. Additionally, keep up with the latest developments in the metals market by visiting the Metals-API Website and checking the Metals-API Supported Symbols page for a complete list of available metals.