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

barchart-dot-com

v1.0.7

Published

Fetching data from the barchart.com

Downloads

44

Readme

barchart-dot-com

ko-fi

GitHub Workflow Status Codacy Badge npm npm bundle size NPM

Fetching data from the barchart.com

Installation

Install package from NPM

npm install barchart-dot-com

Features

Fetch stock data from barchart-dot-com.com such as:

  • Financial income
  • Financial Cash Flow
  • Financial Balance Sheet
  • Overview: last price, options, analytics etc.

Usage

Use barchart-dot-com in async functionsю

Most of the financial data is available in annual and quarterly formats. In total, each data format contains 5 periods (years / months). Results sorted from closest date

Financials: income

Annual or Quarterly Income Statements.

const { financials } = require('barchart-dot-com')

const main = async () => {
  const stock = await financials.income('aapl').annual()
  console.log(stock.netIncome)
  console.log(stock.ebitda)
}

main()

Returns:

  • [ 57411000000, 55256000000, 59531000000, 48351000000, 45687000000 ]
  • [ 77344000000, 76477000000, 81801000000, 71501000000, 70529000000 ]

Financials: Cash Flow

The Cash Flow report is used to assess the quality of a company's income.

const { financials } = require('barchart-dot-com')

const main = async () => {
  const stock = await financials.cashFlow('aapl').quarterly()
  console.log(stock.freeCashFlow.freeFlow)
}

main()

Returns:

  • [ 35263000000, 73365000000, 54573000000, 39867000000, 28409000000 ]

Financials: Balance Sheet

A Balance Sheet is a financial statement that summarizes a company's assets, liabilities and shareholders' equity.

const { financials } = require('barchart-dot-com')

const main = async () => {
  const stock = await financials.balanceSheet('aapl').annual()
  console.log(stock.assets.total)
  console.log(stock.liabilities.total)
  console.log(stock.totalLiabilitiesAndEquity)
}

main()

Returns:

  • [ 323888000000, 338516000000, 365725000000, 375319000000, 321686000000 ]
  • [ 258549000000, 248028000000, 258578000000, 241272000000, 193437000000 ]
  • [ 323888000000, 338516000000, 365725000000, 375319000000, 321686000000 ]

Quotes: overview

The Quote Overview gives you a snapshot view for a specific symbol.

const { quotes } = require('barchart-dot-com')

const main = async () => {
  const stock = await quotes.overview('aapl')
  console.log(stock.exchange)
  console.log(stock.overview.previousPrice)
  console.log(stock.fundamentals.beta60Month)
  console.log(stock.technicals)
}

main()

Returns:

  • 'NASDAQ'
  • 120.09
  • 1.25
  • { opinion: 'Sell', power: 8 }

Disclaimer

This is not an official NPM package. Always check the received data from the corresponding page on the barchart.com.