This is an exchange data provider for Peso that retrieves data from the Hungarian National Bank (Magyar Nemzeti Bank).
composer require peso/mnb-serviceInstall the service with all recommended dependencies:
composer install peso/mnb-service symfony/cacheThis library also requires soap extension.
<?phpusePeso\Peso\CurrencyConverter;
usePeso\Services\HungarianNationalBankService;
useSymfony\Component\Cache\Adapter\FilesystemAdapter;
useSymfony\Component\Cache\Psr16Cache;
require__DIR__ . '/vendor/autoload.php';
$cache = newPsr16Cache(newFilesystemAdapter(directory: __DIR__ . '/cache'));
$service = newHungarianNationalBankService($cache);
$converter = newCurrencyConverter($service);Read the full documentation here: https://phpeso.org/v1.x/services/mnb.html
Please file issues on our main repo at GitHub: https://github.com/phpeso/mnb-service/issues
The library is available as open source under the terms of the MIT License.