curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

CUSIP check API

Check the length and check digit of a CUSIP and split it into issuer, issue and check digit.

POST https://api.curatedapi.com/v1/calc/check/cusip

Checks a nine-character CUSIP, the identifier of US and Canadian securities: six characters for the issuer, two for the issue and a check digit worked out with the CUSIP form of the Luhn rule (the 'modulus 10 double-add-double' method).

Formula

value each character (digits as they are, A = 10 … Z = 35, * = 36, @ = 37, # = 38), double every second value, add the digits of all values; check digit = (10 − total mod 10) mod 10
  • The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.

Inputs

Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).

InputTypeDescription
number required string The nine-character CUSIP. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters.

Result

Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.

ResultTypeDescription
validbooleanWhether the CUSIP passes every check.
normalizedstringThe number as it was checked: separators removed, letters in upper case.
problemstringWhat is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number.
messagestringThe result in a sentence, naming the rule that failed.
issuerstringCharacters 1 to 6.
issuestringCharacters 7 and 8.
check_digitstringThe ninth character.
expected_check_digitstringThe check digit the first eight characters give.

Examples

Apple Inc. common stock

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/cusip \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "037833100"
  }'
200 OKResponse
{
  "calculator": "check/cusip@1",
  "result": {
    "valid": true,
    "normalized": "037833100",
    "message": "A well-formed CUSIP.",
    "issuer": "037833",
    "issue": "10",
    "check_digit": "0",
    "expected_check_digit": "0"
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "037833100"
  },
  "formula": "value each character (digits as they are, A = 10 … Z = 35, * = 36, @ = 37, # = 38), double every second value, add the digits of all values; check digit = (10 − total mod 10) mod 10",
  "references": [
    {
      "title": "CUSIP Global Services: about CUSIP identifiers",
      "url": "https://www.cusip.com/identifiers.html"
    },
    {
      "title": "CUSIP: check digit calculation",
      "url": "https://en.wikipedia.org/wiki/CUSIP"
    }
  ],
  "warnings": []
}

Wrong check digit

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/cusip \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "037833108"
  }'
200 OKResponse
{
  "calculator": "check/cusip@1",
  "result": {
    "valid": false,
    "normalized": "037833108",
    "problem": "CHECK_DIGIT",
    "message": "The check digit is 8, but the first eight characters give 0.",
    "issuer": "037833",
    "issue": "10",
    "check_digit": "8",
    "expected_check_digit": "0"
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "037833108"
  },
  "formula": "value each character (digits as they are, A = 10 … Z = 35, * = 36, @ = 37, # = 38), double every second value, add the digits of all values; check digit = (10 − total mod 10) mod 10",
  "references": [
    {
      "title": "CUSIP Global Services: about CUSIP identifiers",
      "url": "https://www.cusip.com/identifiers.html"
    },
    {
      "title": "CUSIP: check digit calculation",
      "url": "https://en.wikipedia.org/wiki/CUSIP"
    }
  ],
  "warnings": []
}

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.