Skip to main content

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())

Metadata

Release files for tvw-scraper 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tvw-scraper 0.0.17
File Size Uploaded
tvw_scraper-0.0.17.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tvw-scraper 0.0.17
File Interpreter ABI Platform
tvw_scraper-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / tvw_scraper-0.0.17.tar.gz

Download URL tvw_scraper-0.0.17.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f421e15d11e42ec558f5fcde1a48a1e8fc50950080524ee2db89c44f0f2caeea
BLAKE2b-256 checksum
How to use checksums
112a09ae1be5d58670d024eef709e4ff800cab0e86c9349b738395eb0855f8de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.2 Linux/4.19.0-6-amd64

Release files / tvw_scraper-0.0.17-py3-none-any.whl

Download URL tvw_scraper-0.0.17-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3509855e1fd11608d596be5b9e7c2b05548f042e8ec68e4de3413baad16d36e9
BLAKE2b-256 checksum
How to use checksums
c1a3a07711a0f99f650caf3fff33ea1cb4492a848712d4ae22c9eba3da841a58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.2 Linux/4.19.0-6-amd64

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page