tv-scraper Documentation
tv-scraper is a Python library for scraping trading data, ideas, news, and real-time market information from TradingView.com. It provides a clean, modular API with standardized response formats and built-in data export.
Installation
Or with uv:
Quick Start
from tv_scraper import Technicals, Ideas, Screener
# Get technical indicators
tech = Technicals()
result = tech.get_technicals(exchange="NASDAQ", symbol="AAPL")
print(result["data"])
# Fetch trading ideas
ideas = Ideas()
result = ideas.get_ideas(exchange="CRYPTO", symbol="BTCUSD")
print(result["data"])
# Screen stocks
screener = Screener()
result = screener.get_screener(market="america")
print(result["data"])
All methods return a standardized response envelope:
{
"status": "success", # or "failed"
"data": { ... }, # the payload
"metadata": { ... }, # symbol, exchange, etc.
"error": None # error message if status == "failed"
}
Available Modules
Market Data
| Module | Description |
|---|---|
| Technicals | Technical indicators via TradingView scanner API |
| Overview | Symbol overview data (profile, stats, financials) |
| Fundamentals | Fundamental financial graphs and metrics |
| Markets | Market listings and top stocks |
Social
| Module | Description |
|---|---|
| Ideas | Trading ideas from the TradingView community |
| Minds | Minds community discussions |
| News | News headlines and content for symbols |
Screening
| Module | Description |
|---|---|
| Screener | Stock/crypto/forex screener with custom filters |
| Market Movers | Gainers, losers, and most active symbols |
| Symbol Markets | Find all exchanges where a symbol is traded |
Events
| Module | Description |
|---|---|
| Calendar | Earnings and dividend calendar events |
Streaming
| Module | Description |
|---|---|
| Streamer | Real-time OHLCV + indicator + forecast streaming |
Architecture
See the Architecture Guide for details on the modular design, base classes, and data flow.
API Conventions
See API Conventions for details on response formats, error handling, and export options.