---
title: "Hatton National Bank Exchange Rate API: LKR Buy and Sell Rates as JSON"
description: "Hatton National Bank's telegraphic transfer rates for 17 currencies against the Sri Lankan rupee, read hourly from the bank's own page and served as JSON with the Central Bank of Sri Lanka official rate alongside. REST, JavaScript and Python examples."
canonical: https://allratestoday.com/blog/hatton-national-bank-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-11-13T18:12:19.302Z
---

Hatton National Bank is one of Sri Lanka’s largest private-sector banks, listed on the Colombo Stock Exchange. Its exchange-rates page lists daily telegraphic-transfer buying and selling rates for about 17 currencies, with a last-updated date. This guide shows how to read that board as JSON: what the rates mean, how they compare with the Central Bank of Sri Lanka official rate and with other banks in Sri Lanka, and the calls that return them.

## What the HNB board shows

- **17 currencies against the Sri Lankan rupee**: AED, AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, INR, JPY, NOK, NZD, SEK, SGD, THB and USD. Every value is LKR per 1 unit of the foreign currency.
- **The telegraphic transfer pair.** Sri Lankan banks publish three or four boards for the same currency: currency notes over the counter, demand drafts, telegraphic transfers and import bills. The rates here are the telegraphic-transfer pair, which is what an inbound remittance is actually converted at and the number worth comparing between banks. The Central Bank of Sri Lanka’s indicative rate sits between the banks’ buying and selling.
- **USD on 13 November 2026**: HNB bought at 328.75 and sold at 336 LKR, a spread of 2.18%. The Central Bank of Sri Lanka official rate was 332.5, so the bank's mid sat -0.04% from it.
- **The bank's own timestamp.** The page prints a last-updated stamp (`2026-11-13` on the board above), returned as `bank_updated_at` next to our `captured_at`.
- **Every day's board is kept permanently, from 13 November 2026, the day collection started.** Read one past day with `?date=`, or a range for one currency with the `/history` endpoint (paid plans).

## Spreads across the board

On the 13 November 2026 board the tightest spreads were USD (2.18%), GBP (2.69%), JPY (2.75%) and the widest THB (12.46%), INR (10.22%), SEK (9.06%). Spread is (sell − buy) ÷ mid: what a round trip through the bank costs, before any fees. The API returns it on every row as `spread_pct`, so you can rank currencies or alert when a bank widens its board.

## USD at HNB and other banks in Sri Lanka

USD on the 8 boards AllRatesToday reads in Sri Lanka, all captured on 13 November 2026 (the Central Bank of Sri Lanka official rate was 332.5):

| Bank | Buy | Sell | Spread | Mid vs official |
| --- | --- | --- | --- | --- |
| National Development Bank | 328 | 337 | 2.71% | 0.00% |
| Nations Trust Bank | 327.03 | 338.07 | 3.32% | +0.01% |
| Seylan Bank | 329 | 336 | 2.10% | 0.00% |
| Bank of Ceylon | 328 | 337 | 2.71% | 0.00% |
| Commercial Bank of Ceylon | 328.5 | 336.5 | 2.41% | 0.00% |
| Sampath Bank | 328.5 | 336.5 | 2.41% | 0.00% |
| **Hatton National Bank** | 328.75 | 336 | 2.18% | -0.04% |
| People’s Bank | 328.78 | 336.47 | 2.31% | +0.04% |

HNB had the 2nd narrowest USD spread of the 8. One call to `/api/v1/bank-rates/lk` returns every board in the table at once.

## Get the board (REST)

