Expand description
§cik
cik
provides a CIK
type for working with validated (syntax only)
Central Index Keys (CIKs) as defined in the
U.S. Securities and Exchange Commission’s (SEC)
Electronic Data Gathering, Analysis, and Retrieval system (EDGAR)
documentation.
A CIK is a number of up to 10 digits length. They are sometimes rendered as strings with or without leading zeros, and sometimes are represented as integers of a sufficient number of bits to represent a 10-digit number (typically 64 bits because the maximum CIK value is 9,999,999,999 and the maximum value of a signed 32-bit integer is only 2,147,483,64; and the maximum value of an unsigned 32-bit integer is still to low at 4,294,967,295).
As of 2022-05-29 the “Company Facts” data set’s minimum CIK value is 1,750 and the maximum is 1,923,807. See the “Bulk data” section on the SEC’s EDGAR Application Programming Interfaces page for more information on this data set. Such values fit comfortably in 7 decimal digits or 32 bits (signed or unsigned), so you might encounter CIKs stored in values of less than 64 bits.
Nonetheless, this library uses 64-bit values to ensure full conformance with the CIK definition of up to 10 decimal digits.
§Optional features
This crate provides optional features for extended functionality:
serde
- Enables serialization and deserialization via serde. CIK values serialize as integers and can deserialize from integers or strings.schemars
- Enables JSON Schema generation via schemars. Generates schemas that accept both integer and string representations.
§Related crates
This crate is part of the Financial Identifiers series:
Re-exports§
pub use error::CIKError;
Modules§
- error
- cik::error
Structs§
- CIK
- A CIK in confirmed valid format.
Functions§
- build
- Build a CIK from an integer Value.
- parse
- Parse a string to a valid CIK or an error message, requiring the string to already be only digits with no leading or trailing whitespace in addition to being the right length and format.
- validate
- Test whether or not the passed string is in valid CIK format, without producing a CIK struct value.