stdnum.cfi

CFI (ISO 10962 Classification of Financial Instruments).

The CFI is a 6-character code used to classify financial instruments. It is issued alongside an ISIN and describes category such as equity or future and category-specific properties such as underlying asset type or payment status.

More information:

>>> validate('ELNUFR')
'ELNUFR'
>>> validate('ELNUFQ')
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> import json
>>> print(json.dumps(info('ELNUFR'), indent=2, sort_keys=True))
{
  "Form": "Registered",
  "Ownership/transfer/sales restrictions": "Free",
  "Payment status": "Fully paid",
  "Voting right": "Non-voting",
  "category": "Equities",
  "group": "Limited partnership units"
}
stdnum.cfi.compact(number)

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

stdnum.cfi.info(number)

Look up information about the number.

stdnum.cfi.is_valid(number)

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

stdnum.cfi.validate(number)

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