Signal-Execution-Labs
mexc-future-agent
Shell✨ New

MEXC crypto trading tools for Claude Code and OpenAI Codex, based on official MEXC API , with support for spot trading, futures trading, getting information about account, REST API, and WebSockets.

Last updated Jul 8, 2026
94
Stars
707
Forks
0
Issues
0
Stars/day
Attention Score
97
Language breakdown
No language data available.
Files click to expand
README

MEXC futures trading bot

TypeScript Node CLI for rule-based automation on MEXC USDT-margined perpetual contracts (contract.mexc.com). Ships with moving-average crossover and grid strategies, dry-run mode, and notional risk caps.

Requirements

  • Node.js 20+
  • MEXC futures account with either Open API credentials (MEXCAPIKEY + MEXCAPISECRET) or a web session key/cookie pair
  • Sufficient USDT margin for the configured symbol and leverage

Setup

cp .env.sample .env
npm install

Commands

| Command | Description | |---------|-------------| | npm run bot | Long-running strategy loop (BOTDRYRUN=true recommended first). | | npm run build | Emit dist/. | | npm run typecheck | tsc --noEmit. |

Strategies

  • ma-cross (default): 9/21 SMA crossover filtered by RSI; closes on opposite cross.
  • grid: Places conceptual buy bands below spot and takes profit toward upper grid levels.
Set BOT_STRATEGY=grid or ma-cross in .env.

Safety

Always start with BOTDRYRUN=true. Perpetual futures carry liquidation risk—RISKMAXPOSITIONUSDT and RISKRISK_PERCENT cap sizing but do not guarantee profitability.

See docs/architecture.md for request flow notes.

License

MIT — see LICENSE.

🔗 More in this category

© 2026 GitRepoTrend · Signal-Execution-Labs/mexc-future-agent · Updated daily from GitHub