USDT (TRC-20): TP6zpvjt2ZNGfWKPevfp65ZrcbKMWSQXDi
The AsphyxiationGrid is an automated trading system that operates in the KuCoin futures market, implementing the hybrid "Kotegawa-Infinite Grid" strategy. The system combines advanced technical analysis, machine learning and Rust optimizations to identify and execute trading opportunities.
- Volatility regime detection using Isolation Forest
- Adaptive Kairi indicator implementation (ZLEMA)
- RSI and ATR integration for technical analysis
- Trained models persistence system
- KuCoin Futures connection management
- Dynamic grid system with optimised levels
- Order execution with risk management
- Operations monitoring and logging
- Optimised volatility factors calculation
- Grid levels optimization based on historical data
- High performance statistical analysis processing
The "Kotegawa-Infinite Grid" strategy operates in three layers:
-
Volatility Analysis
- Machine Learning for regime detection
- Dynamic parameter adjustment based on market state
-
Grid System
- Levels calculated through Rust optimization
- Automatic adjustment based on current volatility
- Dynamic position rebalancing
-
Risk Management
- Dynamic stop-loss based on ATR
- Adaptive position sizing
- Volatility-controlled leverage
- Python 3.9+
- Rust (latest stable)
- Cargo (for TakashiLib build)
- CPU: 2+ cores
- RAM: 4GB+ (60% available for bot)
- Stable internet connection
base64
ccxt
hashlib
hmac
kucoin-python
maturin
numpy
pandas
psutil
python-dotenv
scikit-learn
ta
ta-lib
pyo3 = "0.18"
statrs = "0.16"
ndarray = "0.15"
# KuCoin API
KUCOIN_API_KEY=<your_api_key>
KUCOIN_API_SECRET=<your_secret>
KUCOIN_API_PASSPHRASE=<your_passphrase>
KUCOIN_IP_WHITELIST=<your_whitelist>
# Trading Parameters
BASE_CURRENCY=USDT
TRADING_PAIRS=BTCUSDTM,ETHUSDTM,XRPUSDTM
TIMEFRAME=1m
KAIRI_PERIOD=25
RSI_PERIOD=14
ATR_PERIOD=14
# Risk Management
MAX_POSITION_SIZE=0.1 # 10% of capital
LEVERAGE=25 # Conservative leverage
USE_ISOLATED_MARGIN=true
STOP_LOSS_PERCENT=3.0 # -3% ROE
TAKE_PROFIT_PERCENT=15.0 # 15% ROE
# Grid Parameters
GRID_LEVELS=10
GRID_SPREAD=0.5 # 0.5% between levels
GRID_REBALANCE_THRESHOLD=5.0
MIN_VOLATILITY_THRESHOLD=2.0
MAX_TRADES_PER_HOUR=20
# Technical Indicators
KAIRI_PERIOD=25
RSI_PERIOD=14
ATR_PERIOD=14
CONVERGENCE_FACTOR=0.75
- Environment preparation:
conda create -n asphyxiation python=3.12
conda activate asphyxiation
- Dependencies installation:
conda install -c conda-forge ccxt python-dotenv numpy pandas ta-lib scikit-learn rust maturin
- TakashiLib build:
maturin develop --release
python AsphyxiationBot.py
historical/
directory: Detailed operation logscache/
directory: Trades and states cachemodels/
directory: Persisted ML models
- Market volatility
- ML model state
- Grid performance
- Margin utilisation
-
Performance
- Required minimum latency: ~100ms
- Memory usage grows with number of pairs
- Processing increases with grid levels
-
Risk Management
- Stop-loss always active
- Leverage limits by volatility
- Protection against connection failures
-
Maintenance
- Daily log verification
- Resource usage monitoring
- Regular configuration backup
- New indicators implementation in
TakashiKotegaModel.py
- Additional optimizations in Rust via
src/lib.rs
- Strategy customization in
AsphyxiationBot.py
- Repository fork
- Feature branch creation
- Tests with
maturin develop
- Pull request with detailed description
For questions and support:
- Check logs in
historical/
- Consult performance metrics
- Review .env configurations
This manual reflects the current system implementation, focusing on critical components and their interactions.
Contributions are welcome! Feel free to open issues or submit pull requests.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
If this project has been helpful, consider making a donation:
USDT (TRC-20): TP6zpvjt2ZNGfWKPevfp65ZrcbKMWSQXDi
Your support helps us continue to develop innovative tools.
To contribute to public and social projects focused on research and artificial intelligence, feel free to support with any amount you prefer.
- Author: David C Cavalcante
- LinkedIn: David C Cavalcante
- Medium: David C Cavalcante
- Positive results, rapid innovation
- Leading the Digital Revolution as the Pioneering 100% Artificial Intelligence Team
- URL: Takk
- Twitter: Takk
- Medium: Takk