---
title: "CNB CZK Exchange Rates"
description: "Daily Czech National Bank (ČNB) CZK fixing rates for 30 currencies as TapHome sensors, via the public CNB API with no API key, refreshed hourly."
url: "https://taphome.com/en/compatibility/cnb-czk/"
language: en
lastmod: 2026-10-08
generator: hugo
ai:
  topics: ["http","data-service","exchange-rates","currency","cloud-api","packet-parser"]
  questions: ["How to integrate CNB exchange rates with TapHome?","What currencies does the CNB CZK exchange rate template support?","How to automate actions based on currency exchange rates in TapHome?","How often are CNB exchange rates updated?","How to track EUR/CZK or USD/CZK rate in TapHome?"]
---

# CNB CZK Exchange Rates

Communication: Packet Parser → HTTP

- [Czech National Bank](https://www.cnb.cz/en/)

## Integration guide

The Czech National Bank (CNB) publishes official CZK exchange rates daily for 30 foreign currencies. These rates are the official fixing rates used as a reference across the Czech financial system.

The TapHome template fetches all 30 exchange rates from the public CNB REST API (`api.cnb.cz`) via HTTP Packet Parser. Each currency is exposed as a separate read-only sensor showing its current CZK rate. The API is completely public — no authentication, API key, or registration is required. TapHome fetches the rates once per hour; CNB publishes new rates once per working day around 14:30.

## Configuration

The template connects to `api.cnb.cz` over HTTPS (port 443). No IP address, credentials, or API key are needed — the endpoint is a fully public government API.

There are no user-configurable variables. The only custom variable (`responsejson`) is an internal HTTP response cache used by the template scripts — it does not need to be modified.

## How it works

The module sends a single HTTP GET request once per hour (3,600,000 ms polling interval):

```
GET /cnbapi/exrates/daily?date={today}&lang=CZ
```

The response is a JSON object containing a `rates[]` array with all 30 currency entries. Each entry includes the currency code, country name, amount, and rate. The module stores the full JSON response in the `responsejson` variable.

Each currency device then parses its rate from the cached response using `PARSEJSON(responsejson, "$.rates[N].rate")`, where N is the fixed array index for that currency. The device poll interval is 15 seconds, but since all devices read from the cached `responsejson`, no additional API calls are made between hourly refreshes.

> [!NOTE]
> The template uses `lang=CZ` in the API request. This is critical because the `rates[]` array is sorted alphabetically by country name in the selected language. Changing to `lang=EN` would produce a different sort order and break all array index mappings.

## Device capabilities

The template provides 30 read-only sensor devices, one for each currency. All values are in CZK.

### Major currencies

The most commonly tracked rates include EUR (Euro), USD (US Dollar), GBP (British Pound), CHF (Swiss Franc), and PLN (Polish Zloty). These are quoted per 1 unit of foreign currency — for example, a USD rate of 21.315 means 1 USD = 21.315 CZK.

### Multi-unit currencies

Nine currencies use multi-unit rates due to their low per-unit CZK value:

| Currency | Amount | Meaning |
|----------|--------|---------|
| HUF (Hungarian Forint) | 100 | Rate per 100 HUF |
| INR (Indian Rupee) | 100 | Rate per 100 INR |
| ISK (Icelandic Krona) | 100 | Rate per 100 ISK |
| JPY (Japanese Yen) | 100 | Rate per 100 JPY |
| KRW (South Korean Won) | 100 | Rate per 100 KRW |
| PHP (Philippine Peso) | 100 | Rate per 100 PHP |
| THB (Thai Baht) | 100 | Rate per 100 THB |
| TRY (Turkish Lira) | 100 | Rate per 100 TRY |
| IDR (Indonesian Rupiah) | 1000 | Rate per 1000 IDR |

The template reads the raw `rate` value from the API without dividing by the `amount`. For example, a JPY rate of 13.328 in TapHome means 100 JPY = 13.328 CZK, not 1 JPY = 13.328 CZK.

### Complete currency list

All 30 currencies: AUD, BRL, CAD, CHF, CNY, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, XDR (IMF Special Drawing Rights), ZAR.

## Automation examples

### Notify on rate threshold

Use a currency sensor in a smart rule condition to receive notifications when a rate crosses a threshold:

- Condition: EUR value crosses above 25.00
- Action: Send push notification

### Rate-based switching

Trigger actions based on exchange rate movements — for example, switch display indicators or control outputs when a monitored currency reaches a target range.

## Troubleshooting

### All devices show zero or no data

1. Check internet connectivity on TapHome Core — the template requires outbound HTTPS access to `api.cnb.cz`
2. Verify the API is responding — open `https://api.cnb.cz/cnbapi/exrates/daily?date=2026-03-28&lang=CZ` in a browser
3. New exchange rates are published every working day around 14:30 CET. On weekends and holidays, the API returns the last valid rates

### Values seem incorrect for some currencies

Check the multi-unit rates table above. Currencies like JPY, HUF, KRW, and IDR are quoted per 100 or 1000 units, not per 1 unit. This is the standard CNB convention, not a template error.

### Data stops updating

The template polls the API once per hour. If rates appear stale, verify that TapHome Core has internet access and that the CNB API is reachable. The API has no documented rate limits, but prolonged connectivity issues will prevent updates.

## Available devices 30

These devices appear in TapHome after import.

CNB CZK Exchange Rates Module

Custom Variables

Read (module)

```taphome
VAR today := tostring(NOW(), "yyyy-MM-dd");
VAR response := SENDHTTPREQUEST("/cnbapi/exrates/daily?date=" + today + "&lang=CZ");
IF response.IsSuccess
    responsejson := response.Content;
ELSE
    ADDERROR(response.StatusCode + " (" + response.ReasonPhrase + ")");
END
```

Australian Dollar (AUD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[0].rate");
```

Brazilian Real (BRL) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[1].rate");
```

Canadian Dollar (CAD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[13].rate");
```

Chinese Renminbi (CNY) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[2].rate");
```

Danish Krone (DKK) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[3].rate");
```

Euro (EUR) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[4].rate");
```

British Pound (GBP) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[29].rate");
```

Hong Kong Dollar (HKD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[6].rate");
```

Hungarian Forint (HUF) Variable Read-only

Rate per 100 HUF

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[15].rate");
```

Swiss Franc (CHF) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[25].rate");
```

Indonesian Rupiah (IDR) Variable Read-only

Rate per 1000 IDR

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[8].rate");
```

Israeli Shekel (ILS) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[10].rate");
```

Indian Rupee (INR) Variable Read-only

Rate per 100 INR

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[7].rate");
```

Icelandic Krona (ISK) Variable Read-only

Rate per 100 ISK

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[9].rate");
```

Japanese Yen (JPY) Variable Read-only

Rate per 100 JPY

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[11].rate");
```

South Korean Won (KRW) Variable Read-only

Rate per 100 KRW

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[14].rate");
```

Mexican Peso (MXN) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[17].rate");
```

Malaysian Ringgit (MYR) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[16].rate");
```

Norwegian Krone (NOK) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[19].rate");
```

New Zealand Dollar (NZD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[20].rate");
```

Philippine Peso (PHP) Variable Read-only

Rate per 100 PHP

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[5].rate");
```

Polish Zloty (PLN) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[21].rate");
```

Romanian Leu (RON) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[22].rate");
```

Swedish Krona (SEK) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[24].rate");
```

Singapore Dollar (SGD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[23].rate");
```

Thai Baht (THB) Variable Read-only

Rate per 100 THB

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[26].rate");
```

Turkish Lira (TRY) Variable Read-only

Rate per 100 TRY

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[27].rate");
```

US Dollar (USD) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[28].rate");
```

IMF SDR (XDR) Variable Read-only

IMF Special Drawing Rights — composite reserve asset

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[18].rate");
```

South African Rand (ZAR) Variable Read-only

string Unit: CZK json\_path

Read

```taphome
PARSEJSON(responsejson, "$.rates[12].rate");
```

**Connection:** Packet Parser → HTTP

## Sources

- CNB API — OpenAPI Specification
  
  [api.cnb.cz](https://api.cnb.cz/cnbapi/api-docs) 2026-03-28
- CNB Exchange Rate Format & Currency List
  
  [www.cnb.cz](https://www.cnb.cz/en/faq/Format-of-the-foreign-exchange-market-rates/) 2026-03-28

## Related Documentation

- [Packet Parser Integration](https://taphome.com/en/compatibility/packet-parser-guide/)
- [Packet Parser (HTTP, TCP, UDP, FTP, MQTT)](https://taphome.com/en/docs/integration/packet-parser/)
- [Packet parser functions](https://taphome.com/en/docs/script/packet-parser/)
- [Parsing functions](https://taphome.com/en/docs/script/parsing-functions/)