You need an API key; the [free key](https://allratestoday.com/register/) works. The full board:

```
curl "https://allratestoday.com/api/v1/bank-rates/lk/hnb" \
  -H "Authorization: Bearer art_live_your_key"
```

What comes back (the 13 November 2026 board, first three rows):

```
{
  "bank": "hnb",
  "name": "Hatton National Bank",
  "country": "lk",
  "quote_ccy": "LKR",
  "bank_updated_at": "2026-11-13",
  "basis": "Telegraphic transfer",
  "captured_at": "2026-11-13T13:36:36.604Z",
  "rates": [
    {"ccy":"AED","buy":88.8623,"sell":92.2027,"mid":90.5325,"spread_pct":3.69,"official":90.5259,"vs_official_pct":0.007},
    {"ccy":"AUD","buy":222.229,"sell":230.4658,"mid":226.3474,"spread_pct":3.639,"official":226.467,"vs_official_pct":-0.053},
    {"ccy":"CAD","buy":229.4944,"sell":236.7188,"mid":233.1066,"spread_pct":3.099,"official":233.2037,"vs_official_pct":-0.042},
    … 14 more currencies
  ],
  "disclaimer": "…",
  "attribution": { … }
}
```

One currency, with the row fields at the top level:

```
curl "https://allratestoday.com/api/v1/bank-rates/lk/hnb?ccy=USD" \
  -H "Authorization: Bearer art_live_your_key"
```

```
{
  "bank": "hnb",
  "name": "Hatton National Bank",
  "country": "lk",
  "quote_ccy": "LKR",
  "bank_updated_at": "2026-11-13",
  "basis": "Telegraphic transfer",
  "captured_at": "2026-11-13T13:36:36.604Z",
  "ccy": "USD",
  "buy": 328.75,
  "sell": 336,
  "mid": 332.375,
  "spread_pct": 2.181,
  "official": 332.5018,
  "vs_official_pct": -0.038,
  "disclaimer": "Retail buy/sell rates as displayed on each bank’s own website at capture time, quoted as home currency per 1 unit of foreign currency. Indicative only: banks change these through the day, apply them at the counter or in-app, and they are not official or reference rates. For the rate a regulation names, use the central-bank endpoints.",
  "attribution": {
    "source": "Board rates published by Hatton National Bank on its own website, collected by AllRatesToday",
    "bank_url": "https://www.hnb.lk/exchange-rates",
    "url": "https://allratestoday.com/bank-exchange-rate-api/lk/hnb/",
    "terms": "Public pages that show the rates need a visible link to allratestoday.com"
  }
}
```

The board as it stood on a past day:

```
curl "https://allratestoday.com/api/v1/bank-rates/lk/hnb?date=2026-11-13" \
  -H "Authorization: Bearer art_live_your_key"
```

One currency over a date range, one row per day (paid plans; add `&format=csv`, `xml` or `xlsx` for a file):

```
curl "https://allratestoday.com/api/v1/bank-rates/lk/hnb/history?ccy=USD&from=2026-11-13&to=2026-11-13" \
  -H "Authorization: Bearer art_live_your_key"
```

## JavaScript

```
npm install @allratestoday/sdk
```

```
import { AllRatesToday } from '@allratestoday/sdk';

const client = new AllRatesToday({ apiKey: 'art_live_your_key' });

// Hatton National Bank's USD row
const r = await client.bankRates('lk', { bank: 'hnb', ccy: 'USD' });
console.log(`HNB buys USD at ${r.buy}, sells at ${r.sell} LKR`);

// The board as it stood on a past day
const past = await client.bankRates('lk', { bank: 'hnb', date: '2026-11-13' });
console.log(past.snapshot_date, past.rates.length);
```

## Python

```
import requests

r = requests.get(
    "https://allratestoday.com/api/v1/bank-rates/lk/hnb",
    headers={"Authorization": "Bearer art_live_your_key"},
    timeout=10,
)
r.raise_for_status()
for row in r.json()["rates"]:
    print(row["ccy"], row["buy"], row["sell"], row["spread_pct"])
```

## Board rate or official rate?

The Central Bank of Sri Lanka rate is the one tax, accounting and customs rules in Sri Lanka name; nobody transacts at it. HNB's board is the price a customer actually gets. The API puts both on every row: `official` is the central bank's rate for the same currency and `vs_official_pct` is how far the bank's mid sits from it. Use the board to show customers a real price, compare banks for a remittance, or keep a dated record of what the bank quoted; use the [Central Bank of Sri Lanka endpoint](https://allratestoday.com/central-bank-rates-api/cbsl/) when a rule asks for the official rate.

## FAQ

### Where do the Hatton National Bank rates come from?

From the bank's own public rates page (https://www.hnb.lk/exchange-rates), read hourly. AllRatesToday does not change the numbers: each row is the buy and sell price HNB shows, with the mid, the spread and the Central Bank of Sri Lanka rate added.

### Are these the official LKR exchange rates?

No. They are HNB's retail prices for customers. The official rate in Sri Lanka is the Central Bank of Sri Lanka rate, which the API returns as `official` on each row where the central bank has one, and in full from the central-bank endpoint.

### How often is the HNB board updated?

AllRatesToday reads the page every hour. The bank's own last-updated stamp is returned as `bank_updated_at`, so you can tell a fresh read of an unchanged board from a new board.

### Can I get HNB rates for a past date?

Yes, from 13 November 2026 onward; every day's board is kept permanently. Add `?date=YYYY-MM-DD` for one day: the response is the board captured that day, or the nearest earlier day within five days, with `date_requested` and `snapshot_date` added. For a range, `/history?ccy=USD&from=…&to=…` returns one row per day as JSON, CSV, XML or XLSX on paid plans.

### Do I need an API key?

Yes. Commercial bank boards need an API key; any plan works, the free key included, and each call counts against the plan. Public pages or widgets that show the rates need a visible link to allratestoday.com.

## Hatton National Bank rates, as JSON

Free API key, hourly board captures, the official rate alongside.

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

## Related

- [Hatton National Bank live board rates](https://allratestoday.com/bank-exchange-rate-api/lk/hnb/)
- [All banks in Sri Lanka side by side](https://allratestoday.com/bank-exchange-rate-api/lk/)
- [Central Bank of Sri Lanka official rates API](https://allratestoday.com/central-bank-rates-api/cbsl/)
- [National Development Bank exchange rate API guide](https://allratestoday.com/blog/national-development-bank-exchange-rate-api/)
- [Nations Trust Bank exchange rate API guide](https://allratestoday.com/blog/nations-trust-bank-exchange-rate-api/)
- [Seylan Bank exchange rate API guide](https://allratestoday.com/blog/seylan-bank-exchange-rate-api/)
- [Bank of Ceylon exchange rate API guide](https://allratestoday.com/blog/bank-of-ceylon-exchange-rate-api/)
- [Commercial Bank of Ceylon exchange rate API guide](https://allratestoday.com/blog/commercial-bank-of-ceylon-exchange-rate-api/)
- [Sampath Bank exchange rate API guide](https://allratestoday.com/blog/sampath-bank-exchange-rate-api/)
- [People’s Bank exchange rate API guide](https://allratestoday.com/blog/people-s-bank-exchange-rate-api/)
- [Commercial bank rates API: every bank and country](https://allratestoday.com/bank-exchange-rate-api/)
