Coder Social home page Coder Social logo

node-bovespa's Introduction

Node Bovespa

Warning: This module is currently inactive, due to bovespa's original API disappearance. But it will be brought back to you once we can work around that issue.

Access Bovespa's Web Service API in a JavaScriptic way.

Dependency Status

Why

Bovespa's API may not be the best one to work with. Consuming data in a querystring-like and XML formats is annoying, so why not consume it in JSON/Javascript Objects?

Installing

$ npm install bovespa --save

Command Line

$ bovespa

Get data from Bovespa's API in a JavaScriptic way

  Usage
    bovespa <symbol> [options]

  Options:
    -q, --quote      quote status (default option)
    -v, --volume     traded volume data
    -t, --trading    daily trading history
    -s, --stats      bovespa daily status

  Examples:

    bovespa ABEV3
    bovespa ABEV3 EDGA11B
    bovespa EDGA11B -t
    bovespa -s

Using

Daily trading history of a company (original)

require('bovespa').history('EDGA11B', function(history) {
  console.log(history);
});

// stdout:
//
//  {
//    date: '2015/Ago/21',
//    traded: [{
//        time: '10:00:00',
//        value: '71.43',
//        oscillation: '-0.01'
//      }, {
//        time: '10:03:36',
//        value: '71.43',
//        oscillation: '-0.01'
//      },
//      ... a lot of operations ...
//      {
//        time: '16:50:59',
//        value: '72.14',
//        oscillation: '0.97'
//      }, {
//        time: '16:52:06',
//        value: '72.14',
//        oscillation: '0.97'
//      }
//    ]
//  }

Single stock quote API (original)

require('bovespa').quote('EDGA11B', function(quote) {
  console.log(quote);
});

// stdout:
//
// {
//   description: 'FII GALERIA    CI      MB',
//   code: 'EDGA11B',
//   ibovespa: false,
//   delay: 15,
//   datetime: '21/08/2015 16:52:19',
//   oscillation: 0.78,
//   volume: 295,
//   type: 'Vista'
// }

Multiple stock quote API (original)

require('bovespa').quotes(['EDGA11B', 'ABEV3'], function(quotes) {
  console.log(quotes);
});

// stdout:
//
//  [{
//    code: 'EDGA11B',
//    name: 'FII GALERIA CI      MB',
//    ibovespa: false,
//    datetime: '21/08/2015 16:52:19',
//    opening: 71.43,
//    min: 71.02,
//    max: 72.5,
//    mean: 71.54,
//    last: 72,
//    oscillation: 0.78
//  }, {
//    code: 'ABEV3',
//    name: 'AMBEV S/A ON',
//    ibovespa: true,
//    datetime: '21/08/2015 17:59:55',
//    opening: 18.32,
//    min: 18,
//    max: 18.43,
//    mean: 18.18,
//    last: 18.05,
//    oscillation: -2
//  }]

License

This code is released under CC0 (Public Domain)

node-bovespa's People

Contributors

nihey avatar

Watchers

James Cloos avatar Lucas rodrigues araujo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.