Pakistan Stock Exchange data, built for machines
Quotes, dividends, financials and filings for every PSX listing. Every number carries its source and timestamp, and a gap is reported as a gap, never filled with a guess.
Start in one step
Point an AI client at the MCP endpoint and it gets typed tools with schemas. Or call the REST API from anything that speaks HTTP.
{
"mcpServers": {
"psxlens": {
"type": "http",
"url": "https://api.psxlens.com/mcp"
}
}
}
Then ask plainly: Which KSE-100 dividend payers yield over 8% with a P/E under 6?
# dividend payers yielding 8%+, P/E under 6, at least Rs 5m traded a day curl "https://api.psxlens.com/v1/screener?dividend_yield_min=8\ &pe_max=6&min_value_traded=5000000&inside_kse100=true" # everything about one company curl "https://api.psxlens.com/v1/stocks/HUBC"
const res = await fetch("https://api.psxlens.com/v1/dividends/HUBC"); const d = await res.json(); console.log(d.trailing_yield_pct, d.five_year.years_covered); // a short years_covered means our record is short, not that it stopped paying
The surface
Grouped by the question you are asking. Paths with an example open the live JSON.
Find and read a company
/v1/search?q=alliedTicker from a name: “Allied Bank” to ABL.
/v1/stocks/{sym}Profile, quote, ratios, peers, dividends, filings and technicals in one call. Add ?compact=1 for one copy of each.
/v1/financials/{sym}Income statement by period, with EPS.
/v1/announcements/{sym}PSX company filings, labelled as filings rather than press.
Screen and compare
/v1/screenerYield, drawdown, P/E, market cap, liquidity and free float across every listing, filtered server-side.
/v1/compare?symbols=ABL,MEBLTwo symbols: a scored head-to-head. Three or more: the winner per metric.
/v1/stocks/{sym}/technicalsAverages, oscillators, pivots and volatility as state labels, never a buy or sell call.
The market today
/v1/market/boardIndices, breadth (untraded counted apart), movers and sector tone.
/v1/sectors/boardEvery sector's median change, P/E and yield, with constituents.
/v1/prices/{sym}?range=1YDaily bars for a named window, with its own high, low and change. limit keeps the latest N.
Income
/v1/dividends/{sym}History by fiscal year, trailing DPS and yield, and the window it covers.
/v1/calendar/dividendsOpen payouts with last_buy_date and whether buying today still earns them.
/v1/me/holdingsYour positions, cost and P&L. Needs a key with portfolio:read.
/v1/me/transactionsRecord a buy, sell, dividend, bonus or split. Tracking only: there is no broker behind it.
Free, with nothing held back
Every market and company endpoint is free and needs no key. There is no paid tier and no throttled starter plan. If something is missing, the data is missing, and the list below says what.
Your own portfolio
Create a key at psxlens.com/api-access and send it as Authorization: Bearer pl_live_….
A key reads market data by default. Reading holdings and recording trades are separate grants you switch on.
For AI agents
If you are an assistant reading this page for someone, this is the short version. The full plain-text guide is at /llms.txt; requesting / with Accept: text/plain returns it too.
What we will not hide
Each of these is also stated in the responses themselves, so an agent reading the JSON gets the same caveat you do.
Daily prices have a gap
PSX closed its end-of-day feed on 28 August 2026. Bars resumed in November from company pages, after each close. Indicators say history_gap when they rest on old bars.
New payouts may be missing
PSX's payouts listing has been unreachable since late August 2026. /v1/freshness shows the latest payout we hold; yields after that date understate.
Quotes are delayed
Read from PSX once per session and labelled delayed. Never live.
Dividend history is short
It starts in November 2024. Five-year figures count only covered years and report years_covered.
Prices are not adjusted
A 30% bonus issue leaves a ~23% step in the chart that is not a fall.
No balance sheet
ROE, price to book and debt to equity are absent for every company: PSX publishes those lines only inside filing PDFs.
No Shariah screen or index history
KSE-100 membership and current index levels only.
Blank means unknown
A null is never a zero, and coverage: "unknown" means we could not reach PSX for that symbol.