Skip to content

johnzuk/php-nbp-api

Repository files navigation

A PHP wrapper to be used with NBP (Narodowy Bank Polski) API.

Installation

Via composer

composer require john_zuk/php-nbp-api guzzlehttp/guzzle:^7.2 http-interop/http-factory-guzzle:^1.0

Example API Usage

require_once 'vendor/autoload.php';

$client = new \NBP\Client();

$usd = $client->rates()->code('a', 'usd');

echo $usd['rates'][0]['mid'];
php doc/example.php