How to get Internet Computer (ICP) prices with a simple API call
Introduction
In the rapidly evolving world of digital finance, obtaining accurate and real-time data is crucial for developers and businesses alike. One such resource is the Internet Computer (ICP), which has gained significant traction in the blockchain space. To effectively track ICP prices and other related metrics, utilizing a robust API is essential. In this post, we will explore how to get Internet Computer (ICP) prices using the Metals-API, a powerful tool that provides real-time data on various metals and their market dynamics.
Understanding the Metals-API
The Metals-API is designed to facilitate seamless access to real-time and historical data on metal prices, making it an invaluable resource for developers looking to integrate financial data into their applications. With its innovative architecture, the API empowers users to build next-generation applications that can analyze market trends, perform currency conversions, and track price fluctuations with ease.
About Tellurium (TE)
When discussing Tellurium, it is essential to consider the broader context of digital transformation in metal markets. The integration of smart technologies and data analytics has revolutionized how businesses operate, allowing for more informed decision-making. The Metals-API exemplifies this transformation by providing developers with the tools necessary to harness data insights effectively.
Technological advancements in the field of metals trading have opened up new avenues for innovation. By leveraging the capabilities of the Metals-API, developers can create applications that not only track current prices but also analyze historical trends, providing a comprehensive view of the market landscape. This integration of smart technology into metal markets is paving the way for future trends and possibilities that will shape the industry.
API Capabilities
The Metals-API offers a wide array of features that cater to various needs, from real-time price tracking to historical data analysis. Here are some of the key functionalities:
Latest Rates Endpoint
The Latest Rates Endpoint provides real-time exchange rate data for metals, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes, every 10 minutes, or even more frequently. This endpoint is crucial for applications that require up-to-the-minute pricing information.
{
"success": true,
"timestamp": 1777162318,
"base": "USD",
"date": "2026-04-26",
"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
Accessing historical rates is vital for trend analysis and forecasting. The Historical Rates Endpoint allows users to query data dating back to 2019 by appending a specific date in the YYYY-MM-DD format. This feature is particularly useful for developers looking to analyze past market behavior and make informed predictions.
{
"success": true,
"timestamp": 1777075918,
"base": "USD",
"date": "2026-04-25",
"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 various metals. This information is essential for traders who need to make quick decisions based on market conditions.
{
"success": true,
"timestamp": 1777162318,
"base": "USD",
"date": "2026-04-26",
"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 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": 1777162318,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Time-Series Endpoint
The Time-Series Endpoint allows developers to query the API for daily historical rates between two dates of their choice. This feature is invaluable for analyzing trends over specific periods and understanding market dynamics.
{
"success": true,
"timeseries": true,
"start_date": "2026-04-19",
"end_date": "2026-04-26",
"base": "USD",
"rates": {
"2026-04-19": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-21": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-26": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Endpoint
The Fluctuation Endpoint provides insights into how currencies fluctuate on a day-to-day basis. By tracking rate changes between two dates, developers can gain a deeper understanding of market volatility.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-19",
"end_date": "2026-04-26",
"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 essential for traders who analyze price movements and make trading decisions based on market trends.
{
"success": true,
"timestamp": 1777162318,
"base": "USD",
"date": "2026-04-26",
"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 looking to analyze long-term trends in metal prices.
API Key and Authentication
To access the Metals-API, users 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.
Performance and Security Considerations
When integrating the Metals-API into applications, developers should consider performance optimization strategies, such as caching frequently accessed data and implementing rate limiting to avoid exceeding usage quotas. Additionally, security best practices, such as data validation and sanitization, should be employed to protect against potential vulnerabilities.
Conclusion
The Metals-API is a powerful tool for developers seeking to access real-time and historical data on metal prices, including Internet Computer (ICP) prices. By leveraging its various endpoints, developers can create applications that provide valuable insights into market trends and fluctuations. With features like the Latest Rates Endpoint, Historical Rates Endpoint, and Bid and Ask Endpoint, the API offers a comprehensive suite of functionalities that can enhance any financial application.
For more information on how to utilize the Metals-API, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a complete list of available metal symbols. By integrating this API into your projects, you can stay ahead in the competitive landscape of digital finance.