bvmf

Promise-based abstraction integrated with statusinvest.com.br for stock quotes

Usage no npm install needed!

<script type="module">
  import bvmf from 'https://cdn.skypack.dev/bvmf';
</script>

README

:package: bvmf

:package: bvmf

Promise-based abstraction integrated with statusinvest.com.br for stock quotes

Issues CodeQL Node.js CI GitHub pull requests GitHub Downloads GitHub Total Downloads GitHub release

Report Bug Request Feature

Did you like the project? Please, considerate a donation to help improve!

Promise-based abstraction integrated with statusinvest.com.br for stock quotes

Getting started

Installation

Clone this repository: git clone https://github.com/hebertcisco/bvmf

Open the directory and run the script line:

cd bvmf && npm i

Usage

Import

//using ES6
import bvmf from 'bvmf';
//or using ES5
const bvmf  = require("bvmf")

Using

//using ES6
import bvmf from 'bvmf';

async function returnQuote(bvmf) {
    const result = await bvmf(
      {
        bvmf: bvmf
      });
    return(result);
 }
 try{
  console.log(returnQuote("itsa4"));
 }catch(err){
  console.error(err);
 }

Returns

{
  "bvmf": "itsa4",
  "total": 1,
  "stock": [
    {
      "currentValue": "11,11",
      "dailyLiquidity": "391.965.857,19",
      "yield": "2,67",
      "min2Weeks": "8,57",
      "max2Weeks": "12,05",
      "logo": "https://cdn-statsinvest.azeedge.net/img/company/cove/345.jpg",
      "name": "ITAUSA INVESTIMENTOS ITAU S.A.",
      "site": "http://www.itausa.com.br"
    }
  ]
}

Testing

import bvmf from 'bvmf';

it('Works", async () => {
  const result = await bvmf({
    bvmf "itsa4", max: 1
  });
  console.log(result);
  expect(result.bvmf).toBe('itsa4');
});