Quant-Grade Dynamic Ethereum Grid Trading and Intelligent Portfolio Rebalancing Engine with Live Dashboard Monitoring and Resilient Execution
Project description
Quant-GridBot
Quant-Grade Dynamic Ethereum Grid Trading and Intelligent Portfolio Management Engine
Features
- Direct Ethereum RPC Trading (Native transaction building — No
web3.pydependency) - Dynamic Adaptive Grid Trading Strategy (Real-time volatility clustering and repositioning)
- Dual-Cluster Volatility Detection (Automatic spread adjustments based on live market conditions)
- Live Token Volatility Scoring (Automatic best token selection across ERC20 assets)
- Real Ethereum Transaction Signing (ECDSA + RLP encoding for lightweight direct signing)
- Safe Retry-Protected Data Fetching (gas, price, nonce, balance, with backoff handling)
- Thread-Safe Persistent SQLite Trade Logging (live storage of execution history)
- Interactive Rich Dashboard (live thread health monitoring and wallet status)
- Heartbeat Thread Detection and Auto-Restart (grid and rebalance bots self-heal)
- Secondary RPC Endpoint Fallback Support
- Fully Modular Extensible Architecture (Core, Grid, Rebalance, Wallet, Executor, Scorer, Database, Utilities)
- CLI Launchable (
quantgridbot) - Supports Simulation Mode (
simulate=true) and Full Real Trading - Graceful Safe Shutdown (SIGINT/SIGTERM trapping without data corruption)
- Production-Grade, Open Source (BSD 3-Clause License)
Installation
Clone and install locally:
git clone https://github.com/LoQiseaking69/qgbot.git
cd qgbot
pip install .
Or build a wheel package:
python -m build
pip install dist/qgbot-*.whl
Configuration
Before running, create a config.json file in the project root.
Required fields:
rpc_url: Main Ethereum RPC endpoint (Infura, Alchemy, or custom)secondary_rpc_url: Optional secondary RPC endpoint (fallback)wallet_address: Public Ethereum addressprivate_key: Private key for transaction signing (keep safe)simulate:truefor dry-run mode,falsefor live executiontrade_volume: ETH amount to allocate per tradegrid_lower_pct,grid_upper_pct: Grid spread percentagesgrid_size: Number of grid levelstarget_tokens: ERC20 tokens to consider for tradingstablecoin_address: Stablecoin for rebalancing operationsmin_tokens_out: Minimum token output safeguardtrade_cooldown: Minimum seconds between trade executionsrefresh_interval: Price refresh interval for the GridBotrebalance_threshold: % deviation from ETH balance target to trigger rebalanceslippage_pct: Max allowed slippage when swapping
A ready-to-modify template is provided:
config.example.json
Usage
After configuring:
quantgridbot
The system will:
- Monitor Ethereum price feeds
- Dynamically adapt grid levels
- Detect high-volatility token opportunities
- Execute secured transactions via Uniswap Router
- Rebalance ETH/token holdings automatically
- Persist all trade activity into a local SQLite database
- Provide a live Rich-based dashboard with thread health and wallet status
Project Structure
| Path | Description |
|---|---|
src/qgbot/core.py |
Master system orchestrator (wallet, bots, dashboard) |
src/qgbot/grid.py |
Adaptive dynamic grid trading bot |
src/qgbot/rebalance.py |
Live ETH/token ratio portfolio balancing bot |
src/qgbot/executor.py |
Ethereum transaction builder and RPC sender |
src/qgbot/wallet.py |
Wallet and live token portfolio fetcher |
src/qgbot/scorer.py |
Token volatility scorer and selector |
src/qgbot/db.py |
Persistent, thread-safe SQLite database for trade records |
src/qgbot/utils.py |
Ethereum RPC utilities, RLP encoders, signing helpers |
License
BSD 3-Clause License.
See LICENSE for details.
Quant-GridBot — Engineered for real-world, high-efficiency Ethereum trading automation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantgridbot-2.2.5.tar.gz.
File metadata
- Download URL: quantgridbot-2.2.5.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58e7b0cba940da7cc748b1b3a1eeb5c92eee33645c28de2b666fd246cfd01fa8
|
|
| MD5 |
7bc08836ae21bd2d1ad325fd9b4725e1
|
|
| BLAKE2b-256 |
ace40afdfe8c0724a00d06d469112980a5aa8685806c772787dea9a5571ddcb5
|
File details
Details for the file quantgridbot-2.2.5-py3-none-any.whl.
File metadata
- Download URL: quantgridbot-2.2.5-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
261950e176f949c324e45357818923c559bcbdc4b933add452074cdcb010bdcf
|
|
| MD5 |
b066cf10390040fd0d8dbfe5ab5c64dd
|
|
| BLAKE2b-256 |
c13e632c4a741b2dad4a2e830c5cf516e982a20dcedcdb5de784fdb302c4c197
|