ryu878 / Bybit-BTCUSD-Inverse-Perpetual-Scalp-Trading-Bot

Trading bot for Bybit exchange to trade BTCUSD perpetual contract. It use Redis database to cashe the trades data.

Home Page:https://aadresearch.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bybit BTCUSD Inverse Perpetual Scalp Trading Bot License: GPL v3 Generic badge

Latest release

Trading bot for Bybit exchange to trade BTCUSD perpetual contract. It use Redis database to cache the trades data.

That bot will only open shorts, because there are no liquidation price for 1x short on inverse contract and because in most cases funding rates for shorts are positive. If you want to make the bot trade longs you can just copy-paste the logic.

image

Bot logic: bot collects trades from Bybit websocket and calculates high, low and average values for the last 6 minutes. It opens the trade always at higher price and adds more if average price higher the entry.

Requirements

Install libraries:

Run python3 -m venv .bot && source .bot/bin/activate to create virtual env and activate it.

pip install pybit==2.4.1

pip install redis

How to run

  1. Rename config-sample.py to config.py, open it and add your API key credentials. Save it.
  2. Run docker-compose up -d to download and run Redis server for you. Don't forget to limit access to port 8001 on your server. If you don't have docker-compose just run docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest to run Redis.
  3. Run python3 ws_trades_inverse_redis.py to run the script that will collect the data using Bybit websockets and save it to the Redis database.
  4. Run python3 inverse_bot_v5.0.py

Disclaimer

This project is for informational and educational purposes only. You should not use this information or any other material as legal, tax, investment, financial or other advice. Nothing contained here is a recommendation, endorsement or offer by me to buy or sell any securities or other financial instruments. If you intend to use real money, use it at your own risk. Under no circumstances will I be responsible or liable for any claims, damages, losses, expenses, costs or liabilities of any kind, including but not limited to direct or indirect damages for loss of profits.

Contacts

I develop trading bots of any complexity, dashboards and indicators for crypto exchanges, forex and stocks. To contact me:

Discord: https://discord.gg/zSw58e9Uvf

Telegram: https://t.me/aadresearch

Join me at Bybit and earn exclusive rewards with Bybit's Referral Program! Up to 1,025 USDT in rewards await you. https://www.bybit.com/invite?ref=P11NJW

VPS for bots and scripts

I prefer using DigitalOcean.

To get $200 in credit over 60 days use my ref link: https://m.do.co/c/3d7f6e57bc04

About

Trading bot for Bybit exchange to trade BTCUSD perpetual contract. It use Redis database to cashe the trades data.

https://aadresearch.xyz

License:GNU General Public License v3.0


Languages

Language:Python 100.0%