BYTETOOLS

Danmarks Nationalbank API

Free Danmarks Nationalbank exchange rate feed with no key: official DKK rates for every quoted currency as XML, quoted per 100 units. Tested example and live response.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the Danmarks Nationalbank API?

Danmarks Nationalbank publishes its official Danish krone exchange rates as a free XML feed with no key or registration. Every rate is quoted as kroner per 100 units of the foreign currency, with the reference date as an attribute.

This is a small, old-fashioned feed and none the worse for it: one HTTP request, one compact XML document, every quoted currency inside. There is no pagination, no envelope and no versioning to track. If you need Danish official rates in a build script or a nightly job, this is about as little machinery as an integration can involve.

The one thing that will burn you is the quotation basis. Every rate is quoted **per 100 units** of the foreign currency, so the Australian dollar comes back as roughly 454.79 — that is 454.79 kroner per 100 AUD, not per one, and the euro's 747.58 is the familiar 7.4758 peg. Nothing in the document announces the divisor: `refcur` and `refamt` describe the reference side (one krone), not the quotation basis. The per-100 convention is uniform across every currency in the file, including the tiny ones like the rupiah, so divide by 100 unconditionally.

Quick facts

Base URL
https://www.nationalbanken.dk/api
Authentication
No key or registration required.
Rate limit
No documented limit. Rates are published once per working day at around 16:00 Copenhagen time.
Pricing
Free.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Danmarks Nationalbank API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Official DKK rates for every quoted currency

GET https://www.nationalbanken.dk/api/currencyratesxml?lang=en

curl
curl 'https://www.nationalbanken.dk/api/currencyratesxml?lang=en'
JavaScript (fetch)
const res = await fetch("https://www.nationalbanken.dk/api/currencyratesxml?lang=en");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.nationalbanken.dk/api/currencyratesxml?lang=en", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
<?xml version="1.0" encoding="utf-8"?><exchangerates type="Exchange rates" author="Danmarks Nationalbank" refcur="DKK" refamt="1"><dailyrates id="2026-08-20"><currency code="AUD" desc="Australian dollars" rate="454.79" /><currency code="BRL" desc="Brazilian real" rate="123.23" /><currency code="CAD" desc="Canadian dollars" rate="464.77" /><currency code="CNY" desc="Chinese yuan renminbi" rate="

Parameters

ParameterTypeRequiredDescription
langqueryOptional`en` or `da`, controlling the `desc` attribute on each currency. en

Response fields

exchangerates@refcur / @refamtattribute
The reference side of the quote — one Danish krone. These do **not** give the divisor for the rates.
dailyrates@idattribute
The date the rates apply to, in ISO form.
currency@codeattribute
ISO 4217 code for the quoted currency.
currency@rateattribute
Kroner per **100 units** of the quoted currency, as a string with a dot decimal separator. Divide by 100 for a per-unit rate.
currency@descattribute
Human-readable currency name in the requested language.

What you can build with the Danmarks Nationalbank API

  • Convert amounts to kroner for Danish invoicing and bookkeeping
  • Feed official DKK rates into a nightly reporting job with a single request
  • Cross-check a payment provider's applied rate against the official publication
  • Build a static rates table for a Danish e-commerce site

Common errors and how to fix them

Rates look 100x too high

The per-100 quotation basis was not applied.

Fix: Divide every `rate` by 100. Do not take the divisor from `refamt` — that attribute describes the krone side of the quote and is 1.

XML parse error on the first byte

The document starts with a UTF-8 byte order mark.

Fix: Strip the BOM or use a parser that tolerates it; several strict XML libraries reject the document otherwise.

Yesterday's date in `dailyrates@id`

The current day's rates have not been published yet.

Fix: Rates appear in the late afternoon Copenhagen time. Treat the `id` attribute as authoritative rather than assuming it is today.

Danmarks Nationalbank API — frequently asked questions

Is the Danmarks Nationalbank exchange rate feed free?

Yes. It requires no key, no account and no attribution agreement, and returns every quoted currency in one small XML document.

Why is the Australian dollar rate over 400?

Because Danmarks Nationalbank quotes per 100 units of the foreign currency, so 454.79 means 454.79 kroner per 100 Australian dollars. The convention applies to every currency in the file and is not stated in the document, so divide by 100 unconditionally.

Is there a JSON version?

Not from the bank itself — the official feed is XML only. Convert it once in your own layer, which also gives you somewhere to apply the per-100 division consistently.

How is the Danish krone rate against the euro set?

Denmark operates a fixed-rate policy against the euro within a narrow band, so the DKK/EUR rate moves very little. The other currencies in the feed float normally.

Tools that pair with this API

Danmarks Nationalbank is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.