Metadata-Version: 2.4
Name: pypsx-toolkit
Version: 3.1.1
Summary: Pakistan Stock Exchange (PSX) data library with yfinance-like API
Author-email: PyPSX Team <pypsxofficial@gmail.com>
Maintainer-email: PyPSX Team <pypsxofficial@gmail.com>
License: Copyright (c) 2026 PyPSX Team. All rights reserved.
        
        This software and associated documentation files (the "Software") are the
        proprietary property of PyPSX Team. Unauthorized copying, modification,
        distribution, sublicensing, or use of this Software, via any medium, is
        strictly prohibited without the prior written permission of PyPSX Team.
        
        No license, express or implied, to any intellectual property rights is
        granted by this document.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
        FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
        DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://pypsx.com
Project-URL: Documentation, https://markets.pypsx.com/docs
Project-URL: Changelog, https://markets.pypsx.com/docs/changelog
Keywords: psx,pakistan,stock,finance,data,api,pandas,yfinance,market-data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: pandas<3.0.0,>=2.0.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: numpy<2.4.0,>=1.24.0
Requires-Dist: tqdm>=4.66.0
Provides-Extra: plot
Requires-Dist: matplotlib>=3.5.0; extra == "plot"
Requires-Dist: seaborn>=0.11.0; extra == "plot"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: requests-mock>=1.10.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Provides-Extra: all
Requires-Dist: pypsx-toolkit[dev,plot]; extra == "all"
Dynamic: license-file

﻿# pypsx-toolkit

**Free, programmatic market data and analytics for the Pakistan Stock Exchange (PSX), from [pyPSX](https://pypsx.com).**

pyPSX is the API-first trading platform for PSX: market data, backtesting, paper and live trading over a
REST and WebSocket API, a live feed, an AI Strategy Copilot, and a web terminal. This package is the free,
public data and analytics library, the easiest way to pull PSX data programmatically in Python. No account
and no API key are required.

- Website and product: https://pypsx.com
- Web terminal and dashboard: https://markets.pypsx.com
- Documentation: https://docs.pypsx.com
- Trading SDK (backtesting, paper and live trading): [`pypsx`](https://pypi.org/project/pypsx/)
- X: https://x.com/pyPSXofficial · LinkedIn: https://www.linkedin.com/company/pypsx/ · Reddit: https://www.reddit.com/r/pypsx/

## What this package does

`pypsx-toolkit` gives anyone clean PSX data in Python, with no key:

- 10 years of daily OHLCV and recent intraday data.
- Company fundamentals, dividend history, and corporate announcements.
- Index and sector constituents and breakdowns (KSE-100, KMI-30, KSE-30, and more).
- A full market watch, top performers, and quotes.
- A technical-analysis toolkit: moving averages, RSI, MACD, Bollinger Bands, correlation, and risk stats.

Returns clean pandas DataFrames. Built on a real API, not brittle HTML parsing.

## Install

```bash
pip install pypsx-toolkit
```

```python
import pypsx_toolkit as pt

df = pt.download("OGDC", period="10y")          # 10 years of daily bars
pt.get_company_fundamentals("OGDC")
pt.get_dividend_history("HBL")
```

## Going further

For backtesting, a paper-trading sandbox, live real-money trading, and the live feed, use the
[`pypsx`](https://pypi.org/project/pypsx/) SDK with a free key, or trade point-and-click in the web
terminal at https://markets.pypsx.com.

## About pyPSX

pyPSX is the developer platform and company for the Pakistan Stock Exchange. It is distinct from the PSX
exchange itself. Proprietary license. Full documentation at https://docs.pypsx.com.
