TapHome

CNB CZK Exchange Rates

Packet Parser → HTTP
Submitted by
Last updated: 03. 2026

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. Rates are updated every hour.

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):

1
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.

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

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

CurrencyAmountMeaning
HUF (Hungarian Forint)100Rate per 100 HUF
INR (Indian Rupee)100Rate per 100 INR
ISK (Icelandic Krona)100Rate per 100 ISK
JPY (Japanese Yen)100Rate per 100 JPY
KRW (South Korean Won)100Rate per 100 KRW
PHP (Philippine Peso)100Rate per 100 PHP
THB (Thai Baht)100Rate per 100 THB
TRY (Turkish Lira)100Rate per 100 TRY
IDR (Indonesian Rupiah)1000Rate 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

CNB CZK Exchange Rates Module
Custom Variables

Kurzy ČNB

Read (module)
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

Australian Dollar (AUD)

Read
PARSEJSON(responsejson, "$.rates[0].rate");
Brazilian Real (BRL) Variable Read-only
string Unit: CZK json_path

Brazilian Real (BRL)

Read
PARSEJSON(responsejson, "$.rates[1].rate");
Canadian Dollar (CAD) Variable Read-only
string Unit: CZK json_path

Canadian Dollar (CAD)

Read
PARSEJSON(responsejson, "$.rates[13].rate");
Chinese Renminbi (CNY) Variable Read-only
string Unit: CZK json_path

Chinese Renminbi (CNY)

Read
PARSEJSON(responsejson, "$.rates[2].rate");
Danish Krone (DKK) Variable Read-only
string Unit: CZK json_path

Danish Krone (DKK)

Read
PARSEJSON(responsejson, "$.rates[3].rate");
Euro (EUR) Variable Read-only
string Unit: CZK json_path

Euro (EUR)

Read
PARSEJSON(responsejson, "$.rates[4].rate");
British Pound (GBP) Variable Read-only
string Unit: CZK json_path

British Pound (GBP)

Read
PARSEJSON(responsejson, "$.rates[29].rate");
Hong Kong Dollar (HKD) Variable Read-only
string Unit: CZK json_path

Hong Kong Dollar (HKD)

Read
PARSEJSON(responsejson, "$.rates[6].rate");
Hungarian Forint (HUF) Variable Read-only

Rate per 100 HUF

string Unit: CZK json_path

Hungarian Forint (HUF)

Read
PARSEJSON(responsejson, "$.rates[15].rate");
Swiss Franc (CHF) Variable Read-only
string Unit: CZK json_path

Swiss Franc (CHF)

Read
PARSEJSON(responsejson, "$.rates[25].rate");
Indonesian Rupiah (IDR) Variable Read-only

Rate per 1000 IDR

string Unit: CZK json_path

Indonesian Rupiah (IDR)

Read
PARSEJSON(responsejson, "$.rates[8].rate");
Israeli Shekel (ILS) Variable Read-only
string Unit: CZK json_path

Israeli Shekel (ILS)

Read
PARSEJSON(responsejson, "$.rates[10].rate");
Indian Rupee (INR) Variable Read-only

Rate per 100 INR

string Unit: CZK json_path

Indian Rupee (INR)

Read
PARSEJSON(responsejson, "$.rates[7].rate");
Icelandic Krona (ISK) Variable Read-only

Rate per 100 ISK

string Unit: CZK json_path

Icelandic Krona (ISK)

Read
PARSEJSON(responsejson, "$.rates[9].rate");
Japanese Yen (JPY) Variable Read-only

Rate per 100 JPY

string Unit: CZK json_path

Japanese Yen (JPY)

Read
PARSEJSON(responsejson, "$.rates[11].rate");
South Korean Won (KRW) Variable Read-only

Rate per 100 KRW

string Unit: CZK json_path

South Korean Won (KRW)

Read
PARSEJSON(responsejson, "$.rates[14].rate");
Mexican Peso (MXN) Variable Read-only
string Unit: CZK json_path

Mexican Peso (MXN)

Read
PARSEJSON(responsejson, "$.rates[17].rate");
Malaysian Ringgit (MYR) Variable Read-only
string Unit: CZK json_path

Malaysian Ringgit (MYR)

Read
PARSEJSON(responsejson, "$.rates[16].rate");
Norwegian Krone (NOK) Variable Read-only
string Unit: CZK json_path

Norwegian Krone (NOK)

Read
PARSEJSON(responsejson, "$.rates[19].rate");
New Zealand Dollar (NZD) Variable Read-only
string Unit: CZK json_path

New Zealand Dollar (NZD)

Read
PARSEJSON(responsejson, "$.rates[20].rate");
Philippine Peso (PHP) Variable Read-only

Rate per 100 PHP

string Unit: CZK json_path

Philippine Peso (PHP)

Read
PARSEJSON(responsejson, "$.rates[5].rate");
Polish Zloty (PLN) Variable Read-only
string Unit: CZK json_path

Polish Zloty (PLN)

Read
PARSEJSON(responsejson, "$.rates[21].rate");
Romanian Leu (RON) Variable Read-only
string Unit: CZK json_path

Romanian Leu (RON)

Read
PARSEJSON(responsejson, "$.rates[22].rate");
Swedish Krona (SEK) Variable Read-only
string Unit: CZK json_path

Swedish Krona (SEK)

Read
PARSEJSON(responsejson, "$.rates[24].rate");
Singapore Dollar (SGD) Variable Read-only
string Unit: CZK json_path

Singapore Dollar (SGD)

Read
PARSEJSON(responsejson, "$.rates[23].rate");
Thai Baht (THB) Variable Read-only

Rate per 100 THB

string Unit: CZK json_path

Thai Baht (THB)

Read
PARSEJSON(responsejson, "$.rates[26].rate");
Turkish Lira (TRY) Variable Read-only

Rate per 100 TRY

string Unit: CZK json_path

Turkish Lira (TRY)

Read
PARSEJSON(responsejson, "$.rates[27].rate");
US Dollar (USD) Variable Read-only
string Unit: CZK json_path

US Dollar (USD)

Read
PARSEJSON(responsejson, "$.rates[28].rate");
IMF SDR (XDR) Variable Read-only

IMF Special Drawing Rights — composite reserve asset

string Unit: CZK json_path

IMF SDR (XDR)

Read
PARSEJSON(responsejson, "$.rates[18].rate");
South African Rand (ZAR) Variable Read-only
string Unit: CZK json_path

South African Rand (ZAR)

Read
PARSEJSON(responsejson, "$.rates[12].rate");
Connection: Packet Parser → HTTP

Sources

  • CNB API — OpenAPI Specification
    api.cnb.cz 2026-03-28
  • CNB Exchange Rate Format & Currency List
    www.cnb.cz 2026-03-28