1.0.4 • Published 2 years ago
pse-edge v1.0.4
PSE Edge
This is a wrapper of the PSE Edge backend API, useful for scraping data from PSE Edge. It provides the following services.
- Official List of stocks by sector
- Historical Prices
- Public Company disclosures
- Company Information
- Financial Reports
Usage
Typescript
import { fetchStocksAll, getCompanyDisclosures, getCompanyInfo, getHistoricalPrices } from 'pse-edge/lib'
// Fetch all stocks listed in the PSE
fetchStocksAll().then(console.log)
// Get all company disclosures of a stock symbol
getCompanyDisclosures('glo').then(console.log)
// Get company info of a stock symbol
getCompanyInfo('tel').then(console.log)
// Get Historical prices (daily OHLC) of a stock
getHistoricalPrices({ symbol: 'tel', startDate: '2021-02-02' }).then(console.log)
// Get Financial reports
getFinancialReports("glo").then(console.log)
Javascript
const { fetchStocksAll, getCompanyDisclosures, getCompanyInfo, getHistoricalPrices } = require('pse-edge/lib')
// Fetch all stocks listed in the PSE
fetchStocksAll().then(console.log)
// Get all company disclosures of a stock symbol
getCompanyDisclosures('glo').then(console.log)
// Get company info of a stock symbol
getCompanyInfo('tel').then(console.log)
// Get Historical prices (daily OHLC) of a stock
getHistoricalPrices({ symbol: 'tel', startDate: '2021-02-02' }).then(console.log)
// Get Financial reports
getFinancialReports("glo").then(console.log)