Get United States Dollar (USD) prices using this API
Get United States Dollar (USD) Prices Using This API
In today's fast-paced financial landscape, accessing real-time data is crucial for developers and businesses alike. The Metals-API offers a powerful solution for obtaining current prices of various metals, including the United States Dollar (USD) prices. This blog post will delve into the intricacies of the Metals-API, focusing on its capabilities, particularly in relation to Nickel (NI), and how it can transform the way developers interact with metal markets.
About Nickel (NI)
Nickel, represented by the symbol NI, is a vital metal in various industries, particularly in the production of stainless steel and batteries. As the world moves towards digital transformation, the metal markets are experiencing significant changes driven by technological innovation and advancement. The integration of smart technology and data analytics is reshaping how traders and developers approach metal pricing and trading.
Data analytics plays a pivotal role in understanding market trends and making informed decisions. With the rise of big data, developers can leverage insights from historical and real-time data to predict future price movements. The Metals-API provides access to a wealth of information, enabling developers to create applications that can analyze market trends and provide actionable insights.
As we look towards the future, the possibilities for Nickel and other metals are vast. The integration of advanced technologies such as machine learning and artificial intelligence can enhance predictive analytics, allowing for more accurate forecasting of metal prices. The Metals-API stands at the forefront of this transformation, empowering developers to build next-generation applications that can adapt to the evolving market landscape.
API Description
The Metals-API is a comprehensive solution for accessing real-time and historical metal prices. It offers a wide range of functionalities that cater to the needs of developers looking to integrate metal pricing data into their applications. With a focus on innovation and technological advancement, the Metals-API enables users to harness the power of real-time data to make informed decisions.
One of the standout features of the Metals-API is its ability to provide real-time exchange rate data. Depending on your subscription plan, the API can return the latest rates updated every 60 minutes, every 10 minutes, or even more frequently. This level of detail is essential for developers who require up-to-the-minute information to power their applications.
For those interested in historical data, the Metals-API offers access to rates dating back to 2019. This feature allows developers to query historical rates by appending a specific date, enabling them to analyze trends over time. The ability to access both real-time and historical data makes the Metals-API a versatile tool for any developer working in the financial sector.
Additionally, the API includes a Bid and Ask endpoint, which provides real-time bid and ask prices for metals. This feature is particularly useful for traders looking to make quick decisions based on current market conditions. The Convert endpoint allows users to convert any amount from one currency to another, making it easy to work with different metal prices.
For developers interested in tracking fluctuations, the Metals-API offers a fluctuation endpoint that provides information about how currencies fluctuate on a day-to-day basis. This feature is invaluable for understanding market volatility and making informed trading decisions.
To explore the full capabilities of the Metals-API, developers can refer to the Metals-API Documentation, which provides detailed information on all available endpoints and their functionalities.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to provide specific functionalities that cater to the needs of developers. Here are some of the key features:
- Latest Rates Endpoint: This endpoint returns real-time exchange rate data for various metals, updated based on your subscription plan. For instance, if you have a premium plan, you might receive updates every 10 minutes, ensuring you have the most current information available.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve past rates, allowing for in-depth market analysis.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, enabling traders to make informed decisions based on current market conditions.
- Convert Endpoint: This endpoint allows you to convert any amount from one currency to another, making it easy to work with different metal prices and currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into price trends over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, giving you a clear picture of market volatility.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which is essential for jewelers and traders dealing in precious metals.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specific date, helping you identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Get the open, high, low, and close prices for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a wealth of data for analysis.
- API Key: Your unique API key is essential for accessing the API's functionalities. It must be included in your requests to authenticate your access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in your data.
- Available Endpoints: The API includes 14 endpoints, each offering different functionalities to cater to various needs.
- Supported Symbols Endpoint: Access a constantly updated endpoint that returns all available currencies, ensuring you have the latest information.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping you 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 JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1769299881,
"base": "USD",
"date": "2026-01-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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1769213481,
"base": "USD",
"date": "2026-01-24",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2026-01-18",
"end_date": "2026-01-25",
"base": "USD",
"rates": {
"2026-01-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-25": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD.
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1769299881,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-18",
"end_date": "2026-01-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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1769299881,
"base": "USD",
"date": "2026-01-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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1769299881,
"base": "USD",
"date": "2026-01-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"
}
Conclusion
The Metals-API is a powerful tool for developers looking to access real-time and historical metal prices, including USD prices. With its extensive range of endpoints and capabilities, the API empowers developers to create innovative applications that can analyze market trends and provide actionable insights. As the metal markets continue to evolve, leveraging the capabilities of the Metals-API will be essential for staying ahead in this dynamic landscape.
For more information on how to get started with the Metals-API, visit the Metals-API Website and explore the comprehensive Metals-API Documentation for detailed guidance on implementation and usage. Don't forget to check the Metals-API Supported Symbols page for a complete list of available metal symbols.