How to Get Omani Rial (OMR) Historical Prices using this API
How to Get Omani Rial (OMR) Historical Prices using this API
In the world of finance and trading, having access to accurate and timely data is crucial. For those interested in the Omani Rial (OMR) and its historical prices, the Metals-API offers a powerful solution. This API provides developers with the tools to access real-time and historical data for various metals and currencies, including the Omani Rial. In this blog post, we will explore how to leverage the Metals-API to obtain historical prices, focusing on its capabilities, features, and practical applications.
Metals-API Information
The Metals-API is a comprehensive data service that provides real-time and historical exchange rates for various metals and currencies. It is designed to empower developers to build next-generation applications that require accurate financial data. The API supports a wide range of functionalities, making it an invaluable resource for anyone looking to integrate metal price data into their applications.
About Nickel (NI)
Nickel (NI) is one of the many metals tracked by the Metals-API. As industries evolve, the demand for metals like nickel continues to grow, driven by technological advancements and digital transformation in metal markets. The integration of smart technology and data analytics has revolutionized how traders and investors access and interpret market data.
With the rise of data analytics, stakeholders can gain insights into market trends, price fluctuations, and historical performance. This information is critical for making informed decisions in trading and investment. The Metals-API plays a pivotal role in this transformation by providing developers with the tools they need to access and analyze metal prices effectively.
API Description
The Metals-API is a robust platform that offers a variety of endpoints to cater to different data needs. It allows users to access real-time and historical data, making it an essential tool for financial applications. The API's capabilities include retrieving the latest rates, historical rates, bid and ask prices, and more. By utilizing this API, developers can create applications that provide users with up-to-date information on metal prices and currency conversions.
For more detailed information on how to use the API, you can refer to the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that provide different functionalities. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently, depending on your subscription plan. It allows developers to access the most current prices for metals and currencies.
- 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 analysis and reporting.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for metals, providing insights into market dynamics and helping traders make informed decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one currency to another. This feature is particularly useful for traders who need to quickly assess the value of metals in different currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it easy 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.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which is essential for jewelers and investors in the gold market.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API to get the lowest and highest price for a specific date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for a specific time period, which is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing users to analyze long-term trends in the metals market.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate and authorize access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Available Endpoints: The API features 14 different endpoints, each designed to provide specific functionalities related to metals and currencies.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, 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, refer to the Metals-API Supported Symbols.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. Below are examples of various endpoints and their responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1772238011,
"base": "USD",
"date": "2026-02-28",
"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": 1772151611,
"base": "USD",
"date": "2026-02-27",
"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-02-21",
"end_date": "2026-02-28",
"base": "USD",
"rates": {
"2026-02-21": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-02-23": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-28": {
"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": 1772238011,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-21",
"end_date": "2026-02-28",
"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": 1772238011,
"base": "USD",
"date": "2026-02-28",
"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": 1772238011,
"base": "USD",
"date": "2026-02-28",
"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
In conclusion, the Metals-API provides a powerful and flexible solution for accessing historical prices of the Omani Rial (OMR) and various metals. With its extensive range of endpoints and capabilities, developers can create applications that deliver real-time and historical data to users. Whether you are looking to analyze market trends, track price fluctuations, or convert currencies, the Metals-API has the tools you need.
For more information on how to get started with the Metals-API, visit the Metals-API Website. By leveraging this API, you can unlock the potential of real-time metals data and enhance your applications with valuable financial insights.