marekskopal / openfigi
OpenFIGI API client library
v1.0.0
2026-03-10 17:43 UTC
Requires
- php: >=8.3
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
Requires (Dev)
- php-http/guzzle7-adapter: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^12.3
- shipmonk/phpstan-rules: ^4.3
- slevomat/coding-standard: ^8.14
- spatie/ray: ^1.39
Suggests
- nyholm/psr7: PSR-7 message implementation
- symfony/http-client: HTTP client
README
Unofficial PHP API client library for the OpenFIGI API service.
Install
composer require marekskopal/openfigi
Usage
use MarekSkopal\OpenFigi\Config\Config; use MarekSkopal\OpenFigi\Dto\MappingJob; use MarekSkopal\OpenFigi\Enum\IdTypeEnum; use MarekSkopal\OpenFigi\OpenFigi; // Create OpenFigi instance $openFigi = new OpenFigi(new Config(apiKey: '<yourApiKey>')); // Map a single ticker to FIGI $mappingJob = new MappingJob(idType: IdTypeEnum::Ticker, idValue: 'AAPL'); $mappingResults = $openFigi->mapping([$mappingJob]); // Search for securities $searchResult = $openFigi->search(query: 'Apple'); // Filter securities $filterResult = $openFigi->filter(exchCode: 'US', securityType: 'Common Stock'); // Get allowed values for a mapping key $values = $openFigi->values(MappingValuesKeyEnum::ExchCode);
Covered endpoints
- Mapping ✅
- Search ✅
- Filter ✅
- Values ✅
Notice
This is NOT an official OpenFIGI library, and the authors of this library are not affiliated with OpenFIGI or Bloomberg Finance L.P. in any way, shape or form.
Contributing
If you want to contribute, feel free to submit a pull request.