Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 709 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 709 Bytes

CnbApi

ČNB exchange rates

Requirements

CnbApi requires PHP 5.3.1 or higher with cUrl extension and Valerian\Curl.

Getting Started

$request = new Valerian\CnbApi\CnbRequest();

//Actual data
$response = $request->get();

//Data for selected day
$date = new \DateTime();
$date->modify("last day of previous month");
$response = $request->get($date);

//Get all downloaded currencies
var_dump($response->getCurrencies());

//Bank identification
var_dump($response->getBank());

//ČNB last change date
var_dump($response->getDate());

//ČNB order number
var_dump($response->getOrder());

//Exchange rate for EUR
var_dump($response->getCurrency("EUR")->getRate());