Skip to main content

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.17.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

tvw_scraper-0.0.17-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file tvw_scraper-0.0.17.tar.gz.

File metadata

  • Download URL: tvw_scraper-0.0.17.tar.gz
  • Upload date:
  • Size: 7.1 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

Hashes for tvw_scraper-0.0.17.tar.gz
Algorithm Hash digest
SHA256 f421e15d11e42ec558f5fcde1a48a1e8fc50950080524ee2db89c44f0f2caeea
MD5 3ef6135a4e2c7901349eb49378fd0c42
BLAKE2b-256 112a09ae1be5d58670d024eef709e4ff800cab0e86c9349b738395eb0855f8de

See more details on using hashes here.

File details

Details for the file tvw_scraper-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: tvw_scraper-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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

Hashes for tvw_scraper-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 3509855e1fd11608d596be5b9e7c2b05548f042e8ec68e4de3413baad16d36e9
MD5 b65799bbf39e2787abb0634aa0745272
BLAKE2b-256 c1a3a07711a0f99f650caf3fff33ea1cb4492a848712d4ae22c9eba3da841a58

See more details on using hashes here.

Supported by

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