Skip to content

About

A powerful Python library for scraping real-time market data, indicators, and ideas from TradingView.

Topics

Resources

Contributing

Stars

51 stars

Watchers

6 watching

Forks

Repository files navigation

TV Scraper

Python 3.11+ MIT License

A high-performance Python library for extracting real-time financial data, technical indicators, and social insights from TradingView.


✨ Features

📡 Real-Time Streaming

📉 Financial & Technical Data

  • 🧩 Technical Analysis: Access RSI, MACD, EMAs, and 100+ other indicators via Technicals.
  • 🏛️ Fundamentals: Comprehensive financial statements, ratios, and balance sheets via Fundamentals.
  • ⛓️ Options Data: Retrieve full option chains, Greeks, IV, and theoretical prices via Options.
  • 📅 Events Calendar: Track Earnings, Dividends, IPOs, and Economic events via Calendar.
  • 🌲 Pine Scripts: Manage Pine Scripts (validate/create/edit/delete) via Pine.

🔍 Discovery & Screening

  • 🔎 Screener: Run advanced market scans with custom filters across 50+ countries via Screener.
  • 🏁 Market Movers: Track top gainers, losers, and most active stocks via Market Movers.
  • 🌍 Global Markets: Discover symbols across exchanges and asset classes via Markets.

🤝 Social & Community

  • 💡 Trading Ideas: Scrape community-driven trading setups and technical ideas via Ideas.
  • 🧠 Heads-up (Minds): Access real-time discussions and community posts via Minds.
  • 📰 News Feed: Integrated news stream with granular filters by symbol or region via News.

🚀 Quick Start

from tv_scraper import CandleStreamer

# Initialize the streamer
streamer = CandleStreamer()

# 1. Fetch historical/real-time candles and indicators
result = streamer.get_candles(
    exchange="BINANCE",
    symbol="BTCUSDT",
    timeframe="1m",
    numb_candles=5,
    indicators=[("STD;RSI", "14")]
)

if result["status"] == "success":
    print("Candles:", result["data"]["ohlcv"])

# 2. Or, stream real-time price and indicators continuously
price_stream = streamer.stream_realtime_price(
    exchange="BINANCE",
    symbol="BTCUSDT",
    indicators=[("STD;RSI", "14")]
)

for tick in price_stream:
    print(f"Price: {tick['price']}, RSI: {tick['indicators'].get('STD;RSI', {}).get('0')}")

📚 Documentation

For complete documentation, installation guides, and API references, visit:

📖 Full Documentation

Key Resource Links


🛠️ Development & Contributing

We welcome contributions! Please see our Contributing Guide for details.


📄 License

Licensed under the MIT License.

About

A powerful Python library for scraping real-time market data, indicators, and ideas from TradingView.

Topics

Resources

Contributing

Stars

51 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages