Retrieve United States Dollar (USD) Historical Prices using this API
Retrieve United States Dollar (USD) Historical Prices using this API
In today's fast-paced financial landscape, the ability to access and analyze historical prices of metals like Nickel (NI) is crucial for developers and analysts alike. The Metals-API offers a robust solution for retrieving historical prices, enabling users to harness the power of real-time data for informed decision-making. This blog post will delve into the intricacies of the Metals-API, focusing on how to effectively retrieve historical prices for Nickel and other metals, while also exploring the broader implications of digital transformation in the metal markets.
About Nickel (NI)
Nickel is a versatile metal that plays a significant role in various industries, particularly in the production of stainless steel and batteries. As the world shifts towards more sustainable energy solutions, the demand for Nickel is expected to rise, driven by its use in electric vehicle batteries and renewable energy technologies. This shift highlights the importance of technological innovation and advancement in the metal markets, where data analytics and insights are becoming increasingly vital.
The integration of smart technology into the metal markets is transforming how stakeholders interact with data. With the rise of data analytics, companies can now leverage historical price data to forecast trends, optimize supply chains, and make strategic investment decisions. The Metals-API empowers developers to build next-generation applications that can analyze historical price data, providing insights that were previously difficult to obtain.
API Description
The Metals-API is a powerful tool designed to provide real-time and historical data on various metals, including Nickel. This API allows developers to access a wealth of information, enabling them to create applications that can analyze market trends, perform currency conversions, and track price fluctuations. The API's capabilities are underpinned by a commitment to innovation and technological advancement, making it an essential resource for anyone involved in the metal markets.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated frequently based on the user's subscription plan. This ensures that developers have access to the most current information, allowing for timely decision-making. Additionally, the API provides historical rates dating back to 2019, enabling users to analyze trends over time.
For more detailed information about the API's capabilities, you can refer to the Metals-API Documentation, which outlines the various endpoints and their functionalities.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, each designed to provide specific functionalities. Here are some of the key features:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on the subscription plan. This feature is essential for developers looking to integrate live data into their applications.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve historical price data for Nickel and other metals, facilitating in-depth analysis.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market conditions and helping traders make informed decisions.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one currency to another seamlessly. This is particularly useful for businesses operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing valuable insights into market volatility and helping traders strategize accordingly.
- Carat Endpoint: This feature enables users to retrieve information about gold rates by carat, which is particularly useful for jewelers and investors in the gold market.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest prices for a specified date, allowing for comprehensive market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, essential for traders looking to analyze market performance.
- Historical LME Endpoint: This endpoint grants access to historical rates for LME symbols dating back to 2008, providing a wealth of data for analysts.
- API Key: Each user is assigned a unique API key, which is required to access the API's functionalities. This ensures secure and authorized access to the data.
- API Response: The exchange rates delivered by the Metals-API are relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API features 14 different endpoints, each providing unique functionalities tailored to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, keeping them informed about market developments.
For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of various API endpoints and their corresponding responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1771978757,
"base": "USD",
"date": "2026-02-25",
"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"
}
The response indicates a successful request, providing the latest exchange rates for various metals relative to USD. Each rate is expressed in terms of troy ounces, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1771892357,
"base": "USD",
"date": "2026-02-24",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This endpoint allows users to access historical exchange rates for a specific date. The response includes the rates for various metals, enabling users to analyze price movements over time.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2026-02-18",
"end_date": "2026-02-25",
"base": "USD",
"rates": {
"2026-02-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-02-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-25": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series endpoint provides a comprehensive view of exchange rates over a specified period, allowing users to track trends and fluctuations in the market.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1771978757,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This endpoint allows users to convert a specified amount from one currency to another. In this case, it converts 1000 USD to its equivalent in gold (XAU), providing a clear and concise result.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-18",
"end_date": "2026-02-25",
"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 the fluctuations of metal prices over a specified period, providing valuable insights into market volatility and helping traders make informed decisions.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1771978757,
"base": "USD",
"date": "2026-02-25",
"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"
}
The OHLC endpoint provides essential data for traders, allowing them to analyze market performance over a specific period. This information is crucial for making informed trading decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1771978757,
"base": "USD",
"date": "2026-02-25",
"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 metals, offering insights into market conditions and helping traders make informed decisions.
Conclusion
The Metals-API is a powerful tool that provides developers with the ability to access real-time and historical data on metals like Nickel. By leveraging the API's various endpoints, users can gain valuable insights into market trends, perform currency conversions, and track price fluctuations. The integration of smart technology and data analytics into the metal markets is transforming how stakeholders interact with data, paving the way for more informed decision-making.
As the demand for metals continues to rise, particularly in the context of sustainable energy solutions, the importance of having access to accurate and timely data cannot be overstated. The Metals-API empowers developers to build next-generation applications that can analyze historical price data, providing insights that were previously difficult to obtain.
For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the Metals-API Documentation for comprehensive guidance on utilizing the API's features. Additionally, check out the Metals-API Supported Symbols page for a complete list of available metal symbols.