{"openapi":"3.1.0","info":{"title":"EasyAlgerie Public Dinar API","version":"1.0.0","description":"Read-only Algerian dinar conversion for apps and AI agents. No API key or account. Indicative conversion only, not a payment quote or a guaranteed exchange rate. Amounts are in major currency units (1 DZD = 100 centimes). Rate snapshots refresh every six hours. Origin and freshness are explicit; never describe editorial or fallback values as real-time market data. 60 origin requests/minute/IP, shared between rates and convert.","contact":{"name":"EasyAlgerie","email":"contact@easyalgerie.com","url":"https://easyalgerie.com"}},"servers":[{"url":"https://easyalgerie.com/api/v1/dinar"}],"security":[],"paths":{"/rates":{"get":{"operationId":"getDinarExchangeRates","summary":"Get official and parallel reference rates in DZD per foreign currency unit","parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string","enum":["EUR","USD","CAD","GBP","CHF","TRY","CNY","SAR","AED","TND","MAD"]},"description":"Optional foreign currency filter. Omit to get all 11 currencies. Case-insensitive."}],"responses":{"200":{"description":"Public converter rates with explicit provenance for each value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rates"}}}},"400":{"description":"Invalid query. Inspect error.code and error.field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable. No usable snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/convert":{"get":{"operationId":"convertAlgerianDinars","summary":"Convert between DZD and a supported foreign currency","description":"Exactly one of from/to must be DZD. Amounts are in major units, never centimes. For centimes, divide the input by 100 before converting DZD. Do not infer whether an ambiguous amount is dinars or centimes: ask the user. parallel_buy is the dealer buying foreign currency; parallel_sell is the dealer selling it. The selected market is used in either direction; it is not switched automatically.","parameters":[{"name":"amount","in":"query","required":true,"schema":{"type":"number","minimum":0,"maximum":1000000000,"multipleOf":0.000001},"description":"Decimal point, at most six decimal places. No grouping separators, exponent notation, signs or currency suffixes."},{"name":"from","in":"query","required":true,"schema":{"type":"string","enum":["DZD","EUR","USD","CAD","GBP","CHF","TRY","CNY","SAR","AED","TND","MAD"]},"description":"Source ISO 4217 code (case-insensitive)."},{"name":"to","in":"query","required":true,"schema":{"type":"string","enum":["DZD","EUR","USD","CAD","GBP","CHF","TRY","CNY","SAR","AED","TND","MAD"]},"description":"Destination ISO 4217 code (case-insensitive)."},{"name":"market","in":"query","required":false,"schema":{"type":"string","enum":["official","parallel_buy","parallel_sell"],"default":"parallel_buy"},"description":"Official banking reference or indicative parallel buy/sell market."}],"responses":{"200":{"description":"Indicative result, rounded half-up to two decimals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"400":{"description":"Invalid query. Inspect error.code and error.field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable. No usable snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Provenance":{"type":"object","required":["kind","source","sourceUpdatedAt"],"properties":{"kind":{"type":"string","enum":["provider","editorial","fallback"]},"source":{"type":"string","description":"Public source label only, never a credential or checkout rate."},"sourceUpdatedAt":{"type":["string","null"],"description":"Provider timestamp as supplied; format/timezone may differ. Null means unknown age. Manual editorial rates use their UTC edit timestamp, not an independently verified market observation date."}}},"Rate":{"type":"object","required":["name","official","parallel_buy","parallel_sell","provenance"],"properties":{"name":{"type":"string"},"official":{"type":"number","exclusiveMinimum":0},"parallel_buy":{"type":"number","exclusiveMinimum":0},"parallel_sell":{"type":"number","exclusiveMinimum":0},"provenance":{"type":"object","required":["official","parallel_buy","parallel_sell"],"properties":{"official":{"$ref":"#/components/schemas/Provenance"},"parallel_buy":{"$ref":"#/components/schemas/Provenance"},"parallel_sell":{"$ref":"#/components/schemas/Provenance"}}}}},"Rates":{"type":"object","required":["quoteCurrency","convention","indicative","retrievedAt","refreshIntervalSeconds","markets","rates","warning"],"properties":{"quoteCurrency":{"type":"string","const":"DZD"},"convention":{"type":"string"},"indicative":{"type":"boolean","const":true},"retrievedAt":{"type":"string","format":"date-time","description":"When the cached snapshot was retrieved, NOT when each rate was set. Inspect provenance.sourceUpdatedAt."},"refreshIntervalSeconds":{"type":"integer","const":21600},"markets":{"type":"object","additionalProperties":{"type":"string"}},"rates":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Rate"}},"warning":{"type":"string"}}},"Conversion":{"type":"object","required":["amount","from","to","market","result","rate","dzdPerUnit","rounding","indicative","provenance","retrievedAt","refreshIntervalSeconds","warning"],"properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000},"from":{"type":"string","enum":["DZD","EUR","USD","CAD","GBP","CHF","TRY","CNY","SAR","AED","TND","MAD"]},"to":{"type":"string","enum":["DZD","EUR","USD","CAD","GBP","CHF","TRY","CNY","SAR","AED","TND","MAD"]},"market":{"type":"string","enum":["official","parallel_buy","parallel_sell"]},"result":{"type":"number","minimum":0},"rate":{"type":"number","description":"Unrounded multiplier: 1 unit of from = rate units of to."},"dzdPerUnit":{"type":"number","description":"Underlying reference in DZD per foreign currency unit."},"rounding":{"type":"string","const":"half_up_2_decimals"},"indicative":{"type":"boolean","const":true},"provenance":{"$ref":"#/components/schemas/Provenance"},"retrievedAt":{"type":"string","format":"date-time","description":"When the cached snapshot was retrieved, NOT when each rate was set. Inspect provenance.sourceUpdatedAt."},"refreshIntervalSeconds":{"type":"integer","const":21600},"warning":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"}}}}}}}}