Market Data API · pypsx

Free PSX market data. In one pip install.

Ten years of OHLCV, intraday, fundamentals, dividends, index constituents, and the full market watch, as pandas DataFrames. No scraper, no rate limits to fight.

install
pip install pypsx

Data is free. Want execution and backtesting? See Algo Trading →

What you get

Historical OHLCV

Ten years of daily bars for every listed symbol. Clean pandas output, no scraping, no parsing.

python
import pypsx
df = pypsx.download("OGDC", period="10y")
Fundamentals & dividends

Financials, ratios, dividend history, corporate announcements, one library, one shape.

python
pypsx.get_company_fundamentals("MCB")
pypsx.get_dividend_history("HBL")
Indices & sectors

KSE-100, KMI-30, KSE-30 constituents and weights. Sector lists and market-cap breakdowns.

python
pypsx.index_constituents("KSE100")
pypsx.sectors()
Market-wide snapshots

Top gainers, decliners, most active, and a full market watch, the whole board in one call.

python
pypsx.performers()
pypsx.market_watch()
Intraday (research)

Tick-by-tick for the last 2 sessions, for indicator warm-up and research. Not a live feed.

python
pypsx.get_intraday("SYS")
Analysis toolkit

RSI, MACD, Bollinger, Sharpe, drawdown, full performance summaries, tuned for PSX.

python
import pypsx.analysis as pa
pa.performance_summary(df)

Start pulling data.

Free. See the reference to go deeper.