Git Product home page Git Product logo

grindhousebot's Introduction

What is GrindhouseBot?

Discord bot that displays live position changes on user's Bybit account and provides real-time price signals depending on chosen strategy.

How to use GrindhouseBot?

  1. Use this guide to create a bot on your Discord account with necessary privileges
  2. Create .env file in root directory with variables api_key, secret_key and discord_bot_token and corresponding values (found on your Bybit API management page and Discord developer portal)
  3. Install the requirements (pip install -r requirements.txt)
  4. Run the main file (python3 main.py)

What commands does the bot understand?

The bot responds to the following commands:

  • !active - displays currently open positions on connected Bybit account
  • !listen positions - starts watching for real-time changes in USDT perpetual contract positions on Bybit
  • !listen signals - starts watching for real-time buy/sell signals for symbols traded via the USDT perpetual contract
  • !unlisten positions - stops watching for real-time position changes
  • !unlisten signals - stops providing real-time buy/sell signals
  • !top winners - displays daily top performing coins
  • !top losers - displays daily worst performing coins
  • !clear - clears the last 200 messages in Discord channel

How does the bot come up with price signals?

After the bot has been started, the live websocket price data from Bybit is filtered and stored in-memory in a pandas dataframe. When it fills up with sufficient data to calculate the RSI values, it will display the coins whose values are above or below certain thresholds. By providing arguments to the Strategy constructor you can set what timeframes you want the signal calculation to be based upon (interval - default 5 minutes) and the number of intervals to store in-memory (window - default 20).

Are there other strategies? Can the bot change strategies on the fly?

There is currently no way to swap strategies on the fly, and there are so for only two strategies to provide signals - the RSIStrategy and MACDStrategy. I have ideas about other strategies, but you are free to help out. I structured the code so it should be simple to get started, and the signals are generated using pandas_ta library, so it should be relatively simple to implement and most of the code is documented ;)

Can the bot save the incoming price data?

Yes! By setting the save_to_db attribute of the PriceHandler object to True, the bot will save all incoming price data within each interval to SQLite DB file called DATA.db which will be created in the root directory. Separate tables will be created for each symbol. This allows you to externally analyze incoming price data on the fly.

I found a bug, can you help me?

As a self-thought programmer, I cannot guarantee that the code will work 100%. This is a hobby project. I tried my best, but bugs happen and I'm always learning. Raise an issue in this repository or even better, contribute to the code.

grindhousebot's People

Contributors

v3rbalgit 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.