# Figi validate

`figi-validate` · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a 12-character FIGI's structure, forbidden-prefix rule and Modulus 10 Double Add Double check digit.

**Use when you need to: validate a figi · check figi check digit · is this figi valid.**

## Decide before calling

Read the [versioned contract](/v1/tools/figi-validate/versions/1.0.0) and the supported scope below. Reuse `figi-validate@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `figi-validate@1.0.0` for validate a figi. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- validate a figi
- check figi check digit
- is this figi valid
- figi checksum validator
- parse figi provider prefix
- verify bloomberg global identifier
- which prefixes are banned in a figi

## Not supported

- looking up which instrument a FIGI actually identifies
- validating a CUSIP (a different 8-character byte-level Double Add Double, see cusip-validate)
- accepting vowels anywhere in the FIGI body

## Behavior

- figi must be exactly 12 characters: no case folding, no trimming. Any other length is reason wrong_length, checked first.
- prefix (characters 1-2) and check_digit (character 12) are the raw positional substrings whenever figi is exactly 12 characters, regardless of charset, forbidden-prefix or check-digit validity; both are null only when length already failed.
- Position 3 must be exactly "G". Characters 1-2 must each be an uppercase consonant (never a vowel, never a digit). Characters 4-11 must each be a digit or an uppercase consonant. Character 12 must be a digit, else reason invalid_character.
- prefix must not be one of BS, BM, GG, GB, GH, KY, VG (reserved to avoid confusion with country codes), else reason forbidden_prefix, checked once charset passes.
- Check digit (Modulus 10 Double Add Double over characters 1-11): a digit is itself, a letter is 10-35; double the value at even 1-based positions (2,4,6,8,10); reduce by summing its own two digits; sum the 11 results; expected check digit is (10 - sum mod 10) mod 10. A mismatch is reason check_digit_mismatch.
- valid is true only when length, charset, the forbidden-prefix rule and the check digit all pass, in that order; only one reason is ever returned.

## Input

- `figi` (string, required): min length 1; max length 12

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "forbidden_prefix", "check_digit_mismatch", required)
- `prefix` (string or null, required): min length 2; max length 2
- `check_digit` (string or null, required): min length 1; max length 1

## Limits

- max figi bytes: 12

## Example

Request input:

```json
{
  "figi": "BBG000BLNNH6"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "prefix": "BB",
    "check_digit": "6"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "figi-validate",
  "version": "1.0.0",
  "input": {
    "figi": "BBG000BLNNH6"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/figi-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"figi":"BBG000BLNNH6"}'
```

The machine-readable contract is at [/v1/tools/figi-validate/versions/1.0.0](/v1/tools/figi-validate/versions/1.0.0).

### CLI

```sh
node cli.mjs run figi-validate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Ismn validate](/tools/ismn-validate): Validate an ISMN's EAN mod 10 check digit in M-form or 979-0 form and return the canonical 13-digit form.
- [Lei validate](/tools/lei-validate): Validate a 20-character LEI's ISO/IEC 7064 MOD 97-10 check digits and parse its LOU prefix and entity part.
- [Isin validate](/tools/isin-validate): Validate a 12-character ISIN's ISO 6166 Luhn check digit and parse its country prefix, NSIN and NSIN scheme.
- [Orcid validate](/tools/orcid-validate): Validate a 16-digit ORCID iD or ISNI's ISO 7064 MOD 11-2 check character, accepting bare, grouped or URL forms.
- [Sedol validate](/tools/sedol-validate): Validate a 7-character SEDOL's weighted modulus 10 check digit and report whether it is a legacy all-numeric code.
- [Cas number validate](/tools/cas-number-validate): Validate a CAS Registry Number's position-weighted mod 10 check digit over its variable-length first segment.
