stdnum.de.wkn

Wertpapierkennnummer (German securities identification code).

The WKN, WPKN, WPK (Wertpapierkennnummer) is a German code to identify securities. It is a 6-digit alphanumeric number without a check digit that no longer has any structure. It is expected to be replaced by the ISIN.

>>> validate('A0MNRK')
'A0MNRK'
>>> validate('AOMNRK')  # no capital o allowed
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> to_isin('SKWM02')
'DE000SKWM021'
stdnum.de.wkn.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.de.wkn.is_valid(number)

Check if the number provided is valid. This checks the length and check digit.

stdnum.de.wkn.to_isin(number)

Convert the number to an ISIN.

stdnum.de.wkn.validate(number)

Check if the number provided is valid. This checks the length and check digit.