Metadata-Version: 2.4
Name: tv-scraper
Version: 1.5.0
Summary: A powerful Python library for scraping real-time market data, indicators, and ideas from TradingView.
Project-URL: Homepage, https://github.com/smitkunpara/tv-scraper
Project-URL: Repository, https://github.com/smitkunpara/tv-scraper
Project-URL: Issues, https://github.com/smitkunpara/tv-scraper/issues
Author-email: Smit Kunpara <smitkunpara@gmail.com>
License: MIT
License-File: LICENSE
Keywords: finance,market-data,python,real-time,scraper,technical-analysis,tradingview
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: pyjwt>=2.10.1
Requires-Dist: requests>=2.32.4
Requires-Dist: websocket-client>=1.8.0
Provides-Extra: csv
Requires-Dist: pandas>=2.0.3; extra == 'csv'
Provides-Extra: dev
Requires-Dist: mike>=2.0.0; extra == 'dev'
Requires-Dist: mkdocs-material>=9.0.0; extra == 'dev'
Requires-Dist: mkdocs>=1.5.0; extra == 'dev'
Requires-Dist: mypy>=1.7.0; extra == 'dev'
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-mock; extra == 'dev'
Requires-Dist: ruff>=0.1.6; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Requires-Dist: ruff>=0.1.6; extra == 'test'
Description-Content-Type: text/markdown

# TV Scraper

[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![MIT License](https://img.shields.io/github/license/smitkunpara/tv-scraper.svg?color=brightgreen)](https://opensource.org/licenses/MIT)

**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`](https://smitkunpara.github.io/tv-scraper/latest/streaming/candle_streamer/).
- **⚡ Real-time Pricing**: Persistent WebSocket connection for millisecond-accurate price updates via [`stream_realtime_price`](https://smitkunpara.github.io/tv-scraper/latest/streaming/candle_streamer/#realtime-prices) in `CandleStreamer`.
- **📊 Analyst Forecasts**: Capture analyst price targets, EPS, and revenue estimates for stocks via [`ForecastStreamer`](https://smitkunpara.github.io/tv-scraper/latest/streaming/forecast_streamer/).

### 📉 Financial & Technical Data
- **🧩 Technical Analysis**: Access RSI, MACD, EMAs, and 100+ other indicators via [`Technicals`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/technicals/).
- **🏛️ Fundamentals**: Comprehensive financial statements, ratios, and balance sheets via [`Fundamentals`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/fundamentals/).
- **⛓️ Options Data**: Retrieve full option chains, Greeks, IV, and theoretical prices via [`Options`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/options/).
- **📅 Events Calendar**: Track Earnings, Dividends, IPOs, and Economic events via [`Calendar`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/calendar/).

### 🔍 Discovery & Screening
- **🔎 Screener**: Run advanced market scans with custom filters across 50+ countries via [`Screener`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/screener/).
- **🏁 Market Movers**: Track top gainers, losers, and most active stocks via [`Market Movers`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/market_movers/).
- **🌍 Global Markets**: Discover symbols across exchanges and asset classes via [`Markets`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/markets/).

### 🤝 Social & Community
- **💡 Trading Ideas**: Scrape community-driven trading setups and technical ideas via [`Ideas`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/ideas/).
- **🧠 Heads-up (Minds)**: Access real-time discussions and community posts via [`Minds`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/minds/).
- **📰 News Feed**: Integrated news stream with granular filters by symbol or region via [`News`](https://smitkunpara.github.io/tv-scraper/latest/scrapers/news/).

---

## 🚀 Quick Start

```python
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](https://smitkunpara.github.io/tv-scraper/latest/)**

### Key Resource Links
- [🚀 Quick Start Guide](https://smitkunpara.github.io/tv-scraper/latest/getting-started/)
- [📦 Installation](https://smitkunpara.github.io/tv-scraper/latest/getting-started/#install)
- [📊 Supported Exchanges & Metrics](https://smitkunpara.github.io/tv-scraper/latest/supported_data/)
- [📋 API Conventions](https://smitkunpara.github.io/tv-scraper/latest/api-conventions/)

---

## 🛠️ Development & Contributing

We welcome contributions! Please see our [Contributing Guide](https://smitkunpara.github.io/tv-scraper/latest/contributing/) for details.

- **🐛 Bug Reports**: [Open an issue](https://github.com/smitkunpara/tv-scraper/issues)
- **💡 Feature Requests**: [Start a discussion](https://github.com/smitkunpara/tv-scraper/discussions)

---

## 📄 License

Licensed under the **MIT License**.
