PHP Classes
elePHPant
Icontem

NBU API: Get data of exchange rates and banks from Ukraine

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-10-16 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
nbu-api 1.0.0Custom (specified...5PHP 5, Web services, Finances
Description Author
This package is specific mainly for applications used in Ukraine Ukraine .

This package can get data of exchange rates and banks from Ukraine.

It can send HTTP requests to the Web server of the National Bank of Ukraine API to perform several types of operations.

Currently it can get the current exchange rate between the Ukraine currency (UAH) to other currencies, metal exchange rates, as well information about the banks in Ukraine.

  Performance   Level  
Name: Slava Striletskyi <contact>
Classes: 2 packages by
Country: Ukraine Ukraine
Innovation award
Innovation award
Nominee: 1x

Details

NBU-API

Classes for working with National Bank of Ukraine API. Currently class can get information about banks and current exchange UAH to foreign currencies and banking metals.

<h3>Example</h3> <pre>

require_once "NBU_API.php";<br>
require_once "JSON_NBU_API.php";<br>
require_once "XML_NBU_API.php";<br>
<br>
$jsonNbuAPI = new JSON_NBU_API();<br>
$xmlNbuAPI = new XML_NBU_API();<br>
<br>
print_r( $xmlNbuAPI->getExchanges( array( 'valcode' => 'USD' ) ) );<br>
<br>
print_r( $jsonNbuAPI->getBanks( array( 'typ' => 6 ), false ) );<br>
<br>

</pre>

<h3>Answers</h3> <pre> SimpleXMLElement Object (

[currency] => SimpleXMLElement Object
    (
        [r030] => 840
        [txt] => ????? ???
        [rate] => 27.928166
        [cc] => USD
        [exchangedate] => 16.10.2018
    )

) [ { "GLMFO":322313,"N_GOL":"?? "????????????"","NAME_E":null,"KOD_EDRPOU":null,"SHORTNAME":"?????????????? ?? "????????????" ? ????? ???????, ??","NKB":"002","TYP":"6","KU":"0","N_OBL":"?? ?????????","DEPCODE":"00226826626205000000","P_IND":null,"TNP":"?.","NP":"??????","ADRESS":"Juxon ?ouse 100 St. Paul's Churchyard, London EC4M 8BU, United Kingdom","KODT":null,"TELEFON":null,"KSTAN":"1","N_STAN":"??????????","D_STAN":"09.09.2006","D_OPEN":"25.05.2006","D_CLOSE":null,"STAN_GOL":"1","NSTAN_GOL":"??????????" } ,{ "GLMFO":322313,"N_GOL":"?? "????????????"","NAME_E":null,"KOD_EDRPOU":null,"SHORTNAME":"?????????????? ?? "?????????????" ? ?.???-?????, ???","NKB":"002","TYP":"6","KU":"0","N_OBL":"?? ?????????","DEPCODE":"00226840626205000000","P_IND":null,"TNP":"?.","NP":"???-????","ADRESS":"14 WALL STREET, 20th FLOOR,NEW YORK, NY 10005,USA","KODT":null,"TELEFON":null,"KSTAN":"1","N_STAN":"??????????","D_STAN":null,"D_OPEN":"10.10.2007","D_CLOSE":null,"STAN_GOL":"1","NSTAN_GOL":"??????????" } ,{ "GLMFO":334851,"N_GOL":"??? "????"","NAME_E":null,"KOD_EDRPOU":null,"SHORTNAME":"?????????????? ???? ? ?.??????","NKB":"115","TYP":"6","KU":"0","N_OBL":"?? ?????????","DEPCODE":"11526826626747000001","P_IND":null,"TNP":"?.","NP":"??????","ADRESS":"100 Pall Mall, office 19. St.James's, SW1Y 5HP","KODT":"(44)","TELEFON":"2073213900","KSTAN":"5","N_STAN":"????????? ??????????? ??????????","D_STAN":null,"D_OPEN":"15.01.2003","D_CLOSE":null,"STAN_GOL":"1","NSTAN_GOL":"??????????" } ] </pre>

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Aux. Auxiliary script
Accessible without login Plain text file index.php Example Example script
Plain text file JSON_NBU_API.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Plain text file NBU_API.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation
Plain text file XML_NBU_API.php Class Class source

 Version Control Unique User Downloads  
 100%
Total:0
This week:0