1.1.0 • Published 1 year ago

primabankapi v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Slovakia’s Prima banka API

Unofficial API for Prima banka’s currency rate sell/buy list

Source code: https://github.com/Kukyn/primabankapi

Install

npm install primabankapi

Usage

const api =  require("primabankapi");

All functions returns promise that needs to be resolved

Commands

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

.getSellRate(currency: string, ?roundAt: int)

Returns sell rate of given currency for today

var response =  await api.getSellRate("CZK")

console.log(response) //ex. output 24.98400

.getBuyRate(currency: string, ?roundAt: int)

Returns buy rate of given currency for today

var response =  await api.getBuyRate("CZK")

console.log(response) //ex. output 25.12400

.getMiddleRate(currency: string, ?roundAt: int)

Returns middle rate of given currency for today

var response =  await api.getMiddleRate("CZK")

console.log(response) //ex. output 24.34400

Supported currencies

  • USD - US Dollar
  • CZK - Czech Koruna
  • GBP - British Pound
  • HUF - Hungarian Forint
  • PLN - Polish Zloty
  • CHF - Swiss Franc

Future plans

  • 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

1.1.0

1 year ago

1.0.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago