node-bovespa

所属分类:Python编程
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-01-01 05:46:00
上 传 者sh-1993
说明:  Bovespa数据提取器、服务器和命令行界面
(Bovespa data extractor, server, and command line interface)

文件列表:
.dockerignore (85, 2020-03-23)
.eslintrc.yml (172, 2020-03-23)
.travis.yml (862, 2020-03-23)
DBDockerfile (141, 2020-03-23)
Dockerfile (276, 2020-03-23)
Makefile (574, 2020-03-23)
assets/ (0, 2020-03-23)
assets/sql/ (0, 2020-03-23)
assets/sql/patch-000.sql (865, 2020-03-23)
bin/ (0, 2020-03-23)
bin/build.js (6260, 2020-03-23)
bin/cli.js (2813, 2020-03-23)
bin/realtime-reset.js (1875, 2020-03-23)
bin/realtime-sync.js (1071, 2020-03-23)
bin/server.js (1996, 2020-03-23)
config/ (0, 2020-03-23)
config/default.json (167, 2020-03-23)
config/production.json (195, 2020-03-23)
crons/ (0, 2020-03-23)
crons/updater.cron (330, 2020-03-23)
docker-compose.yml (730, 2020-03-23)
lib/ (0, 2020-03-23)
lib/db/ (0, 2020-03-23)
lib/db/index.js (2251, 2020-03-23)
lib/index.js (736, 2020-03-23)
lib/util/ (0, 2020-03-23)
lib/util/index.js (741, 2020-03-23)
package-lock.json (167230, 2020-03-23)
package.json (1754, 2020-03-23)

# Node Bovespa ## Warning: This module is currently partially active, due to bovespa's original API disappearance. But it will be brought back to you once we can work around that [issue](https://github.com/nihey/node-bovespa/issues/5). Access bovespa/B3 data in many ways: - API - JavaScript module Also: - Scrap and organize data from bovespa's historic time series [![Dependency Status](https://david-dm.org/nihey/node-bovespa.png)](https://david-dm.org/nihey/node-bovespa) [![Build Status](https://travis-ci.org/nihey/node-bovespa.svg?branch=master)](https://travis-ci.org/nihey/node-bovespa) # Why Free B3 data extraction is poor, the few places that have it have high costs for starters. This project was done so that developers like you and me can have access to B3 data in a easier way and develop nice things on top of it. # Installing ```bash $ npm install bovespa --save ``` For CLI usage it would be better to do: ```bash $ npm install bovespa -g ``` # Usage ## JavaScript We use the promise API to fetch all sorts of data: ```javascript // Using the default API (attention for the final function call): const bovespa = require("bovespa")(); // Querying data: bovespa("ABEV3", "2018-04-23").then(data => { // Manipulate your data here }); // What is received: bovespa("ABEV3", "2018-04-23").then(console.log); // Outputs raw bovespa data: // // { // id: 4851343, // day: '2018-04-23', // codbdi: '02', // codneg: 'ABEV3', // tpmerc: '010', // nomres: 'AMBEV S/A', // especi: 'ON', // prazot: '', // modref: 'R$', // preabe: '23.31', // premin: '23.23', // premax: '23.55', // premed: '23.40', // preult: '23.45', // preofc: '23.44', // preofv: '23.45', // preexe: '0.00', // totneg: '21813', // quatot: '8104000', // voltot: '18967719600', // indopc: '0', // fatcot: '0000001', // ptoexe: '0000000000000', // codisi: 'BRABEVACNOR1', // dismes: '119', // datven: '9999-12-31', // created_at: '2019-04-01T12:25:13.439Z', // updated_at: '2019-04-01T12:25:13.439Z' // } ``` The name of the fields are the same expressed on the ones shown on B3's official archives. You can have a reference on what they mean by going to [this link](http://bvmf.bmfbovespa.com.br/pt-br/download/SeriesHistoricas_Layout.pdf) You can use a different server to fetch data from your own API too: ```javascript const bovespa = require("bovespa")("https://"); bovespa("ABEV3", "2018-04-23").then(data => { // Manipulate your data here }); ``` ## CLI Command line help should give you a good guide on how to use the project ```bash $ bovespa --help Bovespa data extractor, server, and command line interface Usage: $ bovespa [Options] Extracts data from bovespa and displays it on the terminal Options --date, -d [Default: Today] Which date to extract the data from --api, -a [Default 'https://bovespa.nihey.org'] Examples: $ bovespa ABEV3 $ bovespa ABEV3 --date 2019-04-01 $ bovespa ABEV3 PETR4 BIDI4 --date 2019-04-01 ``` You can query historic time series by using this command: ```bash $ bovespa ABEV3 PETR4 -d 2019-04-01 # Output: # # > CODE: ABEV3 @ 2019-04-01 # > Variation: -0.30% # > Opening: 16.87 # > Closing: 16.82 # > Average: 16.85 # > Max: 17.00 # > Min: 16.74 # > # > CODE: PETR4 @ 2019-04-01 # > Variation: -1.43% # > Opening: 28.40 # > Closing: 28.00 # > Average: 28.11 # > Max: 28.42 # > Min: 27.87 ``` # License This code is released under [CC0](http://creativecommons.org/publicdomain/zero/1.0/) (Public Domain)

近期下载者

相关文件


收藏者