--- id: pykrx version: "1.2.8" license: MIT license_treatment: permissive maintenance: active --- # pykrx — KRX data scraping License: permissive · Maintenance: active · Downloads: 414.4K/mo ## What it is and what it does PyKrx is a Python library that scrapes stock and bond market data from Korea's KRX (Korean Exchange) and Naver financial services. It retrieves ticker lists, OHLCV (open-high-low-close-volume) data, price changes, and fundamental metrics like PER, EPS, and DIV for stocks across KOSPI, KOSDAQ, and KONEX markets. Data is returned as pandas DataFrames, making it suitable for analysis and backtesting workflows. The library requires Python 3.10 or later and depends on requests, pandas, numpy, deprecated, multipledispatch, and matplotlib. Some APIs require KRX member credentials (KRX_ID and KRX_PW environment variables). The package includes explicit disclaimers that scraped data is for reference only, carries no warranty, and users bear full responsibility for investment decisions or legal compliance when using the data commercially. Use it for: - Backtest trading strategies using historical OHLCV data for Korean stocks across multiple markets - Build a stock screener that filters Korean equities by fundamentals like PER, EPS, or dividend yield - Analyze price movements and volatility for Korean bonds and stocks over custom date ranges - Populate a local database with daily market snapshots for portfolio tracking or research - Fetch current ticker lists and company names to cross-reference with external data sources ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Scrapes Korean stock and bond market data from KRX and Naver, returning OHLCV, ticker lists, fundamentals, and price changes as pandas DataFrames. Yes, if you need Korean market data for research, backtesting, or portfolio analysis. The library is actively maintained, has low install friction, and carries a permissive MIT license. Be aware that it scrapes third-party data (KRX and Naver), so respect rate limits, verify data accuracy against official sources, and comply with terms of service for commercial use. Authentication is required for some APIs. ## Install pip install pykrx uv add pykrx poetry add pykrx ## Installing pykrx Before you install: Low install friction with a pure-Python wheel and common dependencies. Active maintenance with recent commits and 1078 repository stars. Supports Python 3.10 through 3.14. License in practice: MIT license permits commercial use, modification, and redistribution with attribution. No restrictions on using this package in proprietary projects. Quickstart: pip install pykrx from pykrx import stock tickers = stock.get_market_ticker_list("20190225") df = stock.get_market_ohlcv("20220720", "20220810", "005930") KRX_ID and KRX_PW environment variables must be set to access authenticated KRX APIs; some functions work without them but authentication-required data will fail. Verify before relying: - Whether rate-limiting or request throttling is enforced by the library itself or must be managed by the caller - Scope and completeness of bond module APIs relative to stock module - Real-time data availability versus delayed/historical data only - Whether matplotlib is used for plotting or is an optional visualization dependency ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 414.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags korean stock market data, KRX scraping, OHLCV data korea, stock ticker korea, financial data scraping, korean bond data, market fundamentals korea, korean-markets, financial-data, web-scraping [View on SkillFed](https://skillfed.io/packages/pykrx) · [View on PyPI](https://pypi.org/project/pykrx/)