NBRB API v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
NBRB API.
Base URLs:
Public
GET /banks
Code samples
curl -X GET https://api.nbrb.by/banks \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Api-Version: 1.0.0' \
-H 'Accept: application/json'
GET https://api.nbrb.by/banks HTTP/1.1
Host : api.nbrb.by
Accept : application/json
Accept : application/json
Content-Type : application/json
X-Api-Version : 1.0.0
var headers = {
'Accept' :'application/json' ,
'Content-Type' :'application/json' ,
'X-Api-Version' :'1.0.0' ,
'Accept' :'application/json'
};
$.ajax({
url : 'https://api.nbrb.by/banks' ,
method : 'get' ,
headers : headers,
success : function (data ) {
console .log(JSON .stringify(data));
}
})
const request = require ('node-fetch' );
const headers = {
'Accept' :'application/json' ,
'Content-Type' :'application/json' ,
'X-Api-Version' :'1.0.0' ,
'Accept' :'application/json'
};
fetch('https://api.nbrb.by/banks' ,
{
method : 'GET' ,
headers : headers
})
.then(function (res ) {
return res.json();
}).then(function (body ) {
console .log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'Content-Type' => 'application/json' ,
'X-Api-Version' => '1.0.0' ,
'Accept' => 'application/json'
}
result = RestClient.get 'https://api.nbrb.by/banks' ,
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept' : 'application/json' ,
'Content-Type' : 'application/json' ,
'X-Api-Version' : '1.0.0' ,
'Accept' : 'application/json'
}
r = requests.get('https://api.nbrb.by/banks' , params={
}, headers = headers)
print r.json()
URL obj = new URL("https://api.nbrb.by/banks" );
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET" );
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null ) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Banks
Bank.
Parameters
Parameter
In
Type
Required
Description
Accept
header
string
false
Accept response body content type (default application/json).
Content-Type
header
string
false
Request body content type (default application/json).
X-Api-Version
header
string
false
API version (default latest).
lang
query
string(iso-639-1)
false
Language of text data (default belarusan).
Enumerated Values
Parameter
Value
Accept
application/json
Content-Type
application/json
lang
be
lang
ru
lang
en-US
Example responses
{
"items" : [
{
"type" : "Bank" ,
"handle" : "nbrb" ,
"name" : "NBRB" ,
"full_name" : "National Bank of the Republic of Belarus" ,
"bic" : "IRJSBY22" ,
"unp" : "string" ,
"okpo" : "string" ,
"swift" : "NBRB BY2X" ,
"address" : {
"country" : "BY" ,
"state" : "Minsk" ,
"city" : "Minsk" ,
"line" : "praspiekt Niezaliežnasci, 20" ,
"postcode" : "220008"
},
"phone" : "+375173060002" ,
"fax" : "+375173274879" ,
"telex" : "252449 BELAR BY" ,
"email" : "info@nbrb.by" ,
"website" : "https://nbrb.by/" ,
"presedent" : "string" ,
"registration_number" : "1" ,
"registration_date" : "1991-01-01"
}
]
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
Responses
This operation does not require authentication
GET /currencies
Code samples
curl -X GET https://api.nbrb.by/currencies \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Api-Version: 1.0.0' \
-H 'Accept: application/json'
GET https://api.nbrb.by/currencies HTTP/1.1
Host : api.nbrb.by
Accept : application/json
Accept : application/json
Content-Type : application/json
X-Api-Version : 1.0.0
var headers = {
'Accept' :'application/json' ,
'Content-Type' :'application/json' ,
'X-Api-Version' :'1.0.0' ,
'Accept' :'application/json'
};
$.ajax({
url : 'https://api.nbrb.by/currencies' ,
method : 'get' ,
headers : headers,
success : function (data ) {
console .log(JSON .stringify(data));
}
})
const request = require ('node-fetch' );
const headers = {
'Accept' :'application/json' ,
'Content-Type' :'application/json' ,
'X-Api-Version' :'1.0.0' ,
'Accept' :'application/json'
};
fetch('https://api.nbrb.by/currencies' ,
{
method : 'GET' ,
headers : headers
})
.then(function (res ) {
return res.json();
}).then(function (body ) {
console .log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'Content-Type' => 'application/json' ,
'X-Api-Version' => '1.0.0' ,
'Accept' => 'application/json'
}
result = RestClient.get 'https://api.nbrb.by/currencies' ,
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept' : 'application/json' ,
'Content-Type' : 'application/json' ,
'X-Api-Version' : '1.0.0' ,
'Accept' : 'application/json'
}
r = requests.get('https://api.nbrb.by/currencies' , params={
}, headers = headers)
print r.json()
URL obj = new URL("https://api.nbrb.by/currencies" );
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET" );
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null ) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Currencies
Currencies.
Parameters
Parameter
In
Type
Required
Description
Accept
header
string
false
Accept response body content type (default application/json).
Content-Type
header
string
false
Request body content type (default application/json).
X-Api-Version
header
string
false
API version (default latest).
lang
query
string(iso-639-1)(iso-639-1)
false
Language of text data (default belarusan).
at
query
dateTime
false
Currancy rate at specific date. Current time used by default.
Enumerated Values
Parameter
Value
Accept
application/json
Content-Type
application/json
lang
be
lang
ru
lang
en-US
Example responses
{
"items" : [
{
"type" : "CurrencyRate" ,
"currency_from" : "EUR" ,
"currency_from_name" : "Euro" ,
"currency_to" : "BYN" ,
"currency_to_name" : "Belarusian ruble" ,
"exchange_rate" : "2.3676"
}
]
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
Responses
This operation does not require authentication
Schemas
PostalAddress
{
"country" : "BY" ,
"state" : "Minsk" ,
"city" : "Minsk" ,
"line" : "praspiekt Niezaliežnasci, 20" ,
"postcode" : "220008"
}
Properties
Name
Type
Required
Description
country
string(iso-3166-1)
true
Country code.
state
string
true
State (localisation).
city
string
true
City (localisation).
line
string
true
Address (localisation).
postcode
string
false
Postcode.
Bank
{
"type" : "Bank" ,
"handle" : "nbrb" ,
"name" : "NBRB" ,
"full_name" : "National Bank of the Republic of Belarus" ,
"bic" : "IRJSBY22" ,
"unp" : "string" ,
"okpo" : "string" ,
"swift" : "NBRB BY2X" ,
"address" : {
"country" : "BY" ,
"state" : "Minsk" ,
"city" : "Minsk" ,
"line" : "praspiekt Niezaliežnasci, 20" ,
"postcode" : "220008"
},
"phone" : "+375173060002" ,
"fax" : "+375173274879" ,
"telex" : "252449 BELAR BY" ,
"email" : "info@nbrb.by" ,
"website" : "https://nbrb.by/" ,
"presedent" : "string" ,
"registration_number" : "1" ,
"registration_date" : "1991-01-01"
}
Properties
Name
Type
Required
Description
type
string
false
Type Bank.
handle
string
false
Unique identifier of bank.
name
string
false
Short bank name (localisation).
full_name
string
false
Full bank name (localisation).
bic
string
false
Bank BIC
unp
string
false
Bank UNP
okpo
string
false
Bank OKPO
swift
string
false
Bank S.W.I.F.T.
address
PostalAddress
false
No description
» country
string(iso-3166-1)
true
Country code.
» state
string
true
State (localisation).
» city
string
true
City (localisation).
» line
string
true
Address (localisation).
» postcode
string
false
Postcode.
phone
string(phone)
false
Bank phone.
fax
string(phone)
false
Bank fax.
telex
string
false
Bank telex.
email
string(email)
false
Bank email.
website
string(uri)
false
Bank web site (localisation).
presedent
string
false
Bank president (localisation).
registration_number
string
false
Registration number.
registration_date
date
false
Registration date.
BankList
{
"items" : [
{
"type" : "Bank" ,
"handle" : "nbrb" ,
"name" : "NBRB" ,
"full_name" : "National Bank of the Republic of Belarus" ,
"bic" : "IRJSBY22" ,
"unp" : "string" ,
"okpo" : "string" ,
"swift" : "NBRB BY2X" ,
"address" : {
"country" : "BY" ,
"state" : "Minsk" ,
"city" : "Minsk" ,
"line" : "praspiekt Niezaliežnasci, 20" ,
"postcode" : "220008"
},
"phone" : "+375173060002" ,
"fax" : "+375173274879" ,
"telex" : "252449 BELAR BY" ,
"email" : "info@nbrb.by" ,
"website" : "https://nbrb.by/" ,
"presedent" : "string" ,
"registration_number" : "1" ,
"registration_date" : "1991-01-01"
}
]
}
Properties
Name
Type
Required
Description
items
[Bank ]
false
Contains the list of banks.
» type
string
false
Type Bank.
» handle
string
false
Unique identifier of bank.
» name
string
false
Short bank name (localisation).
» full_name
string
false
Full bank name (localisation).
» bic
string
false
Bank BIC
» unp
string
false
Bank UNP
» okpo
string
false
Bank OKPO
» swift
string
false
Bank S.W.I.F.T.
» address
PostalAddress
false
No description
»» country
string(iso-3166-1)
true
Country code.
»» state
string
true
State (localisation).
»» city
string
true
City (localisation).
»» line
string
true
Address (localisation).
»» postcode
string
false
Postcode.
» phone
string(phone)
false
Bank phone.
» fax
string(phone)
false
Bank fax.
» telex
string
false
Bank telex.
» email
string(email)
false
Bank email.
» website
string(uri)
false
Bank web site (localisation).
» presedent
string
false
Bank president (localisation).
» registration_number
string
false
Registration number.
» registration_date
date
false
Registration date.
CurrencyRate
{
"type" : "CurrencyRate" ,
"currency_from" : "EUR" ,
"currency_from_name" : "Euro" ,
"currency_to" : "BYN" ,
"currency_to_name" : "Belarusian ruble" ,
"exchange_rate" : "2.3676"
}
Properties
Name
Type
Required
Description
type
string
false
Type CurrencyRate.
currency_from
string(iso-4217)
false
Currency ISO 4217 code.
currency_from_name
string
false
Currency name (localisation).
currency_to
string(iso-4217)
false
Currency ISO 4217 code.
currency_to_name
string
false
Currency name (localisation).
exchange_rate
string(decimal)
false
Currency echange rate.
CurrencyRateList
{
"items" : [
{
"type" : "CurrencyRate" ,
"currency_from" : "EUR" ,
"currency_from_name" : "Euro" ,
"currency_to" : "BYN" ,
"currency_to_name" : "Belarusian ruble" ,
"exchange_rate" : "2.3676"
}
]
}
Properties
Name
Type
Required
Description
items
[CurrencyRate ]
false
Contains the list of currencies.
» type
string
false
Type CurrencyRate.
» currency_from
string(iso-4217)
false
Currency ISO 4217 code.
» currency_from_name
string
false
Currency name (localisation).
» currency_to
string(iso-4217)
false
Currency ISO 4217 code.
» currency_to_name
string
false
Currency name (localisation).
» exchange_rate
string(decimal)
false
Currency echange rate.
Error
{
"code" : "string" ,
"message" : "string" ,
"fields" : "string"
}
Properties
Name
Type
Required
Description
code
string
false
No description
message
string
false
No description
fields
string
false
No description