Query Kochi Silver (XAG-KOCH) Historical Prices using this API

Query Kochi Silver (XAG-KOCH) Historical Prices using this API
Metals-API. This blog post will delve into the various aspects of silver, its industrial applications, and how developers can leverage the Metals-API to query historical prices effectively.
About Silver (XAG)
API Description
Metals-API is a powerful tool that provides real-time and historical data for various metals, including silver. With its innovative approach to data delivery, the API empowers developers to create applications that can analyze market trends, track price fluctuations, and make informed decisions based on accurate data.
Key Features and Endpoints
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for silver and other metals. Depending on your subscription plan, the API updates this data every 60 minutes or even more frequently. This is crucial for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Developers can access historical rates for silver dating back to 2019. By appending a specific date to the API request, users can retrieve past prices, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for silver. Understanding the spread between these prices can help traders make informed decisions.
- Convert Endpoint: The API includes a currency conversion feature, enabling users to convert amounts between different metals or to/from USD. This is particularly useful for applications that deal with multiple currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two specified dates. This is ideal for analyzing price movements over time and identifying trends.
- Fluctuation Endpoint: This endpoint provides information on how silver prices fluctuate on a day-to-day basis. By tracking these fluctuations, developers can build applications that alert users to significant price changes.
- Carat Endpoint: For those interested in gold, the carat endpoint allows users to retrieve gold rates by carat, providing additional granularity in pricing.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices of silver over a specified period, which can be crucial for investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for silver, giving traders a comprehensive view of market performance.
- Historical LME Endpoint: For those interested in London Metal Exchange (LME) data, this endpoint provides historical rates dating back to 2008, allowing for extensive market analysis.
- API Key: Accessing the Metals-API requires an API key, which is passed in the request URL. This key ensures that only authorized users can access the data.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a comprehensive list of endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available metal symbols, ensuring users have access to the latest data.
- Gold Price India Endpoint: For users interested in gold prices specifically in India, this dedicated endpoint provides the latest rates.
- News Endpoint: The API also offers a news endpoint that retrieves the latest articles related to various metals, keeping users informed about market trends.
API Endpoint Examples and Responses
Latest Rates Endpoint
{
"success": true,
"timestamp": 1751086815,
"base": "USD",
"date": "2025-06-28",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
{
"success": true,
"timestamp": 1751000415,
"base": "USD",
"date": "2025-06-27",
"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-06-21",
"end_date": "2025-06-28",
"base": "USD",
"rates": {
"2025-06-21": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-23": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-28": {
"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": 1751086815,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-21",
"end_date": "2025-06-28",
"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) Price Endpoint
{
"success": true,
"timestamp": 1751086815,
"base": "USD",
"date": "2025-06-28",
"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": 1751086815,
"base": "USD",
"date": "2025-06-28",
"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 and explore the Metals-API Supported Symbols for a complete list of available metals. With the right tools and data at your fingertips, you can harness the power of silver pricing to drive your applications forward.