[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83346":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},83346,"Bitget-AI-Strategy-Trading-Bot","Bitget-Trading-Tool\u002FBitget-AI-Strategy-Trading-Bot","Bitget-Trading-Tool","Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI Strategy Trading Bot Bitget AI","",null,"TypeScript",49,112,1,0,47,6.16,false,"main",true,[],"2026-06-12 02:04:33","# Bitget AI Strategy Trading Bot\n\nProduction-grade **TypeScript** spot trading bot for [Bitget](https:\u002F\u002Fwww.bitget.com) with an **AI signal engine** and pluggable strategies: **ensemble** (recommended), **grid**, **momentum**, **RSI**, and **DCA**. Includes paper trading, risk controls, persisted state, and a CLI for live runs, single ticks, backtests, and grid planning.\n\n## Features\n\n- **AI ensemble** — fuses SMA trend, RSI, MACD, EMA, and Bollinger %B into a scored signal with configurable confidence threshold\n- **Grid trading** — arithmetic or geometric price ladders between `LOWER_PRICE` and `UPPER_PRICE`\n- **Momentum** — short\u002Flong SMA crossover signals\n- **RSI** — oversold\u002Foverbought mean-reversion entries\n- **DCA** — time-based recurring buys\n- **Risk manager** — daily loss cap, max position size, max open orders, min notional\n- **Paper mode** — safe local simulation (default) with synthetic candles and fill simulation\n- **Bitget REST v2** — signed requests for live spot orders when `PAPER_TRADING=false`\n\n## Requirements\n\n- Node.js **20+**\n- npm 9+\n- Bitget API key, secret, and passphrase (live trading only)\n\n## Quick start\n\n```bash\ncd Bitget-AI-Strategy-Trading-Bot\nnpm install\ncp .env.example .env\n# Edit .env — keep PAPER_TRADING=true until you are ready for live trading\nnpm run build\nnpm test\n```\n\n### Paper trading (recommended first)\n\n```bash\nnpm run tick          # single strategy evaluation + optional paper order\nnpm run backtest      # 120-step paper simulation\nnpm run plan          # preview grid levels\nnpm start             # continuous loop (Ctrl+C to stop)\n```\n\n### Live trading\n\nSet in `.env`:\n\n```env\nPAPER_TRADING=false\nBITGET_API_KEY=your_key\nBITGET_API_SECRET=your_secret\nBITGET_PASSPHRASE=your_passphrase\n```\n\nThen:\n\n```bash\nnpm run build\nnpm start\n```\n\n## Configuration\n\nCopy `.env.example` to `.env`. Key variables:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `SYMBOL` | Trading pair | `BTCUSDT` |\n| `STRATEGY` | `ensemble`, `grid`, `momentum`, `rsi`, `dca` | `ensemble` |\n| `LOWER_PRICE` \u002F `UPPER_PRICE` | Grid \u002F ensemble bounds | `60000` \u002F `70000` |\n| `GRID_COUNT` | Number of grid rungs | `10` |\n| `GRID_MODE` | `arithmetic` or `geometric` | `geometric` |\n| `ORDER_SIZE_USDT` | Per-trade notional (USDT) | `50` |\n| `AI_WEIGHT` … `RSI_WEIGHT` | Ensemble weights | `0.4` \u002F `0.2` \u002F `0.2` \u002F `0.2` |\n| `MAX_DAILY_LOSS_USDT` | Stop trading after daily loss | `100` |\n| `PAPER_TRADING` | `true` = simulation | `true` |\n\nSee `.env.example` for the full list.\n\n## Project structure\n\n```\nsrc\u002F\n  ai\u002F           # Technical indicators + AI signal engine\n  cli\u002F          # Commander CLI (start, tick, backtest, plan, status)\n  config\u002F       # Zod schema + env loader\n  engine\u002F       # Trading loop orchestration\n  exchange\u002F     # Bitget REST client + paper simulator\n  services\u002F     # Risk manager + state persistence\n  strategies\u002F   # Grid, momentum, RSI, DCA, ensemble\n  types\u002F        # Shared domain types\n  utils\u002F        # Logger, retry, helpers\ntests\u002F          # Vitest unit & integration tests\n```\n\n## CLI commands\n\n| Command | Description |\n|---------|-------------|\n| `npm start` | Run bot loop |\n| `npm run tick` | One evaluation cycle |\n| `npm run backtest` | Paper backtest (`--steps 200`) |\n| `npm run plan` | Print grid levels |\n| `npm run status` | Show `data\u002Fbot-state.json` |\n| `npm test` | Run test suite |\n| `npm run lint` | ESLint |\n| `npm run typecheck` | TypeScript check |\n\n## Strategies overview\n\n### Ensemble (default)\n\nCombines AI technical scoring with grid, momentum, and RSI sub-signals using configurable weights. Trades only when aggregated strength exceeds `MIN_AI_CONFIDENCE`.\n\n### Grid\n\nPlaces logic on price crossing grid rungs between configured bounds. Best in ranging markets.\n\n### Momentum\n\nTrades SMA crossovers (bullish = buy, bearish = sell).\n\n### RSI\n\nBuys when RSI ≤ `RSI_OVERSOLD`, sells when RSI ≥ `RSI_OVERBOUGHT`.\n\n### DCA\n\nSchedules buys every `DCA_INTERVAL_MS` for `DCA_AMOUNT_USDT`.\n\n## Risk disclaimer\n\nCryptocurrency trading involves substantial risk. This software is provided for educational purposes. Past backtest results do not guarantee future performance. Always test in paper mode and never risk capital you cannot afford to lose.\n\n## License\n\nMIT\n\n---\n\n## Technical support\n\nNeed help deploying, configuring API keys, or debugging strategies?\n\n### Telegram: [@tradingtermin](https:\u002F\u002Ft.me\u002Ftradingtermin)\n\n**Contact:** **@tradingtermin** on Telegram — technical support for this project.\n",2,"2026-06-11 04:11:01","CREATED_QUERY"]