Skip to main content

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

Project description

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

  • 🕯️ Candle + Indicators: Stream live OHLCV candles with built-in or custom Pine indicators via CandleStreamer.
  • ⚡ Real-time Pricing: Persistent WebSocket connection for millisecond-accurate price updates via stream_realtime_price in CandleStreamer.
  • 📊 Analyst Forecasts: Capture analyst price targets, EPS, and revenue estimates for stocks via ForecastStreamer.

📉 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.

🔍 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tv_scraper-1.5.0.tar.gz (829.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tv_scraper-1.5.0-py3-none-any.whl (66.6 kB view details)

Uploaded Python 3

File details

Details for the file tv_scraper-1.5.0.tar.gz.

File metadata

  • Download URL: tv_scraper-1.5.0.tar.gz
  • Upload date:
  • Size: 829.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tv_scraper-1.5.0.tar.gz
Algorithm Hash digest
SHA256 cdae9e573b27abefba756508b2ab49244cf3a9c0313473c294a4d763528872c6
MD5 b09ca92998d1fb3f37174fa6544ca271
BLAKE2b-256 73d77183806c511b57b675294bfd38b952d07ec6baa679e5cd5df9df3c62fb09

See more details on using hashes here.

Provenance

The following attestation bundles were made for tv_scraper-1.5.0.tar.gz:

Publisher: publish.yml on smitkunpara/tv-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tv_scraper-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: tv_scraper-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 66.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tv_scraper-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09e7a0a332ea9e7b435d70cae4c6e07dcaac770e9e79f65acde4d9ad54b41b3c
MD5 22dbe5d643a18795956262ec78015394
BLAKE2b-256 90aa6c2a9510764fc0e694e6a39412cc733fbe3b680bfa198c04b907ab40af02

See more details on using hashes here.

Provenance

The following attestation bundles were made for tv_scraper-1.5.0-py3-none-any.whl:

Publisher: publish.yml on smitkunpara/tv-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page