py-openfigi
Python client for the OpenFIGI API — map ISINs, tickers, CUSIPs and other identifiers to FIGI codes, and search or filter securities.
Installation
Requires Python 3.14+.
pip install py-openfigi
Usage
Python API
from openfigi import OpenFIGIDataSource, MappingJob, IdType
ds = OpenFIGIDataSource() # set OPENFIGI_API_KEY env var for higher rate limits
# Resolve by ISIN
security = ds.resolve_query(isin="US0378331005")
# Bulk map identifiers
results = ds.map_identifiers([
MappingJob(idType=IdType.ID_ISIN, idValue="US0378331005"),
MappingJob(idType=IdType.TICKER, idValue="AAPL", exchCode="US"),
])
# Search by keyword
items = ds.search("Apple")
CLI
openfigi lookup --isin US0378331005
openfigi lookup --symbol AAPL --exchange US --format json
openfigi lookup --desc "Apple" --limit 5
openfigi manifest # every command, flag and exit code, for agents
The CLI is built on treaty: output is a JSON envelope when stdout is not a terminal, and failures exit with a typed code:
| Exit | Code | Meaning |
|---|---|---|
| 2 | ARG_ERROR |
Invalid arguments; nothing was sent |
| 5 | NOT_FOUND |
No security matches |
| 8 | AUTH_REQUIRED |
OPENFIGI_API_KEY was rejected |
| 10 | TIMEOUT |
OpenFIGI did not answer in time |
| 11 | RATE_LIMITED |
Rate limit exceeded; retry after error.retry_after_ms |
| 12 | UNAVAILABLE |
OpenFIGI unreachable or returned HTTP 5xx |
Configuration
| Env var | Description |
|---|---|
OPENFIGI_API_KEY |
Optional API key for higher rate limits |
License
MIT
Metadata
Release files for py-openfigi2 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_openfigi2-0.2.0.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_openfigi2-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / py_openfigi2-0.2.0.tar.gz
| Download URL | py_openfigi2-0.2.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d027fa2df8590c6cfedd648b883a382bba26e283802e7f08864f84f9dd7d1c9
|
|
BLAKE2b-256 checksum How to use checksums |
3913b6b7d6dd3daf582c0452c1ea05a98408b58185e222272a94311f4d293c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / py_openfigi2-0.2.0-py3-none-any.whl
| Download URL | py_openfigi2-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8ab63d53d13aca12a0d6b3f0734ccde85a771fd59eade077b75bdb55802d71c
|
|
BLAKE2b-256 checksum How to use checksums |
6e1634188700cd66c1fded00cb45c7bffd2d0bfbe43b95663e5f8d4c4f1f79ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|