UNPKG

live-stock-price

Version:

Live Stock Price is an NPM package that provides live stock data prices for a given symbol. It fetches the stock price from Yahoo Finance using web scraping techniques.

18 lines (15 loc) 338 B
const scraperWeb = require('./index'); scraperWeb('AAPL') .then((price) => { console.log('Stock price:', price); }) .catch((error) => { console.error('Error:', error); }); scraperWeb('!@#') .then((price) => { console.log('Stock price:', price); }) .catch((error) => { console.error('Error:', error); });