Skip to main content

Download PSX historical stock prices with Python

psxdata returns complete OHLCV history for any PSX-listed stock in a single call.

Data granularity

All historical data is daily OHLCV bars. One row per trading day. Intraday historical bars (1-minute, 5-minute, 15-minute, and so on) are not available. PSX does not publicly expose historical intraday data through any official channel. For point-in-time quotes during trading hours, use psxdata.quote() instead.

Basic usage

Output:

Date filtering

start and end accept str (ISO format), datetime.date, or None.

Compute returns

Save to CSV or Excel

Fetch multiple stocks

Bypass cache

See also