{"id":29675881,"url":"https://github.com/un4b0mber/ai-trading-bot","last_synced_at":"2026-05-15T01:05:10.340Z","repository":{"id":305839415,"uuid":"1023704893","full_name":"un4b0mber/ai-trading-bot","owner":"un4b0mber","description":"AI-powered trading bot that predicts BUY / SELL / HOLD signals and executes real-time trades via exchange APIs","archived":false,"fork":false,"pushed_at":"2025-07-22T09:10:22.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T09:39:47.446Z","etag":null,"topics":["3d","ai","bot","cnn-model","convolutional-neural-networks","cryptocurrency","deep-learning","gate-recurrent-unit","ml","python","sequence-models"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/un4b0mber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-21T15:06:22.000Z","updated_at":"2025-07-22T09:12:45.000Z","dependencies_parsed_at":"2025-07-22T09:40:06.991Z","dependency_job_id":null,"html_url":"https://github.com/un4b0mber/ai-trading-bot","commit_stats":null,"previous_names":["un4b0mber/ai-trading-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/un4b0mber/ai-trading-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un4b0mber%2Fai-trading-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un4b0mber%2Fai-trading-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un4b0mber%2Fai-trading-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un4b0mber%2Fai-trading-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/un4b0mber","download_url":"https://codeload.github.com/un4b0mber/ai-trading-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/un4b0mber%2Fai-trading-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266591233,"owners_count":23953082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","ai","bot","cnn-model","convolutional-neural-networks","cryptocurrency","deep-learning","gate-recurrent-unit","ml","python","sequence-models"],"created_at":"2025-07-22T23:38:58.802Z","updated_at":"2026-05-15T01:05:05.309Z","avatar_url":"https://github.com/un4b0mber.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 AI Crypto Trading Bot – Deep Learning with 3D CNN + GRU\n\nA deep learning–powered crypto trading bot using a hybrid 3D CNN + GRU model to predict market signals (`BUY`, `SELL`, `HOLD`) and execute real-time trades via the Binance API.\n\n---\n\n## 🧠 Key Features\n\n- 🔍 **Hybrid Deep Learning Model**  \n  Combines 3D Convolutional Neural Networks and GRU layers to analyze spatio-temporal patterns in market data\n\n- 🧾 **Real-Time Trading**  \n  Executes live trades using the Binance API, based on the model’s predictions\n\n- 🛠️ **Customizable Parameters**  \n  Easily tune training parameters like `epochs`, `batch size`, `learning rate`, etc.\n\n- 💾 **Model State Management**  \n  Saves and loads the best-performing model via PyTorch's `state_dict`\n\n- 💹 **Backtesting Module**  \n  Run strategy simulations on historical data to evaluate performance\n\n- 🔗 **Binance Integration**  \n  Fetches real-time market data (default: BTC/USDT) with easy support for other pairs\n\n- 📦 **Modular Codebase**  \n  Designed for clarity and experimentation — each stage is separated and reusable\n\n---\n\n## 🧠 Why 3D CNN + GRU?\n\n- **3D Convolutional Neural Networks (3D CNNs)** are excellent at capturing *spatio-temporal features* — that is, patterns across both indicators (features) and time.\n- **GRU (Gated Recurrent Units)** are powerful for *sequence modeling*, allowing the model to remember trends and time dependencies.\n- The combination enables the system to recognize complex multi-dimensional market patterns and short-term trends — essential for high-frequency crypto trading.\n\nThis hybrid model aims to improve predictive performance over traditional 2D CNNs or LSTMs used alone.\n\n---\n\n## ⚙️ How It Works\n\nThe pipeline consists of five core Python scripts, each responsible for a key step in the trading workflow:\n\n1. **Data Preparation**  \n   Collects raw crypto data from Binance, computes technical indicators, assigns labels (`BUY`, `SELL`, `HOLD`), normalizes inputs, and applies oversampling to balance the dataset.\n\n2. **Model Training**  \n   Defines and trains the hybrid deep learning model using a combination of 3D CNN and GRU layers. Includes the training loop, loss tracking, and model saving.\n\n3. **Backtesting**  \n   Tests the trained model on historical data to estimate profitability and performance over a selected time period. Outputs include trade logs and profit metrics.\n\n4. **Dynamic Optimizer**  \n   Connects data prep, training, and backtesting in one loop. Automatically adjusts parameters (e.g., learning rate, batch size) every N iterations to search for better results.\n\n5. **Live Trading Bot**  \n   Uses the trained model to make predictions in real-time and places trades via the Binance API based on the current market conditions.\n\n---\n\n## Install Dependencies\n**Install all required libraries with:**\n`pip install requests websocket-client pandas numpy ta torch scikit-learn python-binance python-dotenv`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fun4b0mber%2Fai-trading-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fun4b0mber%2Fai-trading-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fun4b0mber%2Fai-trading-bot/lists"}