npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fixer-wrapper

v1.1.4

Published

Fixer.io Unofficial wrapper for Javascript

Downloads

53

Readme

Features 🦾

✅ Latest rates endpoint

✅ Convert endpoint

✅ Historical rates endpoint

✅ Time-Series data endpoint

✅ Fluctuation data endpoint

How to use 📖

IMPORTANT TO READ:

You have to select a plan and create an account to be able to use this web API, therefore you'll receive an access_key that you can use to request data to a given endpoint (and you can use this wrapper too).

Thus, I highly recommend to you to read the official documentation, because some features of this wrapper are not available for free tier plans and if you want to implement them in your application you must buy another plan.
The links are right below this paragraph:

Offical documentation

Create an account


  NOTE:
  See sample section to know how to start using this wrapper methods.

Methods ->
 ❇️Lastest: 
 > Required: 

 > Optional: bases: string,
             symbols: string.

❇️Convert:
 > Required: convertFrom: string,
             convertTo: string,
             amount: string,
             base: string.
 > Optional: 

❇️TimeSeries:
 > Required: startDate: string,
             endDate: string.

 > Optional: base: string,
             symbols: string.

❇️Historical: 
  > Required: date: string.

  > Optional: base: string,
              symbols: string.

❇️Fluctuation:
  > Required: startDate: string,
              endDate: string.

  > Optional: base: string,
              symbols: string

    

Samples 📕

// In your index.js:
import { FixerWrapper } from 'fixer-wrapper';

/*
You should not store your access_key in a simple constant but in a enviroment variable to make it more secure.
*/
const ACCESS_KEY = 'your_access_key';

// Initialize Fixer class.
const Fixer = new FixerWrapper(ACCESS_KEY);

const getLastest = await Fixer.lastest('USD', 'VEF, EUR');

/* 
We pass an object with multiple params as below.
Note that we are no passing date param because it's just an optional param. 
*/
const getconvert = await Fixer.convert({
    convertFrom: 'USD',
    convertTo: 'EUR',
    amount: '445'
});

const getTimeseries = await Fixer.timeSeries({
    startdate: '2015-02-12',
    endDate: '2015-05-13',
    baseParam: 'VEF',
    symbols: 'EUR, USD, AUD'
});

const getHistorical = await Fixer.historical('2020-02-24');

const getFluctuation = await Fixer.fluctuation({
    startDate: '2004-06-14',
    endDate: '2005-02-12'
});

NOTE: You can see the way each method will return responses to you by seeing their documentation.

Download 💾

To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/alejandro0619/Fixer-wrapper.git

# Go into the repository
$ cd Fixer-wrapper

# Install dependencies
$ npm install

# Build
$ npm run build

# Run the app
$ npm run start

Credits 📚

This software uses the following open source packages:

License 🔐

The source code of this project is under the MIT license


Github @alejandro0619