Source code: https://github.com/Kukyn/primabankapi
npm install primabankapi
const api = require("primabankapi");
All functions returns promise that needs to be resolved
Calling function without parameter
roundAt
returns response with five decimal places
Maximum decial places that site is providing is 5
For parameter
currency
choose one from list of supported currencies
Returns sell rate of given currency for today
var response = await api.getSellRate("CZK")
console.log(response) //ex. output 24.98400
Returns buy rate of given currency for today
var response = await api.getBuyRate("CZK")
console.log(response) //ex. output 25.12400
Returns middle rate of given currency for today
var response = await api.getMiddleRate("CZK")
console.log(response) //ex. output 24.34400
- USD - US Dollar
- CZK - Czech Koruna
- GBP - British Pound
- HUF - Hungarian Forint
- PLN - Polish Zloty
- CHF - Swiss Franc
- [x] Option to scrape
currency/EUR
rate of all of six curencies from website [v1.0.0] - [ ] Adding option to get rate for given day in past [v2.0.0]