Skip to content
Back to skills

Crypto Simulator

ASecurity

Backtest crypto trading strategies (RSI, DCA, MACD, Grid, etc.)

  • 21 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 7, 2026
blockchainbashsqlnodeapiperformance

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill crypto-simulator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crypto Simulator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Crypto Simulator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-crypto-simulator/badge)](https://www.skillsdirectory.com/skills/modbender-crypto-simulator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: crypto-simulator
description: Backtest crypto trading strategies (RSI, DCA, MACD, Grid, etc.)
  against real CoinGecko data.
---


# Crypto Simulator

Backtest and simulate cryptocurrency trading strategies using real market data.

## Quick Start

```bash
cd {skill_dir}
npm install && npm run build

# Backtest a strategy
node dist/cli.js backtest --coin bitcoin --strategy rsi_swing --days 90

# Compare all strategies
node dist/cli.js compare --coin ethereum --days 180

# Optimize parameters
node dist/cli.js optimize --coin bitcoin --strategy rsi_swing

# Start REST API
node dist/cli.js serve --port 3002
```

## Strategies

| Strategy | Best For | Logic |
|----------|----------|-------|
| RSI Swing | Volatile markets | Buy RSI < 30, sell RSI > 70 |
| DCA | Long-term | Fixed-interval buys |
| MA Cross | Trending | Buy/sell on MA crossovers |
| Grid | Ranging | Orders at price grid levels |
| HODL | Bull markets | Buy-and-hold baseline |
| Bollinger Bands | Mean reversion | Trade on band breakouts |
| MACD | Momentum | Signal line crossovers |
| Mean Reversion | Ranging | Buy below mean, sell above |

**Supported coins**: BTC, ETH, SOL, DOGE, ADA, DOT, AVAX, LINK, MATIC, XRP

## API Endpoints

| Method | Path | Description |
|--------|------|-------------|
| `GET` | `/api/prices/:coinId` | Current & historical prices |
| `POST` | `/api/backtest` | Run backtest |
| `GET` | `/api/compare/:coinId` | Compare all strategies |
| `POST` | `/api/optimize` | Find optimal parameters |

## Edge Cases

- **CoinGecko rate limits**: Free tier = ~10-30 req/min. SQLite cache avoids redundant calls
- **Insufficient data**: Short timeframes may lack enough data for indicators (e.g., 50-day MA needs 50+ days)
- **Slippage**: Backtests assume perfect execution — real results will differ

## ⚠️ Disclaimer

**For educational/informational purposes only.** Not financial advice. Past performance ≠ future results.

## Configuration

| Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | 3002 | API server port |
| `CACHE_DIR` | `./data` | SQLite cache directory |

## Requirements

- Node.js 18+
- Internet connection (CoinGecko API)
- No API keys needed (free tier)

Files in this skill

  • SKILL.md2.2 KB
  • package.json749 B
  • src/backtest.ts7.5 KB
  • src/cli.ts12.2 KB
  • src/db.ts10.8 KB
  • src/optimizer.ts12.1 KB
  • src/prices.ts6.9 KB
  • src/server.ts4.9 KB
  • src/simulator.ts5.2 KB
  • src/strategies/bollinger-bands.ts2.4 KB
  • src/strategies/common.ts2.6 KB
  • src/strategies/dca.ts1.8 KB
  • src/strategies/grid.ts2 KB
  • src/strategies/hodl.ts742 B
  • src/strategies/ma-cross.ts2.2 KB
  • src/strategies/macd.ts3.2 KB
  • src/strategies/mean-reversion.ts1.9 KB
  • src/strategies/rsi-swing.ts2.5 KB
  • src/types.ts2.7 KB
  • test/backtest.test.ts3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.