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-iol-v2

v0.0.5

Published

InvertirOnline Node.JS API wrapper v2

Downloads

6

Readme

Node.Js ultra-light wrapper for InvertirOnLine REST API V2

Disclaimer: I'm not responsible for any damage, of any way, when using this module, if you find any kind of problems, create an issue! Also: I'm not giving any investing advise here, all you see here is personal work and does not have any relationship with the company I work for or any company I worked or I will work in the future!.

Link to Github repo

How to start using this package

  1. Ask the guys of InvertirOnline to enable you the API (at the time this was published it was still free and we want them to keep it this way to foster the argentinian capital markets!)
  2. Install Node.Js
  3. Clone/Download this repo OR create a new folder with any name and do npm install node-iol-v2
  4. Complete the auth.json file with your username and password (if you did the npm install, the file will be inside your node-modules folder)
  5. Enjoy!

Usage

First we create a file (can be index.js) where we require this package if we did the npm install node-iol-v2 thing const iol = require('node-iol'); or, if we downloaded from github, we require the file directly const iol = require('./node-iol'); Then we write some code like this one:

let iol = require ("./node-iol")

async function getMEPDollarQuote() {
    let token = await iol.auth();
    let ay24 = await iol.getTickerValue(token, 'bcba', 'ay24');
    console.log(ay24.ultimoPrecio);
    let ay24d = await iol.getTickerValue(token, 'bcba', 'ay24d');
    console.log(ay24d.ultimoPrecio);
    console.log('Purchasing dollars in the stock market costs:', ay24.ultimoPrecio/ay24d.ultimoPrecio);
}

getMEPDollarQuote()

or maybe something like a CCL (contado con liqui) finder:


const iol = require('./node-iol');

async function cclGGAL() {
    let token = await iol.auth();
    let ggal = await iol.getTickerValue(token, 'bCBA', 'GGAL');
    let ggald = await iol.getTickerValue(token, 'nYSE', 'GGAL');

    let ccl = (ggal.ultimoPrecio/ggald.ultimoPrecio) * 10; // multiplied by 10 due to conversion factor to calculate CCL;

    console.log('GGAL price in ARG', ggal.ultimoPrecio);
    console.log('GGAL price in USA', ggald.ultimoPrecio);

    console.log('so...');

    console.log(`CCL price for GGAL is ${ccl}`);
}

cclGGAL()

Notes

  • Be extremely careful when calling methods, as I've done this in a couple of hours and it might not cover all cases (like get values that accepts a term but I haven't covered that and might be useful to calculate intrinsic rates!!!)

To Do

  • Tests Tests Tests (Mocha)
  • Review The getTickerValuesBetweenDates function, haven't tried it, specially dates formats
  • Polish the username/password authentication (hey! this was done in just one day!)