---
title: "Central Bank of Libya Exchange Rate API: Official LYD Rates as JSON"
description: "Official Central Bank of Libya dinar exchange rates as JSON — daily mid, buying and selling rates for 20 currencies, history since 2015 including the 2021 devaluation. REST + npm SDK, free tier included."
canonical: https://allratestoday.com/blog/central-bank-of-libya-exchange-rate-api/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-10-21T03:44:22.475Z
---

The **Central Bank of Libya** publishes the official exchange rates that accounting, tax, and customs rules in Libya reference — *published official rates*, not moving market prices. This guide shows how to pull them as JSON: via a REST endpoint or the zero-dependency [`central-bank-of-libya-exchange-rate`](https://www.npmjs.com/package/central-bank-of-libya-exchange-rate) npm package.

  USD → LYD — official Central Bank of Libya official mid rate Weekly observations, Sep '25 – Sep '26 · Libyan dinars per 1 US dollar

*Source: Central Bank of Libya published rates · chart data from the AllRatesToday API (`/api/v1/central-bank/cbl/history?source=USD&target=LYD`).*

## What the CBL publishes

- **Daily mid, buying and selling rates for 20 currencies** — the official dinar rate Libyan banks, customs and the state budget use.
- **The official rate, not the parallel market** — around 6.35 LYD per US dollar on 3 September 2026.
- **History back to 2015 in our API**, spanning the January 2021 devaluation.
- **The bank's own publication date** on every response; the Sunday–Thursday work week means Friday and Saturday resolve to Thursday's table, flagged explicitly.

Libya runs two dinar prices — the official rate the CBL publishes and a parallel-market rate — and only the first has legal standing for customs valuation, bank transactions and the state budget. The API serves the official one, dated.

## Why official rates, not market rates

A live mid-market [exchange rate API](https://allratestoday.com/exchange-rate-api/) answers "what is USD/LYD trading at right now?" — the right tool for checkouts and dashboards. But accountants, auditors, and tax authorities ask a different question: "which rate were you *required* to use for this date?" That answer comes from the Central Bank of Libya's published rates, and it never changes after publication.

## Get the latest rates (REST)

```
curl "https://allratestoday.com/api/v1/central-bank/cbl/latest" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The response is the bank’s most recent published table — one row per pair in its own quoting direction, the publication date (`rate_date`) and a freshness flag. Live example captured 2026-10-08:

```
{
  "bank": "cbl",
  "name": "Central Bank of Libya",
  "rate_date": "2026-10-08",
  "age_days": 2,
  "stale": false,
  "cadence": "daily",
  "rates": [
    {"base": "AED", "quote": "LYD", "type": "buy", "value": 1.7459},
    {"base": "AED", "quote": "LYD", "type": "middle", "value": 1.7503},
    {"base": "AED", "quote": "LYD", "type": "sell", "value": 1.7546},
    {"base": "AUD", "quote": "LYD", "type": "buy", "value": 4.4587},
    … 56 more rows
  ],
  "disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
}
```

Most integrations need one pair. Add `source` and `target` and the API returns a single resolved rate — `derived: false` when Central Bank of Libya printed the pair itself:

```
curl "https://allratestoday.com/api/v1/central-bank/cbl/latest?source=USD&target=LYD" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
{
  "bank": "cbl",
  "name": "Central Bank of Libya",
  "rate_date": "2026-10-08",
  "source": "USD",
  "target": "LYD",
  "rate": 6.4127,
  "rate_type": "buy",
  "derived": false,
  "method": "published",
  "age_days": 2,
  "stale": false,
  "cadence": "daily",
  "disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
}
```

The response is the bank's most recent published data — every rate and the publication date. The latest rates are available on every plan, including the free tier (300 free requests, no credit card).

## The npm SDK

```
npm install central-bank-of-libya-exchange-rate
```

```
import { getRate, getLatestRates } from 'central-bank-of-libya-exchange-rate';

// One pair at the official CBL rate
const pair = await getRate('USD', 'LYD', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date);

// The bank's full published table
const table = await getLatestRates({ apiKey: 'art_live_...' });
console.log(table.rate_date, table.rates.length);
```

Zero dependencies, TypeScript types included, and it runs anywhere `fetch` exists — Node 18+, Bun, Deno, and edge runtimes.

## Historical rates for an invoice date

```
import { getRatesForDate, getHistory } from 'central-bank-of-libya-exchange-rate';

// The official rates for an invoice date — non-publication days return
// the most recent published date, flagged via published_on_requested_date.
const day = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...' });

// Time series for one pair
const series = await getHistory(
  { source: 'USD', target: 'LYD', from: '2026-01-01' },
  { apiKey: 'art_live_...' }
);
```

Historical dates and time series need a [paid plan](https://allratestoday.com/pricing/); the latest rates stay free.

## Published vs derived pairs

If the CBL does not print a pair directly, the API resolves it from the bank's published rates — an inverse, or a cross rate via LYD — and flags it `derived: true` with the method used. Official and computed values are never silently mixed, which is exactly the distinction an auditor will ask about.

## A decade including the 2021 devaluation

Our archive runs from 2015, across the January 2021 step that moved the official rate from about 1.4 to 4.5 dinars per dollar and on to today's mid-6s. Every published table on either side of that reset is queryable by date and rate type.

## FAQ

### Does the Central Bank of Libya have an official exchange rate API?

The CBL publishes its official rates on its own site, and AllRatesToday serves the same published rates as clean JSON via REST or the central-bank-of-libya-exchange-rate npm package. The latest table is free.

### How often do Central Bank of Libya rates update?

Once per working day, Sunday to Thursday, with mid, buying and selling rates for 20 currencies. Friday and Saturday queries resolve to the most recent published table and are flagged; every response carries the publication date.

### Can I get the CBL rate for a past date, like an invoice date?

Yes. The /central-bank/cbl/rates-for-date endpoint returns the official rates for any archived date. Non-publication days resolve to the most recent published date and are flagged, so your audit trail stays honest. Historical dates require a paid plan; latest rates are free.

## Official Central Bank of Libya rates, as JSON

The latest rates are free — 300 free requests, no credit card.

 [Get your free API key](https://allratestoday.com/register/)

## Related Articles

- [Central Bank of Libya rates API — product page](https://allratestoday.com/central-bank-rates-api/cbl/)
- [All covered central banks](https://allratestoday.com/central-bank-rates-api/)
- [Central Bank of Tunisia exchange rate API guide](https://allratestoday.com/blog/bct-exchange-rate-api/)
- [Central Bank of Egypt exchange rate API guide](https://allratestoday.com/blog/cbe-exchange-rate-api/)
- [Central bank API documentation](https://allratestoday.com/docs/#central-bank)
- [Best exchange rate APIs in 2026 — how the official-rate and market-rate providers compare](https://allratestoday.com/best/best-exchange-rate-api/)
- [Exchange rate API — live market rates for 160+ currencies](https://allratestoday.com/exchange-rate-api/)
