[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-78386":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},78386,"asterdex-trading-bot","amet2901\u002Fasterdex-trading-bot","amet2901","Automated Crypto Trading Bot on Aster DEX",null,"TypeScript",130,1913,136,0,46.85,false,"main",true,[20,21,22,23],"aster","aster-dex","bot","trading","2026-06-12 04:01:23","\n\n# Aster & HL Trading Bot\n\nA Bun-powered trading workstation for Aster and Hyperliquid perpetual contracts that ships two production-ready agents: an SMA30 trend follower and a dual-sided market maker. The CLI is built with Ink, synchronises risk state from the exchange, and automatically recovers from restarts or disconnects.\n\n* [Aster 30% Fee Discount Referral Link](https:\u002F\u002Fwww.asterdex.com\u002Fzh-CN\u002Freferral\u002F4665f3)\n* [GRVT Fee Discount Referral Link](https:\u002F\u002Fgrvt.io\u002Fexchange\u002Fsign-up?ref=sea)\n* [Hyperliquid Fee Discount Referral Link](https:\u002F\u002Fapp.hyperliquid.xyz\u002Ftrade\u002FBTC)\n\n## Highlights\n- **Live market data & risk sync** via websocket feeds with REST fallbacks, full reconciliation on restart.\n- **Trend engine** featuring SMA30 entries, fixed stop loss, trailing stop, Bollinger bandwidth gate, and profit-lock stepping.\n- **Market-making loop** with adaptive quote chasing, loss caps, and automatic order healing.\n- **Extensible architecture** decoupling exchange adapters, engines, and the Ink CLI for easy venue or strategy additions.\n- **Multi-exchange support** for AsterDex, GRVT, and Hyperliquid exchanges.\n\n## Requirements\n- Bun ≥ 1.2 (`bun`, `bunx` available on PATH)\n- macOS, Linux, or Windows via WSL (native Windows works but WSL is recommended)\n- Node.js is optional unless your environment requires it for tooling\n\n\n## Manual Installation\n1. **Clone the repository**\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Famet2901\u002Fasterdex-trading-bot.git\n   cd asterdex-trading-bot\n   ```\n   Alternatively download the ZIP from GitHub and extract it manually.\n2. **Install Bun**\n   - macOS \u002F Linux: `curl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | bash`\n   - Windows PowerShell: `powershell -c \"irm bun.sh\u002Finstall.ps1 | iex\"`\n   Re-open the terminal and confirm `bun -v` prints a version.\n3. **Install dependencies**\n   ```bash\n   bun install\n   ```\n4. **Create your environment file**\n   ```bash\n   cp .env.example .env\n   ```\n   Edit `.env` with your exchange credentials and overrides.\n5. **Launch the CLI**\n   ```bash\n   bun run index.ts\n   ```\n   Use the arrow keys to pick a strategy, `Enter` to start, `Esc` to return to the menu, and `Ctrl+C` to exit.\n\n## Environment Variables\nThe most important settings shipped in `.env.example` are summarised below:\n\n| Variable | Purpose |\n| --- | --- |\n| `ASTER_API_KEY` \u002F `ASTER_API_SECRET` | Required Aster exchange credentials |\n| `TRADE_SYMBOL` | Contract symbol, defaults to `BTCUSDT` |\n| `TRADE_AMOUNT` | Order size in base asset units |\n| `LOSS_LIMIT` | Max per-trade loss (USDT) before forced close |\n| `TRAILING_PROFIT` \u002F `TRAILING_CALLBACK_RATE` | Trailing stop trigger amount (USDT) and pullback percentage |\n| `PROFIT_LOCK_TRIGGER_USD` \u002F `PROFIT_LOCK_OFFSET_USD` | Move the base stop once unrealised PnL exceeds this trigger |\n| `BOLLINGER_LENGTH` \u002F `BOLLINGER_STD_MULTIPLIER` | Window size and std-dev multiplier for bandwidth filtering |\n| `MIN_BOLLINGER_BANDWIDTH` | Minimum bandwidth ratio required before opening a new position |\n| `PRICE_TICK` \u002F `QTY_STEP` | Exchange precision filters for price and quantity |\n| `POLL_INTERVAL_MS` | Trend engine polling cadence in milliseconds |\n| `MAX_CLOSE_SLIPPAGE_PCT` | Allowed deviation vs mark price when closing |\n| `MAKER_*` | Maker strategy knobs: chase threshold, quote offsets, refresh cadence, etc. |\n\n### Exchange Configuration\n\n**AsterDex (Default)**\n```bash\nEXCHANGE=aster\nASTER_API_KEY=your_aster_api_key\nASTER_API_SECRET=your_aster_api_secret\n```\n\n**GRVT**\n```bash\nEXCHANGE=grvt\nGRVT_API_KEY=your_grvt_api_key\nGRVT_API_SECRET=your_grvt_wallet_secret\nGRVT_SUB_ACCOUNT_ID=your_trading_account_id\n```\n\n**Hyperliquid**\n```bash\nEXCHANGE=hyperliquid\nHYPERLIQUID_WALLET_ADDRESS=your_wallet_address\nHYPERLIQUID_PRIVATE_KEY=your_private_key\n```\n\nTo trade on other exchanges, set `EXCHANGE=grvt` or `EXCHANGE=hyperliquid` and populate the respective credentials documented in `.env.example`.\n\n## Common Commands\n```bash\nbun run index.ts   # Launch the CLI\nbun run start      # Same as above\nbun run dev        # Development entry point\nbun x vitest run   # Execute the Vitest suite\n```\n\n## Silent & Background Execution\n### Direct silent launch\nSkip the Ink menu and start a strategy straight from the CLI:\n\n```bash\nbun run index.ts --strategy trend --silent        # Trend engine\nbun run index.ts --strategy maker --silent        # Maker engine\nbun run index.ts --strategy offset-maker --silent # Offset maker engine\n```\n\n### Package scripts\nConvenience aliases are exposed in `package.json`:\n\n```bash\nbun run start:trend:silent\nbun run start:maker:silent\nbun run start:offset:silent\n```\n\n### Daemonising with pm2\nInstall `pm2` locally (e.g. `bun add -d pm2`) and launch without a global install:\n\n```bash\nbunx pm2 start bun --name aster-hl-trend --cwd . --restart-delay 5000 -- run index.ts --strategy trend --silent\n```\n\nYou can also reuse the bundled scripts:\n\n```bash\nbun run pm2:start:trend\nbun run pm2:start:maker\nbun run pm2:start:offset\n```\n\nAdjust `--name`, `--cwd`, or `--restart-delay` to suit your environment and run `pm2 save` if you want the process to auto-start after reboot.\n\n## Testing\nVitest powers the unit tests:\n```bash\nbun run test\nbun x vitest --watch\n```\n\n## Troubleshooting\n- You need at least 50–100 USDT of capital before deploying a live strategy.\n- Set leverage on the exchange beforehand (around 50x is recommended); the bot does not change it for you.\n- Keep server\u002Fdesktop time in sync with real-world time to avoid signature errors.\n- Make sure the exchange account is in one-way position mode.\n- **Env not loading**: ensure `.env` resides in the repository root and variable names are spelled correctly.\n- **Order rejected for precision**: align `PRICE_TICK`, `QTY_STEP`, and `TRADE_SYMBOL` with the exchange filters.\n- **Permission or auth errors**: double-check exchange API scopes.\n- **Hyperliquid private key security**: use a dedicated trading wallet, not your main wallet's private key.\n\n\n## Disclaimer\nAlgorithmic trading carries risk. Validate strategies with paper accounts or small capital first, safeguard your API keys, and only grant the minimum required permissions.\n\n## Contact\nFor questions or technical support, please contact:\n- Telegram: [@moooncity](https:\u002F\u002Ft.me\u002Fmoooncity)","Aster & HL Trading Bot 是一个基于Bun的自动化交易工作站，专为Aster和Hyperliquid交易所的永续合约设计。该项目提供了两个生产就绪的交易策略：SMA30趋势跟随者和双边做市商。通过WebSocket实时同步市场数据与风险状态，并在重启时自动恢复，确保了交易的连续性。其核心功能包括支持多种交易策略、自适应报价追踪及订单自动修复等。此项目适用于需要自动化执行加密货币交易策略的场景，特别是对那些希望利用算法提高交易效率和风险管理能力的专业投资者而言。此外，该系统架构设计灵活，易于扩展至新的交易所或添加更多交易策略。",2,"2026-05-24 02:30:08","CREATED_QUERY"]