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

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

Uploaded Source

Built Distribution

tvw_scraper-0.0.14-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tvw_scraper-0.0.14.tar.gz
  • Upload date:
  • Size: 6.8 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.14.tar.gz
Algorithm Hash digest
SHA256 4bc4ac0f4d0b43389e9c55fbf869e939003ca5666beed30d8c9e3b7bf6bc2f6b
MD5 c9f8954838d3a53e2c0ec898b3748e88
BLAKE2b-256 74cff31620d6d637825761ec3a5e861092ce8cabd8d2a62de148aeca7b790ff0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tvw_scraper-0.0.14-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

Hashes for tvw_scraper-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 d073545cc451cfb21b2bf9a2842b0565a2415feaccace89ab8a082f3dc78ad1c
MD5 244c6d705344431896d7086dc5364f5e
BLAKE2b-256 ffe8edc291b00ba0329a34012ca65571f05683261433b3955e40dfbda0f22607

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