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

node-fixer-io-api

v1.1.2

Published

node-api to connect to fixer.io

Downloads

2

Readme

DEVELOPERS GUIDE

Build Status

Getting Started

  • Clone the application with git clone https://github.com/kenigbolo/node-api-server.git or use ssh git clone [email protected]:kenigbolo/node-api-server.git.

Dependencies

  • NPM 6.6

Description

Pure Javascript Node API server that connects to http://api.fixer.io. Currently available on heroku. This api is currently used by a currency prediction rails app here on github which is hosted on a heroku site. To test out the API with post man kindly use the get request params formats as stated in fixer

NPM

This package has been published on NPM and is freely available according to the MIT license. To install via npm simply run npm install node-fixer-io-api.

NPM Package Usage

The npm package exposes a tiny utility class as well as a tiny node server. The utility class can be used to leverage making requests to the the fixer.io api. This utility will be extracted from here and made into it's own tiny package in the future. example usage of this is as follows:


const FixerIO = require('node-fixer-io').FixerIO;
const fixerUtility = new FixerIO('put-your-api-key-here');

fixerUtility.request('latest').then((response) => {
  console.log(response);
});

The utility returns a resolved or rejected promise. The requirements for the request method are as follows:

request method

The request method takes two arguments

  1. The endpoint to which the call should be made i.e At this point of writing just two are found on the fixer io api documentation. The available options at the moment are latest,symbols, convert, timeseries, fluctuation and dates e.g. YYYY-MM-DD. This value should be passed as a string. This is a required string however for flexibility it is not fixed to any specific list of endpoints in order to allow new endpoints to be accessible also.

  2. The second argument taken by the request function is the query params. Kindly visit the official documentation to be sure what values are allowed but at the time of writing the allowed values are base and symbol or symbols, and these are only available on the latest endpoint. An example query argument should look like this base=USD&symbols=GBP,JPY,EUR. Please note that this type of query at the moment is not availble to the symbols endpoint. The convert endpoint allows for making queries such as from=GBP&to=JPY&amount=200 using params from, to and amount. The timeseries and fluctuation endpoint currently allows queries such as start_date=2012-05-01&end_date=2012-05-27 with the available params start_date and end_date.

Disclaimer

I am in no way connected to those who work at fixer.io. Project is simply a side project which I will try to maintain and expand as much as I can. At the time of this writing [2018-10-25] the fixer api requires an api token when making requests.

Bigger Picture

The idea is to integrate advanced algorithms that will give currency rates future prediction with accuracy up to 80%.