An archived Python prototype for running rule-based Bybit USDT perpetual-futures strategies. It combines WebSocket market/account updates, a strategy abstraction, order and trade lifecycle handling, and a local SQLite-backed trade ledger.
Warning
This is an educational archive, not production-ready trading software or financial advice. It can submit exchange orders. The code has not been audited, has no guarantee of correctness or profitability, and must not be used with real funds without an independent security and risk review. Testnet is the default configuration.
- Bybit HTTP and WebSocket adapters via
pybit - Strategy and indicator interfaces, including Fibonacci and RSI examples
- Trade, order, reconciliation, and persistence components
- A multi-strategy runner for multiple symbols and intervals
- Structured console logging and SQLite table creation at runtime
Requires Python 3.10+ and a Bybit testnet API key with only the permissions required for testing.
git clone https://github.com/kutpat/SabrBotV3.git
cd SabrBotV3
python -m venv .venvActivate the environment, install dependencies, and create local configuration:
# PowerShell
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envEdit .env with testnet credentials. BYBIT_TESTNET=true is the safe default. The application creates Bot/Database/Tables/trading_bot.db locally when it starts; that runtime database is intentionally ignored by Git.
Run the single-strategy or multi-strategy entry point from the Bot directory:
cd Bot
python main.py
# or
python universal_main.pyThe runner configuration in universal_main.py is illustrative. Review every symbol, interval, strategy parameter, and exchange permission before running it.
Bot/
Database/ SQLite persistence and trade/order lifecycle storage
indicators/ Technical indicator implementations
models/ Account, trader, and trade-management components
services/ WebSocket and logging services
strategies/ Base strategy plus example implementations
main.py Single-strategy runner
universal_main.py Multi-strategy runner
- Copy
.env.exampleto.env; never commit actual credentials. - Use exchange keys with the least privilege possible; do not enable withdrawals.
- Rotate keys immediately if they have ever been committed or shared.
- The repository contains no production credentials or historical trade databases.
This repository is published as a portfolio and educational project. It is not actively maintained and pull requests may not receive a response.