yfinance-live
v0.3.3
Published
Yahoo Finance Live Data
Downloads
21
Maintainers
Readme
yfinance-live
Yahoo Finance Live Data on Node.js with WebSocket
Installation
npm
npm install yfinance-live
yarn
yarn add yfinance-live
Usage
JavaScript
Example using the default import:
var YFinance = require('yfinance-live')
function onchange(data) {
console.log(data)
}
let yfinanceObj = YFinance(['GOOGL', 'AAPL', 'TSLA'], onchange)
Example using the YFinanceLive class import:
var { YFinanceLive } = require('yfinance-live')
function onchange(data) {
console.log(data)
}
let yfinanceObj = new YFinanceLive(['GOOGL', 'AAPL', 'TSLA'], onchange)
TypeScript
Example using the default import:
import YFinance, { yfinancedata } from 'yfinance-live'
function onchange(data: yfinancedata) {
console.log(yfinancedata)
}
let yfinanceObj = YFinance(['GOOGL', 'AAPL', 'TSLA'], onchange)
Example using the YFinanceLive class import:
import { YFinanceLive, yfinancedata } from 'yfinance-live'
function onchange(data: yfinancedata) {
console.log(yfinancedata)
}
let yfinanceObj = new YFinanceLive(['GOOGL', 'AAPL', 'TSLA'], onchange)