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

iol-api-node-wrapper

v0.4.1

Published

Node Library to wrap Invertir Online API

Downloads

10

Readme

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. version npm version GitHub Workflow Status (branch) typescript

IOL API NodeJS Wrapper

Prerequisites

  1. Have a valid IOL account.
  2. Have access to IOL API. (Send an email to IOL Support requesting for the API access).
  3. NodeJS installed

Installation

npm

npm i iol-api-node-wrapper

yarn

yarn add iol-api-node-wrapper

Usage example

  const { IolClient } = require("iol-api-node-wrapper");

// Initialize client with config
const config = {
      url: "https://api.invertironline.com",
      password: <your IOL password>,
      username: <your IOL username>,
      }

const iol = new IolClient(config);
async function main() {
  const account = await iol.getAccountStatus();
  console.log(account);
}
main();

Authentication

Once a new IolClient object has been instantiated with authentication data, authentication is managed internally by the library and there is no need to request a new access-token every time you call the API. IolClient uses IOL's refresh-token to request a new access-token if the current one has expired.

Types

This project is written in typescript and we are trying to type not only the wrapper interface methods but also IOL's API responses models. This makes it a lot easier to work with the wrapper response object as it has editor's (VSCode) intellisense features enhanced by typescript. If you don't use VSCode which has already typescript support, you can easily install typescript in your project or globally in your system.

Wrapper Interface

// GET /api/v2/portafolio/{pais}
await iol.getPortfolio("argentina");

// GET /api/v2/estadocuenta
await iol.getAccountStatus();

// GET /api/v2/operaciones/{numero}
await iol.getOperation(1234);

// GET /api/v2/operaciones
await iol.getOperations({
  estado: "pendientes",
  fechaDesde: new Date(new Date().setDate(10)).toString(),
  fechaHasta: new Date(new Date().setDate(15)).toString(),
  numero: 1234,
  pais: "argentina",
});

// DELETE /api/v2/operaciones/{numero}
await iol.deleteOperation(1234);

// POST /api/v2/operar/Comprar
await iol.buy({
  mercado: "bCBA",
  plazo: "t0",
  precio: 123,
  simbolo: "GGAL",
  validez: new Date(),
});

// POST /api/v2/operar/Vender
await iol.sell({
  mercado: "bCBA",
  plazo: "t0",
  precio: 123,
  cantidad: 1,
  simbolo: "GGAL",
  validez: new Date(new Date().setDate(20)),
});

// POST /api/v2/operar/suscripcion/fci
await iol.fciSubscription({ monto: 123, simbolo: "CRTAFAA" });

// POST /api/v2/operar/rescate/fci
await iol.fciRescue({ cantidad: 1, simbolo: "CRTAFAA" });

// GET /api/v2/{Mercado}/Titulos/{Simbolo}/Cotizacion
await iol.getPrice("rOFX", "DLR102021");

// GET /api/v2/{Mercado}/Titulos/{Simbolo}/Opciones
await iol.getOptions("bCBA", "GGAL");

// GET /api/v2/Titulos/FCI/{simbolo}
await iol.getFCI("CRTAFAA");

// GET /api/v2/Titulos/FCI
await iol.getAllFCI();

API Wrapper progress

[ IOL API VERSION: V2 ]

AsesoresTestInversor

⬜️ GET /api/v2/asesores/test-inversor

⬜️ POST /api/v2/asesores/test-inversor/{idClienteAsesorado}

MiCuenta

GET /api/v2/estadocuenta

GET /api/v2/portafolio/{pais}

DELETE /api/v2/operaciones/{numero}

GET /api/v2/operaciones/{numero}

GET /api/v2/operaciones

Operar

POST /api/v2/operar/Vender

POST /api/v2/operar/Comprar

POST /api/v2/operar/rescate/fci

POST /api/v2/operar/suscripcion/fci

Titulos

GET /api/v2/Titulos/FCI

GET /api/v2/Titulos/FCI/{simbolo}

⬜️ GET /api/v2/Titulos/FCI/TipoFondos

⬜️ GET /api/v2/Titulos/FCI/Administradoras

⬜️ GET /api/v2/{mercado}/Titulos/{simbolo}

GET /api/v2/{mercado}/Titulos/{simbolo}/Opciones

⬜️ GET /api/v2/{pais}/Titulos/Cotizacion/Instrumentos

GET /api/v2/Cotizaciones/{Instrumento}/{Panel}/{Pais}

⬜️ GET /api/v2/{pais}/Titulos/Cotizacion/Paneles/{instrumento}

GET /api/v2/{Mercado}/Titulos/{Simbolo}/Cotizacion

⬜️ GET /api/v2/Titulos/FCI/Administradoras/{administradora}/TipoFondos

⬜️ GET /api/v2/Titulos/FCI/Administradoras/{administradora}/TipoFondos/{tipoFondo}

⬜️ GET /api/v2/{mercado}/Titulos/{simbolo}/Cotizacion/seriehistorica/{fechaDesde}/{fechaHasta}/{ajustada}

LICENCE

MIT