Get Internet Computer (ICP) Historical Prices using this API
Introduction
The Internet Computer (ICP) is a revolutionary blockchain platform that aims to extend the functionality of the internet by enabling developers to build and deploy applications directly on the web. One of the critical aspects of developing applications on ICP is the ability to access and analyze historical price data for various assets, including metals. This is where the Metals-API comes into play. By leveraging this powerful API, developers can obtain real-time and historical prices for metals, which can be crucial for applications in finance, trading, and market analysis.
Understanding Metals-API
The Metals-API is a robust tool designed to provide developers with access to real-time and historical data for various metals. It empowers users to integrate metal price data into their applications seamlessly. The API supports a wide range of functionalities, including retrieving the latest rates, historical prices, and even performing conversions between different metal currencies. This flexibility makes it an essential resource for developers looking to create innovative applications that require accurate and timely metal pricing information.
About Tellurium (TE)
When discussing metals, it is essential to consider the broader context of digital transformation in metal markets. The integration of technology into these markets has led to significant advancements in data analytics and insights. Developers can now utilize smart technology to gather and analyze metal pricing data, leading to more informed decision-making processes. The future of metal markets is likely to be shaped by these technological innovations, paving the way for new trends and possibilities.
API Description
The Metals-API offers a comprehensive suite of features that enable developers to access a wealth of information about metal prices. With its user-friendly interface and extensive documentation, developers can quickly get started with integrating the API into their applications. The API provides real-time data, historical prices, and various endpoints that cater to different needs, making it a versatile tool for any developer working in the financial sector.
Key Features and Endpoints
The Metals-API boasts several key features that enhance its usability and functionality. Here are some of the most notable endpoints:
Latest Rates Endpoint
The Latest Rates Endpoint allows developers to retrieve real-time exchange rate data for metals. Depending on the subscription plan, the API can return updates every 60 minutes, every 10 minutes, or even more frequently. This feature is particularly useful for applications that require up-to-the-minute pricing information.
{
"success": true,
"timestamp": 1775434571,
"base": "USD",
"date": "2026-04-06",
"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
For developers needing historical data, the Historical Rates Endpoint provides access to exchange rates dating back to 2019. By appending a specific date to the API request, developers can obtain historical pricing data, which is invaluable for trend analysis and forecasting.
{
"success": true,
"timestamp": 1775348171,
"base": "USD",
"date": "2026-04-05",
"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 allows developers to retrieve real-time bid and ask prices for metals. This information is crucial for traders and investors who need to make informed decisions based on current market conditions.
{
"success": true,
"timestamp": 1775434571,
"base": "USD",
"date": "2026-04-06",
"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 developers to convert any amount from one metal to another or to/from USD. This feature is particularly useful for applications that require currency conversion capabilities.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1775434571,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint enables developers to query the API for daily historical rates between two dates of their choice. This feature is essential for analyzing price trends over specific periods.
{
"success": true,
"timeseries": true,
"start_date": "2026-03-30",
"end_date": "2026-04-06",
"base": "USD",
"rates": {
"2026-03-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-01": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-06": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides information about how metal prices fluctuate on a day-to-day basis. This feature is beneficial for understanding market volatility and making informed trading decisions.
{
"success": true,
"fluctuation": true,
"start_date": "2026-03-30",
"end_date": "2026-04-06",
"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 developers to query the API for the open, high, low, and close prices for a specific time period. This data is essential for technical analysis and understanding market trends.
{
"success": true,
"timestamp": 1775434571,
"base": "USD",
"date": "2026-04-06",
"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 developers working with London Metal Exchange data.
API Key and Authentication
To access the Metals-API, developers must obtain an API key, which is passed into the API base URL's access_key parameter. This key is essential for authentication and ensures that only authorized users can access the data.
API Response Structure
The API responses are structured in a way that makes it easy for developers to parse and utilize the data. By default, exchange rates are relative to USD, and all data is returned in a consistent format, allowing for straightforward integration into applications.
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 understand the available options and how to implement them in their applications.
Conclusion
In conclusion, the Metals-API is an essential tool for developers working with metal pricing data, especially in the context of the Internet Computer (ICP). With its extensive features, including real-time rates, historical data, and various endpoints for different functionalities, the API empowers developers to create innovative applications that leverage accurate and timely metal pricing information. By understanding how to utilize the API effectively, developers can enhance their applications and provide valuable insights into the metal markets. For more information, be sure to check out the Metals-API Documentation to explore all the capabilities and features available to you.