Scraping tradingview.com
Project description
tvw_scraper
use asyncio and websockets to retrieve candles and symbol info from tradingview.com
Usage example:
retrieve symbols to use them later in websocket queries
from tvw_scraper.rest import SymbolScanner
from tvw_scraper.models import Sectors
SymbolScanner.get_sector_symbols(Sectors.russia)
{'totalCount': 937, 'data': [{'s': 'MOEX:AFKS', 'd': []}, {'s': 'MOEX:JNJ-RM', 'd': []} . . .
retrieve candles and some info from tradingview websocket:
import asyncio
from tvw_scraper.scraper import TradingviewWsScraper
from tvw_scraper.models import Intervals
scraper = TradingviewWsScraper()
async def main():
result = await asyncio.gather(*[
scraper.get_candles('NASDAQ:NVDA',Intervals.interval_1day),
scraper.get_candles('NASDAQ:NVDA',Intervals.interval_1hour),
scraper.get_symbol('NASDAQ:NVDA')
])
asyncio.get_event_loop().run_until_complete(main())
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
tvw_scraper-0.0.15.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file tvw_scraper-0.0.15.tar.gz
.
File metadata
- Download URL: tvw_scraper-0.0.15.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/4.19.0-6-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05ee76c3addcfc232d7ac6166c4074462a088ed379c693c9339b1a744d3e7981 |
|
MD5 | 32a15145ee6d259dc48ed7f61c819c74 |
|
BLAKE2b-256 | 2cebba199c422bcdb14bbd58c889a4346039ba5a478b12044db0f00cf8be12cc |
File details
Details for the file tvw_scraper-0.0.15-py3-none-any.whl
.
File metadata
- Download URL: tvw_scraper-0.0.15-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/4.19.0-6-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e759950447ac55093729e8b31caf2bd39fc8b29ce1c5156726d4d6b62afec5 |
|
MD5 | 983a619001986fd5600f081534c4a562 |
|
BLAKE2b-256 | 1a1a6640c7bc152811cda264082e78739609be43e48d63a55728c8321134f5fa |