> ## Documentation Index
> Fetch the complete documentation index at: https://docs.psxdata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Screen PSX stocks with Python

> Filter and screen all PSX-listed stocks by sector, index, and trading metrics using psxdata.

# Screen PSX stocks with Python

psxdata gives you three screening tools: `tickers()` to list symbols by index, `quote()`
to get current price and sector data for a single symbol, and `screener()` to pull the
entire PSX screener table in one call.

## List all KSE-100 tickers

```python theme={null}
import psxdata

kse100 = psxdata.tickers(index="KSE100")
print(f"KSE-100 has {len(kse100)} stocks")
print(kse100[:10])
```

## List all PSX symbols

```python theme={null}
all_tickers = psxdata.tickers()   # ~1,000 symbols
print(f"PSX lists {len(all_tickers)} symbols")
```

## Get a live quote

```python theme={null}
import psxdata

q = psxdata.quote("ENGRO")
print(q.T)   # transpose for easier reading
```

## Get the full screener table in one call

Use `screener()` when you want every PSX-listed symbol at once, unfiltered — no
per-symbol looping required:

```python theme={null}
import psxdata

df = psxdata.screener()
print(df.columns.tolist())
print(df.nlargest(10, "market_cap")[["symbol", "market_cap"]])
```

Filter it yourself for a subset, e.g. KSE-100 only:

```python theme={null}
import psxdata

kse100 = set(psxdata.tickers(index="KSE100"))
df = psxdata.screener()
screen = df[df["symbol"].isin(kse100)].reset_index(drop=True)
print(screen.head())
```

> [!NOTE]
>
> Screener data refreshes every 15 minutes. psxdata caches the full screener
> and serves all subsequent `quote()` and `screener()` calls from that same
> cache — so screening the whole market still costs only one network request.

## See also

* [`tickers()`](https://docs.psxdata.org/sdk/reference/client) — parameter reference
* [`quote()`](https://docs.psxdata.org/sdk/reference/client) — parameter reference
* [`screener()`](https://docs.psxdata.org/sdk/reference/client) — parameter reference
* [Historical data guide](https://docs.psxdata.org/sdk/guides/historical-data.md) — download prices for screened stocks


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.