Git Product home page Git Product logo

tradingviewscraper's Introduction

Real-time Data Collection and Excel Logging

This Python script is designed to connect to TradingView's WebSocket API, retrieve real-time market data, and log it to an Excel file. The script fetches price data for a specified symbol and logs the data, including timestamp and price, into an Excel file. It is designed to run forever on repl collecting the data you like.

Prerequisites

Before running the script, make sure you have the following dependencies installed:

  • Python 3.x
  • The websocket-client library (pip install websocket-client)
  • The openpyxl library (pip install openpyxl)

Usage

  1. Clone this repository or copy the script to your project directory.
  2. Ensure you have the necessary libraries installed.
  3. Run the script using the command: main.py.

Features

  • Fetches real-time market data from TradingView's WebSocket API.
  • Logs data into an Excel file with today's date as the filename.
  • Data includes timestamp, symbol, and price.

Configuration

  1. Specify the desired symbol by updating the symbol_id variable.
  2. Update the WebSocket URL if necessary (tradingViewSocket).
  3. The script will create a new Excel file named with today's date in the Output folder.

Notes

  • This script is designed to showcase real-time data collection and Excel logging. It can be extended and customized to suit more advanced trading strategies.
  • The script handles interruptions and restarts, maintaining a single Excel file for each day.

License

This project is licensed under the MIT License.


Disclaimer: Trading involves risk, and this script is provided for educational purposes only. Make sure to understand and comply with relevant regulations and perform proper testing before deploying any trading strategies.

tradingviewscraper's People

Contributors

adityadkale avatar

Stargazers

Kaimar Koemets avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.