Skip to content
EasyAlgerie

EasyAlgerie · Developers

Free Algerian dinar API

Add dinar exchange rates and currency conversion to your website, application or AI agent. Simple JSON responses, with no account and no API key.

  • No authentication
  • 11 currencies ↔ DZD
  • Read-only

Your first request

Copy this example into your terminal to convert 100 euros to dinars at the indicative parallel-market buying rate.

curl 'https://easyalgerie.com/api/v1/dinar/convert?amount=100&from=EUR&to=DZD&market=parallel_buy'
View JSON response

Two endpoints, one simple format

Base URL : https://easyalgerie.com/api/v1/dinar

GET /ratesGet exchange rates

Rates are expressed in DZD per 1 unit of foreign currency. Without a filter, the response includes all 11 supported currencies.

curl 'https://easyalgerie.com/api/v1/dinar/rates?currency=EUR'
currency
Optional: a foreign currency code, such as EUR or USD. Do not use DZD.

GET /convertConvert an amount

Convert foreign currency to dinars, or dinars to foreign currency. Exactly one of the two currencies must be DZD: direct EUR/USD conversion is not supported.

amount
Required. From 0 to 1,000,000,000, using a decimal point and up to 6 decimal places. No grouping separators or exponent notation.
from / to
Required. ISO codes for the source and target currencies. Exactly one must be DZD.
market
Optional. official, parallel_buy or parallel_sell. Default: parallel_buy.

Currency codes are case-insensitive. Unknown and duplicate parameters are rejected.

Supported currencies

DZDEURUSDCADGBPCHFTRYCNYSARAEDTNDMAD

Choose the right rate

official
Banking reference from an exchange-rate provider; not a guaranteed bank quote.
parallel_buy
The exchange dealer buys foreign currency from the customer for dinars.
parallel_sell
The exchange dealer sells foreign currency to the customer for dinars.

The selected market applies in both conversion directions: the API does not automatically switch to another rate.

Understand the response

result
Converted amount, rounded half-up to 2 decimal places.
rate
Multiplier: 1 unit of from = rate units of to.
dzdPerUnit
Underlying reference in DZD per 1 unit of foreign currency.
provenance
The value’s origin, source and available timestamp.

Data origin and freshness

provider
Rate received from an external provider.
editorial
Public converter editorial rate, including values entered manually by EasyAlgerie.
fallback
Static fallback value. Do not present it as a current market rate.

Check sourceUpdatedAt for the source timestamp: null means unknown. For manual rates, this is the UTC edit timestamp, not an independent market observation. retrievedAt describes snapshot retrieval, not when the rate was set.

External sources are cached for 6 hours. Manual rates take precedence and their cache is invalidated on save (fallback TTL: 30 seconds). refreshIntervalSeconds refers to external sources.

Conversions are indicative, with no transaction or guaranteed exchange. Public rates are separate from commercial rates used for EasyAlgerie payments.

Limits and error handling

60 requests per minute per IP address, shared between /rates and /convert. RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers describe the quota. Cache rates for repeated calculations.

400
Invalid parameters: inspect error.code, error.message and error.field.
405
Method not allowed. Use GET to read data.
429
Quota exceeded: wait for the number of seconds in Retry-After.
503
Data temporarily unavailable. Retry later without rapid loops.

Public CORS: browser requests are allowed without cookies or credentials. No secret API key is required.

JavaScript example

const url = new URL("https://easyalgerie.com/api/v1/dinar/convert");
url.search = new URLSearchParams({
  amount: "100", from: "EUR", to: "DZD", market: "parallel_buy"
}).toString();

const response = await fetch(url, { credentials: "omit" });
if (response.status === 429) {
  throw new Error("Retry after " + response.headers.get("Retry-After") + " seconds");
}
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message || "API unavailable");

console.log(data.result, data.to);
console.log(data.provenance);

Connect an AI agent

  1. Import the OpenAPI specification into a compatible tool, with authentication set to None. Not every agent supports automatic import.
  2. Use getDinarExchangeRates to read rates and convertAlgerianDinars to convert. Specify the selected market explicitly.
  3. Check provenance and timestamps before answering. Do not describe editorial or fallback rates as real-time market prices.
  4. Clarify ambiguous amounts: 1 DZD = 100 centimes. If someone says “millions”, ask whether they mean dinars or centimes.
Open OpenAPI