zhameersheraz/ph-stocks
关于
Philippine Stock Exchange dashboard that refreshes itself every hour. Scrapes PSE Edge, renders 21 blue chips with 90-day candlestick charts. Python stdlib only.
数据与分析实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ph-stocks
📈 Live site → https://zhameersheraz.github.io/ph-stocks/
Auto-updated every hour — 21 Philippine blue chips from PSE Edge, with 90-day candlestick charts.
Philippine Stock Exchange snapshot, Auto-updated every hour.
- Source: PSE Edge — official disclosure portal of the PSE
- Refresh: GitHub Actions cron every hour, plus on-demand via the manual
workflow_dispatchtrigger - Output:
stocks.md(human-readable) andstocks.json(machine-readable) - Stack: Python stdlib only — no external dependencies, no API keys
- Live site: GitHub Pages — auto-deployed from
docs/
What it tracks
21 Philippine blue chips spanning financials, industrials, holding firms, property, services, and telecom. Each entry includes last traded price, open, high, low, previous close, change, volume, value, market cap, 52-week range, and the as-of timestamp straight from PSE Edge.
How it works
update.pyhits the public PSE Edge Stock Data page for each ticker.- It parses the server-rendered HTML with regex (no JS, no auth, no challenge).
- It also fetches the Index Summary page for PSEi + sector indices + market summary.
- Writes
stocks.jsonandstocks.md, then the workflow commits any change.
Layout
| File | Purpose |
|---|---|
update.py |
Fetcher + parser + renderer. Pure Python stdlib. |
.github/workflows/update.yml |
Hourly cron + manual workflow_dispatch trigger. |
stocks.md |
Latest snapshot (markdown). |
stocks.json |
Latest snapshot (JSON, schema: see below). |
docs/index.html |
GitHub Pages dashboard (loads stocks.json). |
docs/banner.svg |
README hero banner. |
Schema (stocks.json)
{
"generated_utc": "2026-09-27 18:45:12",
"source": "https://edge.pse.com.ph",
"index": {
"as_of": "Sep 25, 2026 5:29 PM",
"market_status": "CLOSED",
"indices": [{"name": "PSEi", "value": 5825.97, "change": 95.95, "change_pct": 1.67}],
"market_summary": {"Total Volume": 4059619816}
},
"stocks": [
{
"symbol": "JFC",
"name": "Jollibee Foods Corporation",
"as_of": "Sep 25, 2026 02:50 PM",
"status": "Open",
"last_traded_price": 145.00,
"open": 140.50,
"high": 145.00,
"low": 140.00,
"previous_close": 140.50,
"previous_close_date": "Sep 24, 2026",
"change": "up",
"change_amount": 4.50,
"change_pct": 3.20,
"volume": 244250,
"value": 34939033.00,
"average_price": 143.05,
"fifty_two_week_high": 224.40,
"fifty_two_week_low": 119.70,
"market_cap": 157458440482.00,
"outstanding_shares": 1120700644
}
]
}
Local development
cd ~/projects/ph-stocks
python3 update.py
cat stocks.md
The script is safe to run as often as you like; each run is a ~13-second pass (~21 stock pages + 1 index page, 0.6s polite delay between requests).
Deploy GitHub Pages site
The docs/ folder ships a static dashboard that loads stocks.json. To enable:
- Repo Settings → Pages
- Source: Deploy from a branch
- Branch:
main, Folder:/docs - Save
Live URL: https://zhameersheraz.github.io/ph-stocks/
Why not yfinance / Stooq?
- yfinance: Philippine stocks not consistently covered.
.PSsuffix and MIC tuple forms both returnQuote not found. - Stooq: Gated by a Cloudflare-style JavaScript challenge; any plain HTTP
client gets a
<noscript>HTML page back, not CSV.
PSE Edge is the authoritative source — official exchange site, no challenge, no auth, public-facing HTML.
License
Data is sourced from PSE Edge under their public terms of use. Code is MIT.
探索相关项目
加载中…