├── tvdatafeed-1.0.0-py3.8.egg ├── requirements.txt ├── LICENSE └── README.md /tvdatafeed-1.0.0-py3.8.egg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumit9926/tvdatafeed/HEAD/tvdatafeed-1.0.0-py3.8.egg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools~=49.2.0 2 | pandas~=1.0.5 3 | selenium~=3.141.0 4 | websocket-client~=0.57.0 5 | chromedriver-autoinstaller -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Anoop Jangra 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **TvDatafeed** 2 | A simple TradingView historical Data Downloader 3 | 4 | For instructions watch this video- 5 | 6 | [![Watch the video](https://img.youtube.com/vi/qDrXmb2ZRjo/hqdefault.jpg)](https://youtu.be/qDrXmb2ZRjo) 7 | 8 | 9 | 10 | --- 11 | 12 | Import the packages and initialize with your tradingview username and password. 13 | 14 | If running for first time it will prompt chromedriver download, type 'y' and press enter. 15 | 16 | ``` 17 | 18 | from tvDatafeed import TvDatafeed,Interval 19 | 20 | username = 'YourTradingViewUsername' 21 | password = 'YourTradingViewPassword' 22 | 23 | 24 | 25 | tv=TvDatafeed(username, password, chromedriver_path=None) 26 | 27 | 28 | ``` 29 | 30 | --- 31 | 32 | To download the data use `tv.get_hist` method. 33 | 34 | It accepts following arguments and returns pandas dataframe 35 | 36 | ``` 37 | 38 | (symbol: str, exchange: str = 'NSE', interval: Interval = Interval.in_daily, n_bars: int = 10, fut_contract: int | None = None) -> DataFrame) 39 | ``` 40 | 41 | for example- 42 | 43 | ``` 44 | nifty_data=tv.get_hist(symbol='NIFTY',exchange='NSE',interval=Interval.in_1_hour,n_bars=1000) 45 | 46 | 47 | ``` 48 | 49 | --- 50 | 51 | Following timeframes intervals are supported- 52 | 53 | `Interval.in_1_minute ` 54 | 55 | `Interval.in_3_minute ` 56 | 57 | `Interval.in_5_minute ` 58 | 59 | `Interval.in_15_minute ` 60 | 61 | `Interval.in_30_minute ` 62 | 63 | `Interval.in_45_minute ` 64 | 65 | `Interval.in_1_hour ` 66 | 67 | `Interval.in_2_hour ` 68 | 69 | `Interval.in_3_hour ` 70 | 71 | `Interval.in_4_hour ` 72 | 73 | `Interval.in_daily ` 74 | 75 | `Interval.in_weekly ` 76 | 77 | `Interval.in_monthly` 78 | --------------------------------------------------------------------------------