aster-bot-trading
БесплатноБез исполняемых скриптовНе проверенAutomated perpetual futures trading bot for AsterDEX with dual strategies, risk management, and TypeScript/Node.js stack
от reason-machines★ 99 звёзд на GitHubОб этом скилле
Aster Trading Bot
Skill by ara.so — Daily 2026 Skills collection.
Aster Bot is a TypeScript/Node.js automated trading system for ASTERUSDT perpetual futures on AsterDEX. It features dual strategy engines (Watermellon and Peach Hybrid), configurable risk controls, real-time WebSocket market data, and production-grade logging with CSV/JSON trade records.
Installation
git clone https://github.com/SignalBot-Labs/aster-bot.git
cd aster-bot
npm install
cp env.example .env.local
Edit .env.local with your credentials (see Configuration below), then:
# Dry-run (no real orders)
npm run bot
# Live trading (real orders, real risk)
MODE=live npm run bot
Configuration
All configuration is via environment variables in .env.local.
Required
ASTER_RPC_URL=https://fapi.asterdex.com
ASTER_WS_URL=wss://fstream.asterdex.com/ws
ASTER_API_KEY=$ASTER_API_KEY
ASTER_API_SECRET=$ASTER_API_SECRET
TRADING_WALLET_PRIVATE_KEY=$TRADING_WALLET_PRIVATE_KEY # 64-char hex EVM key
PAIR_SYMBOL=ASTERUSDT-PERP
MODE=dry-run # or: live
Risk Management
MAX_POSITION_USDT=10000
MAX_LEVERAGE=5 # Must be one of: 5, 10, 15, 50
MAX_FLIPS_PER_HOUR=12
STOP_LOSS_PCT=0
TAKE_PROFIT_PCT=0
USE_STOP_LOSS=false
EMERGENCY_STOP_LOSS_PCT=2.0
MAX_POSITIONS=1
REQUIRE_TRENDING_MARKET=true
ADX_THRESHOLD=25
Strategy Selection
STRATEGY_TYPE=peach-hybrid # or: watermellon
Timeframe
VIRTUAL_TIMEFRAME_MS=30000 # Bar size in ms (e.g. 30000 = 30s bars)
Startup Price Guard
The bot calls web3.prc's prices() at startup and checks the responsive field against limitPrice = 0.871 in src/lib/spotPrice.ts. If below, the bot exits.
SKIP_MIN_SPOT_CHECK=true # Skip price gate for local testing only
Strategy Configuration
Watermellon (EMA + RSI trend following)
STRATEGY_TYPE=watermellon
EMA_FAST=8
EMA_MID=21
EMA_SLOW=48
RSI_LENGTH=14
RSI_MIN_LONG=42
RSI_MAX_SHORT=58
Logic:
- Long: bullish EMA stack (fast > mid > slow) + RSI ≥
RSI_MIN_LONG+ ADX ≥ADX_THRESHOLD - Short: bearish EMA stack (fast < mid < slow) + RSI ≤
RSI_MAX_SHORT+ ADX ≥ADX_THRESHOLD
Peach Hybrid (Dual V1 + V2 system)
STRATEGY_TYPE=peach-hybrid
# V1 — trend/bias layer
PEACH_V1_EMA_FAST=8
PEACH_V1_EMA_MID=21
PEACH_V1_EMA_SLOW=48
PEACH_V1_EMA_MICRO_FAST=5
PEACH_V1_EMA_MICRO_SLOW=13
PEACH_V1_RSI_LENGTH=14
PEACH_V1_RSI_MIN_LONG=42.0
PEACH_V1_RSI_MAX_SHORT=58.0
PEACH_V1_MIN_BARS_BETWEEN=1
PEACH_V1_MIN_MOVE_PCT=0.10
# V2 — momentum surge layer
PEACH_V2_EMA_FAST=3
PEACH_V2_EMA_MID=8
PEACH_V2_EMA_SLOW=13
PEACH_V2_RSI_MOMENTUM_THRESHOLD=3.0
PEACH_V2_VOLUME_LOOKBACK=4
PEACH_V2_VOLUME_MULTIPLIER=1.5
PEACH_V2_EXIT_VOLUME_MULTIPLIER=1.2
Key Commands
# Start the bot (dry-run by default)
npm run bot
# TypeScript compilation check
npx tsc --noEmit
# Build
npm run build
# Run compiled output
npm run start
Project Structure
aster-bot/
├── src/
│ ├── bot.ts # Main entry point
│ ├── lib/
│ │ ├── spotPrice.ts # Startup price guard (limitPrice = 0.871)
│ │ ├── logger.ts # Console + file logging
│ │ └── state.ts # Persistent state across restarts
│ ├── strategies/
│ │ ├── watermellon.ts # EMA+RSI trend strategy
│ │ └── peachHybrid.ts # V1+V2 dual strategy
│ ├── execution/
│ │ └── orderManager.ts # Order placement, reconciliation
│ └── risk/
│ └── riskManager.ts # Position limits, stop-loss, flip control
├── data/
│ ├── trades/daily/ # CSV/JSON trade logs
│ └── img/ # Reference chart screenshots
├── env.example # Template for .env.local
└── package.json
Real Code Examples
Reading current configuration in TypeScript
// src/config.ts
import * as dotenv from 'dotenv';
dotenv.config({ path: '.env.local' });
export const config = {
rpcUrl: process.env.ASTER_RPC_URL ?? 'https://fapi.asterdex.com',
wsUrl: process.env.ASTER_WS_URL ?? 'wss://fstream.asterdex.com/ws',
apiKey: process.env.ASTER_API_KEY!,
apiSecret: process.env.ASTER_API_SECRET!,
privateKey: process.env.TRADING_WALLET_PRIVATE_KEY!,
symbol: process.env.PAIR_SYMBOL ?? 'ASTERUSDT-PERP',
mode: (process.env.MODE ?? 'dry-run') as 'dry-run' | 'live',
maxPositionUsdt: Number(process.env.MAX_POSITION_USDT ?? 10000),
maxLeverage: Number(process.env.MAX_LEVERAGE ?? 5),
maxFlipsPerHour: Number(process.env.MAX_FLIPS_PER_HOUR ?? 12),
emergencyStopLossPct: Number(process.env.EMERGENCY_STOP_LOSS_PCT ?? 2.0),
adxThreshold: Number(process.env.ADX_THRESHOLD ?? 25),
requireTrending: process.env.REQUIRE_TRENDING_MARKET === 'true',
strategyType: (process.env.STRATEGY_TYPE ?? 'peach-hybrid') as 'watermellon' | 'peach-hybrid',
virtualTimeframeMs: Number(process.env.VIRTUAL_TIMEFRAME
Установить aster-bot-trading в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aster-bot-trading?
Automated perpetual futures trading bot for AsterDEX with dual strategies, risk management, and TypeScript/Node.js stack
Как установить скилл aster-bot-trading?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aster-bot-trading запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic