JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q23328F
  • License ISC

Access Open Exchange Rates API.

Package Exports

  • opexrate

Readme

opexrate

Opexrate can help you access Open Exchange Rate API.

Installation

npm i opexrate

Usage

const OpExRate = require('opexrate')
// import OpExRate from 'opexrate'

const opexrate = new OpExRate('app_id')

;(async () => {
  // await opexrate.latest()
  // await opexrate.historical('2018-08-18')
  // await opexrate.currencies()
  /*
  await opexrate.timeSeries({
    start: '2018-08-18',
    end: '2018-08-28'
  })
  */
  // await opexrate.convert(100, 'USD', 'EUR')
  /*
  await opexrate.ohlc({
    start_time: '2018-08-18',
    period: '1d'
  })
  */
  await opexrate.usage()
})()