Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stock-data-scraper

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stock-data-scraper

An API to scrape stock data like financial metrics, upcoming earnings details, company information, and price performance.

  • 1.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Stock-Scraper

https://www.npmjs.com/package/stock-data-scraper

Overview

stock-scraper is a Node.js (TS) npm package that provides an API to fetch comprehensive stock data by scraping information from TradingView. It offers a straightforward way to retrieve essential financial metrics, upcoming earnings details, company information, and price performance for any publicly traded company.

Installation

To install the package with npm

npm install stock-scraper

API

Get Stock Data
getStockData(ticker: string): Promise<StockData>
ParameterTypeDescription
tickerstringRequired. Stock Ticker

Fetches stock data including upcoming earnings, key statistics, company information, and price performance for the given ticker.

Usage/Examples

import { getStockData } from 'stock-scraper';

getStockData('AAPL').then(data => 
    console.log(data)
) 

//Prints the following:

{
    "UpcomingEarnings": {
        "nextReportDate": "07/15/2024",
        "reportPeriod": "Q2 2024",
        "epsEstimate": "2.45",
        "revenueEstimate": "5.60 B"
    },
    "KeyStats": {
        "marketCap": "2.5T",
        "dividendYield": "1.23%",
        "peRatio": "28.45",
        "basicEPS": "7.25",
        "netIncome": "63.90 B",
        "revenue": "320.58 B",
        "sharesFloat": "4.31 B"
    },
    "About": {
        "sector": "Technology",
        "industry": "Consumer Electronics",
        "ceo": "Tim Cook",
        "website": "https://www.apple.com",
        "headquarters": "Cupertino, CA",
        "employees": "154,000",
        "founded": "April 1, 1976",
        "description": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, and other consumer electronics."
    },
    "Price": {
        "currentPrice": "1450.25",
        "perf1M": "+5.32%",
        "perf5D": "-1.20%",
        "perf5Y": "+213.45%",
        "perf6M": "+15.70%",
        "perfAll": "+512.80%",
        "perfY": "+38.90%",
        "perfYTD": "+12.60%",
        "change1D": "-0.50%"
    }
}


Keywords

FAQs

Package last updated on 07 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc