Fetch KSE-100 and PSX index data with Python
psxdata.indices() returns constituent data for any of the 18 PSX indices, including index weights and market cap.
Fetch KSE-100 constituents
Available indices
Pass the index name as a string:
See
psxdata/constants.py for the complete list.
Top 10 by index weight
Get tickers for an index
To get just the symbol list (cheaper than fetching full constituent data):tickers(index="KSE100") and indices("KSE100") share the same cache key.
Calling both in the same session makes only one network request.See also
indices()— parameter referencetickers()— symbol-only list by index- Historical data guide — download prices for index constituents