> ## Documentation Index
> Fetch the complete documentation index at: https://psxdata.mintlify.site/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 two screening tools: `tickers()` to list symbols by index, and `quote()` to get current price and sector data for any symbol.

## 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
```

## Screen all KSE-100 stocks for a metric

```python theme={null}
import psxdata
import pandas as pd

# Fetch quotes for all KSE-100 stocks
tickers = psxdata.tickers(index="KSE100")

rows = []
for t in tickers:
    q = psxdata.quote(t)
    if not q.empty:
        rows.append(q.iloc[0])

screen = pd.DataFrame(rows).reset_index(drop=True)
print(screen.columns.tolist())
print(screen.head())
```

<Note>
  Screener data refreshes every 15 minutes. psxdata caches the full screener
  and serves all subsequent `quote()` calls from that cache — so screening
  all 100 stocks costs only one network request.
</Note>

## See also

* [`tickers()`](/sdk/reference/client) — parameter reference
* [`quote()`](/sdk/reference/client) — parameter reference
* [Historical data guide](/sdk/guides/historical-data) — download prices for screened stocks
