@everapi/fxapi-js

1.0.0 • Public • Published

fxapi-js: JS Currency Converter

Fxapi.com is a foreign exchange rates API that provides historic & realtime data. This package is a JavaScript wrapper for fxapi.com that aims to make the usage of the API as easy as possible in your project.

Installation

npm

npm install --save @everapi/fxapi-js

yarn

yarn add @everapi/fxapi-js

Import

import FxAPI from '@everapi/fxapi-js';

or use it directly in a Browser:

<script src="path/to/fxapi-js/index.js"></script>

Usage

Initialize the API with your API Key (get one for free at fxapi.com):

const fxApi = new FxAPI('YOUR-API-KEY');

Afterwards you can make calls to the API like this:

fxApi.latest({
        base_currency: 'USD',
        currencies: 'EUR'
    }).then(response => {
        console.log(response);
    });

Endpoints accessible with a free account:

  • status
  • currencies
  • latest
  • historical

These advanced endpoints currently require a paid subscription:

  • convert
  • range

Find out more about our endpoints, parameters and response data structure in the docs

License

The MIT License (MIT). Please see License File for more information.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @everapi/fxapi-js

      Weekly Downloads

      0

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      4.21 kB

      Total Files

      4

      Last publish

      Collaborators

      • everapi-user