Get Silver (XAG) - Per Ounce Historical Prices using this API

Get Silver (XAG) - Per Ounce Historical Prices using this API
Silver, represented by the symbol XAG, is not only a precious metal but also a vital component in various industrial applications. As technology advances, the demand for silver continues to grow, driven by its unique properties that make it indispensable in sectors such as electronics, solar energy, and medical devices. For developers and businesses looking to harness the power of silver pricing data, the Metals-API offers a robust solution to access historical prices and real-time data efficiently.
About Silver (XAG)
Silver has been used for centuries, not just as a form of currency but also for its industrial applications. Its high conductivity makes it a preferred choice in electronics, where it is used in circuit boards and connectors. Additionally, silver plays a crucial role in the manufacturing of solar panels, where it is used to create conductive paths for electricity. The integration of smart manufacturing technologies has further enhanced the efficiency of silver usage, allowing for better resource management and reduced waste.
In the digital market, silver's price is influenced by various factors, including supply chain dynamics and geopolitical events. The ability to analyze these fluctuations in real-time is essential for investors and businesses alike. With the Metals-API, developers can access comprehensive data on silver prices, enabling them to create applications that provide insights into market trends and historical performance.
API Description
The Metals-API is a powerful tool that provides developers with access to real-time and historical pricing data for various metals, including silver. This API is designed to empower developers to build next-generation applications that require accurate and timely metals data. With its innovative features and capabilities, the Metals-API transforms how businesses and developers interact with metals pricing information.
For more information, visit the Metals-API Website or check out the Metals-API Documentation for detailed guidance on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, allowing developers to retrieve the data they require efficiently. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for silver and other metals, updated every 60 minutes, 10 minutes, or according to your subscription plan. This feature is crucial for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Access historical rates for silver dating back to 2019. By appending a specific date to the API request, developers can retrieve past pricing data, which is essential for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for silver, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for applications that require multi-metal pricing capabilities.
- Time-Series Endpoint: Developers can query the API for daily historical rates between two specified dates. This endpoint is ideal for analyzing price movements over time.
- Fluctuation Endpoint: This endpoint tracks how silver prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which can be useful for applications focused on jewelry and precious metal trading.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest prices for silver over a specified period, aiding in investment decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Developers can access open, high, low, and close prices for silver, which are critical 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.
- API Key: Each user is provided with a unique API key that must be included in API requests to authenticate access.
- API Response: The API returns exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API provides a constantly updated list of all available currencies and metals, ensuring developers have access to the latest data.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping users informed about market developments.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various API endpoints and their responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1751706099,
"base": "USD",
"date": "2025-07-05",
"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"
}
This response indicates that the latest price for silver (XAG) is 0.03815 per troy ounce, providing a snapshot of the current market conditions.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1751619699,
"base": "USD",
"date": "2025-07-04",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to retrieve historical rates for silver on a specific date, allowing developers to analyze past performance.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-06-28",
"end_date": "2025-07-05",
"base": "USD",
"rates": {
"2025-06-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-30": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-07-05": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides daily rates for silver over a specified period, enabling developers to visualize trends and patterns.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1751706099,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response illustrates how to convert an amount from USD to silver, providing the equivalent in troy ounces.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-28",
"end_date": "2025-07-05",
"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 tracks fluctuations in silver prices over a specified period, providing insights into market volatility.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1751706099,
"base": "USD",
"date": "2025-07-05",
"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 open, high, low, and close prices for silver, which are essential for traders and analysts.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1751706099,
"base": "USD",
"date": "2025-07-05",
"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 endpoint provides current bid and ask prices for silver, which is crucial for understanding market dynamics.
Conclusion
In conclusion, the Metals-API offers a comprehensive solution for accessing silver (XAG) historical prices and real-time data. With its wide range of endpoints, developers can build innovative applications that leverage accurate metals pricing information. Whether you are analyzing market trends, converting currencies, or tracking fluctuations, the Metals-API provides the tools necessary for effective decision-making.
For further exploration of the API's capabilities, refer to the Metals-API Documentation and check the Metals-API Supported Symbols for a complete list of available metals. By integrating this powerful API into your applications, you can stay ahead in the dynamic world of metals trading.