Skip to content

tv-scraper Documentation

tv-scraper helps you fetch TradingView data through a consistent Python API. The docs here focus on what to call, which inputs are accepted, what the response looks like, and where to find the exact valid values quickly.

Get Started Validation Reference

Start Here

Use these pages when you want the fastest path to a working call:

  • Getting Started: install, first request, exports, cookies, and error checks.
  • API Basics: request patterns, response envelope, and one invalid-input example.
  • Reference Overview: jump straight to exchanges, timeframes, languages, news filters, and releases.
  • Releases & Versioning: see which docs versions exist and how the version switcher works.

Quick Example

from tv_scraper import CandleStreamer

streamer = CandleStreamer()
result = streamer.get_candles(
    exchange="BINANCE",
    symbol="BTCUSDT",
    timeframe="1m",
    numb_candles=5,
    indicators=[("STD;RSI", "1.0")]
)

if result["status"] == "success":
    print(result["data"]["ohlcv"])
else:
    print(result["error"])

Every public method returns the same outer shape:

{
    "status": "success" | "failed",
    "data": ...,
    "metadata": {...},
    "warnings": [str, ...],
    "error": None | "message",
}

Choose By Task

Market Data

Page Use it for
Technicals Scanner indicators such as RSI, EMA, MACD, and pivots
Fundamentals Fundamental fields for one exchange:symbol
Markets Ranked lists of symbols in a market
Options Option-chain lookups by expiry, strike, or both

Screening & Discovery

Page Use it for
Screener Custom filters and sorted scan results
Market Movers Gainers, losers, most active, and stock-specific movers
Symbol Markets Find where a symbol trades across scanners
Calendar Earnings and dividends in a date window

Social & Content

Page Use it for
Ideas Community trading ideas by symbol
Minds Community posts with cursor pagination
News Flow news, symbol headlines, and story content
Pine Authenticated Pine Script operations

Streaming

Page Use it for
CandleStreamer OHLCV candles and indicator studies
ForecastStreamer Analyst forecast data for stocks
Streamer (Legacy) Backward-compatible wrapper

Find Valid Values Faster

If a method asks for a specific exchange, timeframe, provider, language, or news filter, use the exact section links instead of scanning the whole docs site:

Versions

Versioned docs are designed around releases. Docs were introduced in v0.5.0, and the site is set up to use mike for release-aware navigation when published. See Releases & Versioning for the current version list and publishing policy.