Access Real-Time & Historical Moroccan Dirham Value Rates Using Indices-API
Access Real-Time & Historical Moroccan Dirham Value Rates Using Indices-API
The Moroccan Dirham (MAD) is a vital currency in North Africa, and accessing its real-time and historical value rates is crucial for developers and businesses engaged in financial transactions, trading, or economic analysis. With the Indices-API, developers can seamlessly integrate comprehensive currency data into their applications. This blog post will guide you through the process of accessing both real-time and historical rates for the Moroccan Dirham using the Indices-API, providing step-by-step instructions, example endpoints, and sample API calls.
About Moroccan Dirham (MAD)
The Moroccan Dirham is the official currency of Morocco, denoted by the symbol MAD. It is subdivided into 100 centimes and is widely used in both domestic and international transactions. Understanding the value of the Dirham in relation to other currencies is essential for various applications, including e-commerce, travel, and investment analysis. The Indices-API provides a powerful platform for accessing real-time and historical exchange rates, enabling developers to create innovative applications that leverage this data.
API Description
The Indices-API is a robust tool designed to provide developers with real-time and historical financial data. It empowers users to build next-generation applications by offering a wide range of endpoints that deliver accurate and timely information. With the ability to access exchange rates, historical data, and currency conversion, the Indices-API stands out as a transformative solution for financial data integration.
For more information, visit the Indices-API Documentation, which provides detailed insights into the API's capabilities and usage.
Key Features and Endpoints
The Indices-API offers several key features that enhance its usability for developers:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various currencies, including the Moroccan Dirham. Depending on your subscription plan, the API updates this data every 60 minutes or every 10 minutes, ensuring you have the most current information.
- Historical Rates Endpoint: Access historical rates for the Moroccan Dirham dating back to 1999. By appending a specific date to your API call, you can retrieve the exchange rate for that day, allowing for in-depth analysis of currency trends over time.
- Convert Endpoint: This endpoint allows you to convert any amount from one currency to another, including conversions to and from USD. This feature is particularly useful for applications that require real-time currency conversion.
- Time-Series Endpoint: The time-series endpoint enables you to query daily historical rates between two specified dates. This is beneficial for analyzing trends and fluctuations in currency values over time.
- Fluctuation Endpoint: Track how the Moroccan Dirham fluctuates against other currencies on a day-to-day basis. This endpoint provides insights into market volatility and can help inform trading decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Retrieve OHLC data for the Moroccan Dirham over a specified time period, which is essential for technical analysis and trading strategies.
- API Key: Your API Key is a unique identifier that must be included in your API requests to authenticate your access to the Indices-API.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format for easy integration into applications.
- Supported Symbols Endpoint: This endpoint provides a constantly updated list of all available currencies, including the Moroccan Dirham, ensuring you have access to the latest currency symbols.
List of Symbols
The Indices-API provides access to a diverse range of index symbols. For a complete list of all supported symbols and their specifications, refer to the Indices-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
To get real-time exchange rates for the Moroccan Dirham, you can use the latest rates endpoint. Here’s an example of a successful response:
{
"success": true,
"timestamp": 1772067187,
"base": "USD",
"date": "2026-02-26",
"rates": {
"MAD": 9.50,
"DOW": 0.00029,
"NASDAQ": 0.00039,
"S&P 500": 0.00024
},
"unit": "per index"
}
Historical Rates Endpoint
Access historical exchange rates for the Moroccan Dirham by specifying a date. Here’s an example response:
{
"success": true,
"timestamp": 1771980787,
"base": "USD",
"date": "2026-02-25",
"rates": {
"MAD": 9.45,
"DOW": 0.00028,
"NASDAQ": 0.00038,
"S&P 500": 0.00023
},
"unit": "per index"
}
Time-series Endpoint
To analyze trends over time, you can use the time-series endpoint. Here’s an example response for a specific date range:
{
"success": true,
"timeseries": true,
"start_date": "2026-02-19",
"end_date": "2026-02-26",
"base": "USD",
"rates": {
"2026-02-19": {
"MAD": 9.40,
"DOW": 0.00028
},
"2026-02-21": {
"MAD": 9.42,
"DOW": 0.00029
},
"2026-02-26": {
"MAD": 9.50,
"DOW": 0.00029
}
},
"unit": "per index"
}
Convert Endpoint
To convert amounts between currencies, use the convert endpoint. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "MAD",
"amount": 1000
},
"info": {
"timestamp": 1772067187,
"rate": 9.50
},
"result": 9500,
"unit": "per index"
}
Fluctuation Endpoint
Track fluctuations in the Moroccan Dirham's value over a specified period with the fluctuation endpoint. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-19",
"end_date": "2026-02-26",
"base": "USD",
"rates": {
"MAD": {
"start_rate": 9.40,
"end_rate": 9.50,
"change": 0.10,
"change_pct": 1.06
}
},
"unit": "per index"
}
OHLC (Open/High/Low/Close) Endpoint
For technical analysis, retrieve OHLC data for the Moroccan Dirham over a specified time period. Here’s an example response:
{
"success": true,
"timestamp": 1772067187,
"base": "USD",
"date": "2026-02-26",
"rates": {
"MAD": {
"open": 9.45,
"high": 9.50,
"low": 9.40,
"close": 9.50
}
},
"unit": "per index"
}
Bid/Ask Endpoint
To get current bid and ask prices for the Moroccan Dirham, use the bid/ask endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1772067187,
"base": "USD",
"date": "2026-02-26",
"rates": {
"MAD": {
"bid": 9.48,
"ask": 9.50,
"spread": 0.02
}
},
"unit": "per index"
}
Conclusion
Accessing real-time and historical Moroccan Dirham value rates using the Indices-API is a straightforward process that can significantly enhance your applications. By leveraging the various endpoints provided by the API, developers can obtain accurate and timely currency data, enabling them to make informed decisions and create innovative solutions. Whether you are analyzing market trends, performing currency conversions, or tracking fluctuations, the Indices-API offers a comprehensive suite of tools to meet your needs.
For further exploration, refer to the Indices-API Documentation for detailed information on each endpoint and its capabilities. Additionally, the Indices-API Supported Symbols page provides a complete list of available currencies, ensuring you have the necessary resources to integrate this powerful API into your applications.
By utilizing the Indices-API, you can unlock the potential of real-time financial data and enhance your applications with valuable insights into the Moroccan Dirham and other currencies. Start building today and take advantage of the transformative capabilities that the Indices-API offers.