Utilize this API to Get Peruvian Sol (PEN) Historical Prices
Introduction
In today's fast-paced financial landscape, the ability to access real-time and historical data is crucial for developers and businesses alike. The Metals-API provides a robust solution for obtaining historical prices of the Peruvian Sol (PEN) and other metals. This blog post will delve into the capabilities of the Metals-API, focusing on how developers can utilize it to retrieve historical prices and leverage the data for various applications. We will explore the API's features, endpoints, and practical use cases, ensuring that you have a comprehensive understanding of how to integrate this powerful tool into your projects.
About Peruvian Sol (PEN)
The Peruvian Sol (PEN) is the official currency of Peru, a country rich in mineral resources and metals. As the global market for metals continues to evolve, the importance of accurate and timely data cannot be overstated. The digital transformation in metal markets is paving the way for technological innovations that enhance data analytics and insights. By integrating smart technology, businesses can harness the power of real-time data to make informed decisions.
With the Metals-API, developers can access a wealth of information about the Peruvian Sol and its historical prices. This API empowers users to build next-generation applications that can analyze trends, forecast prices, and optimize trading strategies. As we explore the API's capabilities, we will highlight the transformative potential of real-time metals data and how it can shape the future of financial applications.
API Description
The Metals-API is a powerful JSON API that provides access to real-time and historical metals prices, including the Peruvian Sol. It is designed for developers who require accurate and timely data for their applications. The API offers a variety of endpoints that allow users to retrieve the latest rates, historical prices, and other essential information related to metals and currencies.
One of the standout features of the Metals-API is its ability to deliver real-time data, which is crucial for applications that require up-to-the-minute information. The API supports a wide range of currencies and metals, making it a versatile tool for developers working in various financial sectors. By utilizing the Metals-API, developers can create applications that analyze market trends, track price fluctuations, and provide insights into the performance of the Peruvian Sol against other currencies.
Key Features and Endpoints
The Metals-API offers a comprehensive suite of features that cater to the needs of developers looking to integrate metals data into their applications. Below, we will explore some of the key endpoints and their functionalities.
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for various metals, including the Peruvian Sol. Depending on your subscription plan, the API can return data updated every 60 minutes or every 10 minutes. This endpoint is essential for applications that require the most current pricing information.
{
"success": true,
"timestamp": 1781223228,
"base": "USD",
"date": "2026-06-12",
"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
The Historical Rates Endpoint allows users to access historical exchange rates for most currencies dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the Metals-API for historical rates, making it an invaluable resource for trend analysis and forecasting.
{
"success": true,
"timestamp": 1781136828,
"base": "USD",
"date": "2026-06-11",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables users to retrieve real-time bid and ask prices for metals. This information is crucial for traders and financial analysts who need to understand the market dynamics and make informed decisions.
{
"success": true,
"timestamp": 1781223228,
"base": "USD",
"date": "2026-06-12",
"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"
}
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one currency to another. This feature is particularly useful for applications that require currency conversion for transactions or reporting purposes.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1781223228,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows users to query the API for daily historical rates between two dates of their choice. This feature is essential for analyzing trends over specific periods and understanding market movements.
{
"success": true,
"timeseries": true,
"start_date": "2026-06-05",
"end_date": "2026-06-12",
"base": "USD",
"rates": {
"2026-06-05": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-07": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-12": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how currencies fluctuate on a day-to-day basis. This endpoint is useful for tracking volatility and understanding market trends.
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-05",
"end_date": "2026-06-12",
"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"
}
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows users to retrieve open, high, low, and close prices for a specific time period. This data is vital for traders who analyze price movements and make trading decisions based on historical performance.
{
"success": true,
"timestamp": 1781223228,
"base": "USD",
"date": "2026-06-12",
"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"
}
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for users interested in the London Metal Exchange prices.
{
"success": true,
"timestamp": 1781136828,
"base": "USD",
"date": "2026-06-11",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
API Key and Response
Your API Key is essential for accessing the Metals-API. It is passed into the API base URL's access_key parameter to authenticate your requests. The API delivers exchange rates relative to USD by default, ensuring consistency across all data returned.
All data is returned in a structured JSON format, making it easy for developers to parse and utilize in their applications. Understanding the structure of the API response is crucial for effective integration.
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 who need to know which metals and currencies are available for querying.
Practical Use Cases and Integration Strategies
Integrating the Metals-API into your applications opens up a world of possibilities. Here are some practical use cases:
- Financial Applications: Developers can create applications that track the performance of the Peruvian Sol against other currencies, providing users with insights into market trends.
- Trading Platforms: By utilizing the real-time data from the Latest Rates Endpoint, trading platforms can offer users up-to-date pricing information, enhancing their trading experience.
- Market Analysis Tools: Analysts can leverage the Historical Rates and Time-Series Endpoints to conduct in-depth market analysis, helping businesses make informed decisions based on historical data.
- Currency Conversion Services: The Convert Endpoint can be integrated into applications that require currency conversion, allowing users to easily convert between the Peruvian Sol and other currencies.
Conclusion
The Metals-API is a powerful tool for developers looking to access real-time and historical data on metals and currencies, including the Peruvian Sol. By leveraging the various endpoints, developers can create applications that provide valuable insights into market trends, track price fluctuations, and optimize trading strategies. With features like the Latest Rates, Historical Rates, and Bid and Ask endpoints, the API offers a comprehensive solution for accessing essential financial data.
As the digital transformation in metal markets continues to evolve, the importance of accurate and timely data will only grow. By integrating the Metals-API into your applications, you can stay ahead of the curve and provide users with the information they need to make informed decisions. For more information on how to get started, visit the Metals-API Documentation and explore the capabilities of this powerful API.