A powerful, real-time Python library for extracting financial data, indicators, and ideas from TradingView.com.
This project is based on mnwato/tradingview-scraper. Thanks to the original author for the foundational work.
For complete documentation, installation guides, API references, and examples, visit:
This library requires Python 3.11+ and uses uv for dependency management.
Install from PyPI (recommended):
pip install tv-scraperOr install with uv (developer / alternate):
# Clone the repository for development
git clone https://github.com/smitkunpara/tv-scraper.git
cd tv-scraper
```,oldString:
# Install runtime deps (uv auto-creates virtual environment)
uv syncIf you prefer to install the published package using uv:
uv add tv-scraperGet RSI and Stochastic indicators for Bitcoin on Binance:
from tv_scraper import Technicals
# Initialize scraper
technicals = Technicals()
# Scrape indicators for BTCUSD
result = technicals.scrape(
exchange="BINANCE",
symbol="BTCUSD",
timeframe="1d",
technical_indicators=["RSI", "Stoch.K"]
)
if result["status"] == "success":
print(result["data"])Get popular trading ideas for Ethereum:
from tv_scraper import Ideas
# Initialize scraper
ideas = Ideas()
# Scrape popular ideas for ETHUSD
result = ideas.scrape(
exchange="CRYPTO",
symbol="ETHUSD",
start_page=1,
end_page=1,
sort_by="popular"
)
if result["status"] == "success":
print(f"Found {len(result['data'])} ideas.")- π Real-Time Data: Stream live OHLCV and indicator values via WebSocket
- π° Comprehensive Coverage: Scrape Ideas, News, Market Movers, and Screener data
- π Fundamental Data: Access detailed financial statements and profitability ratios
- π§ Advanced Tools: Symbol Markets lookup, Symbol Overview, and Minds Community discussions
- π Structured Output: All data returned as clean JSON/Python dictionaries
- π Multi-Market Support: 260+ exchanges across stocks, crypto, forex, and commodities
- β‘ Fast & Reliable: Built with async support and robust error handling
- Indicators: 81+ technical indicators (RSI, MACD, Stochastic, etc.)
- Options: Fetch option chains by expiration or strike price
- Ideas: Community trading ideas and strategies
- News: Financial news with provider filtering
- Real-Time: WebSocket streaming for live data
- Screener: Advanced stock screening with custom filters
- Market Movers: Top gainers, losers, and active stocks
- Fundamentals: Financial statements and ratios
- Calendar: Earnings and dividend events
- 260+ Exchanges: Binance, Coinbase, NASDAQ, NYSE, and more
- 16+ Markets: Stocks, Crypto, Forex, Futures, Bonds
- Real-Time Updates: Live price feeds and indicators
- Historical Data: Backtesting and analysis support
For contributors and developers, this project includes comprehensive tooling for local testing.
# Run all quality checks before committing
make check
# Full CI simulation with coverage
make ci
# Individual checks
make lint # Run ruff linter
make format # Auto-format code
make type-check # Run mypy type checker
make test # Run testsPre-commit hooks automatically run on every commit to enforce code quality:
# Install hooks (one-time setup)
make install-hooksSee LOCAL_TESTING.md for complete details on:
- Makefile commands
- Pre-commit hook configuration
- Running GitHub Actions locally with act
- CI/CD workflow testing
This project is configured to use Trusted Publishing (OIDC) via GitHub Actions. See PUBLISHING.md for step-by-step instructions on setting up your PyPI project.
We welcome contributions! Please see our Contributing Guide for details.
- π Bug Reports: Open an issue
- π‘ Feature Requests: Start a discussion
This project is licensed under the MIT License - see the LICENSE file for details.