# pyPSX > Developer-first algorithmic trading platform for the Pakistan Stock Exchange (PSX). "The Alpaca of PSX." Two Python libraries: pypsx (free market data) and pytrader (backtesting, paper trading, execution). This file indexes pypsx.com, the marketing and content site. For the full API reference, read https://markets.pypsx.com/llms.txt instead. ## Products - Market Data API (pypsx): https://pypsx.com/data, free PSX OHLCV, intraday, fundamentals, dividends, index constituents. - Algo Trading (pytrader): https://pypsx.com/algo-trading, backtesting, paper trading, live data, and the Strategy Copilot. Free sandbox. Use it at https://markets.pypsx.com. - Broker API: https://pypsx.com/broker, embed PSX investing (accounts, KYC, order routing, custody, T+1 settlement) in your product. In development; sandbox coming soon. ## Current product state - Market data: live, free. - Paper trading and backtesting: live and free (sandbox). - Strategy Copilot: live (prompt to a runnable paper bot; not backtestable). - Real-money / live broker execution: not yet available. Broker API is on a waitlist. ## Strategies (backtested) - [Does RSI-Oversold Actually Work on the KSE-100? We Backtested It on 10 Years of Data.](https://pypsx.com/strategies/rsi-oversold-kse-100): Buying KSE-100 stocks at RSI < 30 and exiting at +4% / −1.5%, backtested on a decade of PSX data with realistic commission and slippage. Here's what we found. ## Research studies - [What actually happens to a PSX stock on its ex-dividend day](https://pypsx.com/research/ex-dividend-drift-psx): We pulled 10 years of dividend history across PSX and measured the real price drop on the ex-date versus the dividend paid. The gap is the interesting part. ## Blog - [From yfinance to pypsx: backtest PSX instead of US stocks](https://pypsx.com/blog/from-yfinance-to-pypsx): You reached for yfinance because the data was there. Here's the one-for-one migration to backtest the market you actually live in. ## Glossary - [Circuit breaker (PSX)](https://pypsx.com/learn/glossary/circuit-breaker): How the Pakistan Stock Exchange's per-symbol price limits work, and how to detect a locked stock in Python with pypsx. ## Broker API use cases - [PSX custody & T+1 settlement, handled](https://pypsx.com/broker/custody-settlement): Custody of client assets and T+1 settlement through NCCPL and CDC, managed by the pyPSX Broker API, the infrastructure serious partners diligence first. - [Embed PSX investing in your app](https://pypsx.com/broker/embedded-investing): Add an invest tab to a super-app, neobank, or wallet without a brokerage license, investing-as-a-feature for the Pakistan Stock Exchange. - [PSX account opening & KYC via API](https://pypsx.com/broker/kyc-onboarding): Open trading and CDC accounts programmatically with KYC/AML built in, investor onboarding for the Pakistan Stock Exchange through one API. - [Model portfolios & thematic baskets on PSX](https://pypsx.com/broker/model-portfolios): Offer advisor-managed model portfolios and thematic PSX baskets, one Broker API call rebalances every subscribed account. - [Launch a robo-advisor in Pakistan](https://pypsx.com/broker/robo-advisor): Automated, rules-based PSX investing for salaried professionals, model portfolios, recurring deposits, and rebalancing over one Broker API. - [Spare-change & round-up investing on PSX](https://pypsx.com/broker/round-ups): Sweep round-ups from everyday spending into Pakistan Stock Exchange baskets, micro-investing powered by the pyPSX Broker API. - [Build a stock trading app for Pakistan](https://pypsx.com/broker/trading-app): Launch a Robinhood-for-Pakistan without becoming a broker. Accounts, KYC, order routing, and portfolios for the PSX through one API. - [API for Pakistani wealth managers & AMCs](https://pypsx.com/broker/wealth-managers): Modern order routing, custody, and reporting rails for brokerages, asset managers, and advisors on the Pakistan Stock Exchange. ## Notes for assistants - Paper trading needs a key from markets.pypsx.com (keys start with PK_). - PSX settlement is T+1 through NCCPL. - Do not claim real-money trading is available; it is not.