A powerful Python library for scraping real-time market data, indicators, and ideas from TradingView.
Project description
TV Scraper
A powerful, real-time Python library for extracting financial data, indicators, and ideas from TradingView.com.
Attribution
This project is based on mnwato/tradingview-scraper. Thanks to the original author for the foundational work.
📚 Documentation
For complete documentation, installation guides, API references, and examples, visit:
Quick Links
🚀 Quick Start
This library requires Python 3.11+ and uses uv for dependency management.
Installation
Install from PyPI (recommended):
pip install tv-scraper
Or 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 sync
If you prefer to install the published package using uv:
uv add tv-scraper
Basic Usage Examples
Fetching Technical Indicators
Get 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"])
Scraping Trading Ideas
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.")
✨ Key Features
- 📊 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
📋 What's Included
Core Modules
- 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
Data Sources
- 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
🛠️ Development & Testing
For contributors and developers, this project includes comprehensive tooling for local testing.
Quick Commands
# 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 tests
Pre-commit Hooks
Pre-commit hooks automatically run on every commit to enforce code quality:
# Install hooks (one-time setup)
make install-hooks
Full Documentation
See LOCAL_TESTING.md for complete details on:
- Makefile commands
- Pre-commit hook configuration
- Running GitHub Actions locally with act
- CI/CD workflow testing
Publishing to PyPI
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.
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
- 🐛 Bug Reports: Open an issue
- 💡 Feature Requests: Start a discussion
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tv_scraper-1.1.0.tar.gz.
File metadata
- Download URL: tv_scraper-1.1.0.tar.gz
- Upload date:
- Size: 178.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91fb75dc5290b7c566b8b5886ff4257d98f4c44ba6066f9bd116c6cac4e9623e
|
|
| MD5 |
148145c8549e5b1f5cded6a42163f36b
|
|
| BLAKE2b-256 |
aebfced6c635fd3afa2f173d7067548e9b77f70ccdbce005824181f99ac80fc7
|
Provenance
The following attestation bundles were made for tv_scraper-1.1.0.tar.gz:
Publisher:
publish.yml on smitkunpara/tv-scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tv_scraper-1.1.0.tar.gz -
Subject digest:
91fb75dc5290b7c566b8b5886ff4257d98f4c44ba6066f9bd116c6cac4e9623e - Sigstore transparency entry: 973412670
- Sigstore integration time:
-
Permalink:
smitkunpara/tv-scraper@37e33763b1665c26218e2334890665ed842a5951 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/smitkunpara
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@37e33763b1665c26218e2334890665ed842a5951 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tv_scraper-1.1.0-py3-none-any.whl.
File metadata
- Download URL: tv_scraper-1.1.0-py3-none-any.whl
- Upload date:
- Size: 58.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d095955ae70dc63c172d449cd05f36491c10c3bb72f27826242fb8bd9d31cbc
|
|
| MD5 |
8ceb13061bc54e01534bdfc3cc12d322
|
|
| BLAKE2b-256 |
5cf3ad7cc95ce7eb980e33f67c1600c7df56c36e0b1e687857d12e8daeb3119d
|
Provenance
The following attestation bundles were made for tv_scraper-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on smitkunpara/tv-scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tv_scraper-1.1.0-py3-none-any.whl -
Subject digest:
3d095955ae70dc63c172d449cd05f36491c10c3bb72f27826242fb8bd9d31cbc - Sigstore transparency entry: 973412673
- Sigstore integration time:
-
Permalink:
smitkunpara/tv-scraper@37e33763b1665c26218e2334890665ed842a5951 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/smitkunpara
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@37e33763b1665c26218e2334890665ed842a5951 -
Trigger Event:
release
-
Statement type: