GithubHelp home page GithubHelp logo

samgozman / finvizor Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 1.28 MB

Get finviz data

Home Page: https://www.npmjs.com/package/finvizor

License: MIT License

TypeScript 100.00%
stock financial finviz npm-package

finvizor's Introduction

finvizor

ko-fi

GitHub Workflow Status Codacy Badge npm npm bundle size NPM

Get full financial data from finviz!

Installation

Install package from NPM

npm install finvizor

Features

The main differences and advantages in comparison with similar NPM modules are the more convenient presentation of the data returned by the function.

Object Keys

Object keys have been redesigned to make them look meaningful and readable. No more string keys in NPM modules! Camel case is used in key names only where it is needed. For instance 'P/E' => 'pe', 'Target price' => 'targetPrice' etc.

Finviz parser

All keys (and there are more than 80 of them) have short descriptions taken from the official site.

Object Values

All numeric key values are presented as numerical values, rather than strings as default. Boolean values, ranges and the date of earnings are also parsed separately. All this is done so that the data from the site can be used in your code for calculations right out of the box!

Usage

Use finvizor in async functions

const finvizor = require('finvizor')

const main = async () => {
  const stock = await finvizor.stock('AAPL')
  console.log(stock)
}

main()

Returns

await finvizor.stock('AAPL')

{
  ticker: 'AAPL',
  name: 'Apple Inc.',
  site: 'http://www.apple.com',
  exchange: 'NASD',
  sector: 'Technology',
  industry: 'Consumer Electronics',
  country: 'USA',
  index: 'DJIA S&P500',
  pe: 36.53,
  eps: 3.7,
  insiderOwn: 0.07,
  shsOutstand: 16940000000,
  ...
  earnings: { date: 1611694800000, marketTime: 'AMC' },
  payout: 21.6,
  avgVolume: 103190000,
  price: 134.24,
  recom: 2,
  sma20: -0.92,
  sma50: 2.49,
  sma200: 21.89,
  volume: 5659762,
  change: -0.66,
  insidersDeals: [
    {
      insiderTrading: 'Williams Jeffrey E',
      insiderTradingLink: 'https://finviz.com/insidertrading.ashx?oc=1496686&tc=7',
      relationship: 'COO',
      date: 'Apr 05',
      transaction: 'Sale',
      cost: '125.74',
      shares: '133,867',
      value: '16,832,437',
      sharesTotal: '489,490',
      secForm4: 'Apr 05 06:36 PM',
      secForm4Link: 'http://www.sec.gov/Archives/edgar/data/320193/000032019321000046/xslF345X03/wf-form4_161766207883637.xml'
    }
    ...
  ]
}

finvizor's People

Contributors

codacy-badger avatar dependabot[bot] avatar samgozman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alexeylevin

finvizor's Issues

TypeError: Cannot read properties of undefined (reading 'replace')

Since 2023-04-19 the library stop working with the following error:
Error: TypeError: Cannot read properties of undefined (reading 'replace')
at C:\Users\angel\Development\mpro-notify\stocks\node_modules\finvizor\lib\quote.js:126:27
at step (C:\Users\angel\Development\mpro-notify\stocks\node_modules\finvizor\lib\quote.js:33:23)
at Object.next (C:\Users\angel\Development\mpro-notify\stocks\node_modules\finvizor\lib\quote.js:14:53)
at fulfilled (C:\Users\angel\Development\mpro-notify\stocks\node_modules\finvizor\lib\quote.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

finvizor library version 1.1.2

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.