This Python script scrapes market screener data directly from TradingView using its internal APIs β no browser automation required.
It supports:
- β Crypto Screener
- β CEX & DEX token lists
- β US Stock Market Screener
- β ETF Screener
All extracted data (including name, price, 24h change, market cap, and volume) is saved to CSV files, grouped by type.
π¬ Want the full working code or a custom scraper?
π§ Email me at isubhanali3@gmail.com
πΌ Hire me on Upwork π¬ Discord:s.a3π¬ Discord:s.a3
- Uses
requeststo query TradingViewβs JSON-based screener API - Extracts dynamic data for:
- Crypto coins
- DEX/CEX tokens
- US stocks
- ETFs
- Saves results to separate
.csvfiles - Prints symbols to console in real time
- Handles pagination internally
- Python 3.x
requestsjsoncsvtime
Install with:
pip install requests
## π§ͺ Code Preview
```python
screeners = {
"crypto": {
"url": "https://scanner.tradingview.com/coin/scan",
"columns": ["base_currency", "close", "24h_close_change|5", "market_cap_calc"]
}
}
def fetch_screener_to_csv(name, config):
payload = {
"columns": config["columns"],
"range": [0, 100],
"sort": {"sortBy": config["columns"][0], "sortOrder": "asc"}
}
response = requests.post(config["url"], headers=headers, data=json.dumps(payload))
# process and save CSV...
This is just a preview.
πΌ Contact me to access the full working source code or request a custom version: