Skip to content

Quant trading stack with paper-mode default, circuit breakers, and approval guards for crypto exchanges.

CCM score
39 of 100
GitHub stars
29
View on GitHub

Own this plugin? Claim it

What it does

  • Adds the /crypto-trader, /ccxt-exchange, and /metrics-write commands plus pre-trade, post-trade, and circuit breaker hooks
  • Covers a 5-minute trading loop with validation, execution, logging, and metrics for CCXT-supported exchanges
  • Enforces paper mode by default, a PIN-gated approval for live trades, and an emergency kill switch script
  • Designed for crypto traders testing strategies in paper mode before moving to live deployment with risk limits

Complete quantitative trading stack with risk management, circuit breakers, and execution hooks

Add marketplace

/plugin marketplace add jmanhype/claude-code-plugin-marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install quant-trading-system@multi-agent-intelligence-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Quantitative Trading System Plugin

Complete production-grade quantitative trading stack for cryptocurrency markets.

Features

πŸ›‘οΈ Safety First

  • Circuit Breaker - Automatic failover to paper trading on risk/latency errors
  • Kill Switch - Emergency stop all trading with one command
  • Approval Guards - Manual approval required for live trades
  • Pre-trade Validation - Risk checks before every execution

πŸ“Š Trading Infrastructure

  • Risk Manager - Multi-layer risk validation and position sizing
  • CCXT Integration - Support for 100+ cryptocurrency exchanges
  • Metrics Tracking - Comprehensive trade logging and analytics
  • Paper/Live Modes - Safe testing before going live

πŸ”„ Automated Workflows

  • 5-Minute Loop - Continuous trading execution (configurable)
  • Pre-Trade Hooks - Validation, risk checks, approvals
  • Post-Trade Hooks - Logging, metrics, notifications

Installation

/plugin install quant-trading-system

Configuration

Required Environment Variables

EXCHANGE_API_KEY=your_api_key
EXCHANGE_SECRET=your_api_secret

Optional Configuration

PAPER_TRADING=true              # Default: true (safe mode)
TRADE_INTERVAL=5                # Minutes between trades
MAX_POSITION_SIZE=1000          # Maximum position size in USD
RISK_LIMIT_PERCENT=2            # Max risk per trade (%)

Usage

Paper Trading (Safe)

# Hooks automatically enforce paper mode without PIN
/crypto-trader start

Live Trading (Requires Approval)

# Set environment
export PAPER_TRADING=false

# Start trading (will prompt for PIN via guard_approve.sh)
/crypto-trader start

Emergency Stop

# Immediately halt all trading
.claude/hooks/kill_switch.sh

Circuit Breaker

The circuit breaker automatically triggers when:

  • Risk limits exceeded
  • API latency > threshold
  • Unexpected errors occur
  • Loss limit reached

Status: Automatically flips to paper trading mode

Hooks

pre_trade.sh

Runs before every trade:

  • Validates exchange connection
  • Checks risk limits
  • Verifies API keys
  • Requires approval for live trades

post_trade.sh

Runs after every trade:

  • Logs trade details to logs/trades.jsonl
  • Updates metrics database
  • Calculates P&L
  • Sends notifications (if configured)

circuit_breaker.sh

Continuously monitors:

  • API latency
  • Error rates
  • Position sizes
  • P&L thresholds

Auto-recovery: Resumes paper trading after cooldown

Commands

/ccxt-exchange

CCXT exchange operations:

/ccxt-exchange balance           # Check account balance
/ccxt-exchange ticker BTC/USDT   # Get ticker data
/ccxt-exchange markets           # List available markets

/metrics-write

Write custom metrics:

/metrics-write trade_count 42
/metrics-write total_pnl 1250.50

Safety Checklist

Before going live:

  • Test in paper mode for 7+ days
  • Verify risk limits are appropriate
  • Set up kill switch access
  • Configure notification alerts
  • Review circuit breaker thresholds
  • Backup API keys securely
  • Document emergency procedures

Workflows

crypto-trader.md

5-minute trading loop:

  1. Fetch market data
  2. Run strategy signals
  3. Pre-trade validation
  4. Execute trades
  5. Post-trade logging
  6. Sleep until next interval

quant-trading-workflow.md

Complete workflow:

  1. Research phase (DSPy optimization)
  2. Backtesting
  3. Paper trading validation
  4. Gradual live deployment
  5. Continuous monitoring

Risk Management

The risk-manager agent enforces:

  • Position Sizing - Kelly Criterion or fixed %
  • Stop Losses - Automatic exit on loss threshold
  • Take Profits - Lock in gains at targets
  • Exposure Limits - Max total portfolio risk
  • Correlation Limits - Avoid concentrated risk

Troubleshooting

Trade Rejected

Check:

  1. pre_trade.sh logs in .claude/hooks/logs/
  2. Risk limits in configuration
  3. Exchange API connectivity
  4. Account balance

Circuit Breaker Triggered

  1. Check .claude/hooks/logs/circuit_breaker.json
  2. Review error messages
  3. Wait for cooldown period
  4. Restart in paper mode
  5. Investigate root cause

Kill Switch Activated

  1. All positions immediately closed
  2. All orders cancelled
  3. System halted
  4. Manual intervention required to restart

Examples

Basic Setup

# Install plugin
/plugin install quant-trading-system

# Configure
export EXCHANGE_API_KEY=xxx
export EXCHANGE_SECRET=yyy
export PAPER_TRADING=true

# Start paper trading
/crypto-trader start

Production Deployment

# After successful paper trading
export PAPER_TRADING=false
export MAX_POSITION_SIZE=500
export RISK_LIMIT_PERCENT=1

# Start with approval guard
/crypto-trader start
# (Will prompt for PIN approval)

Monitoring

Logs stored in:

.claude/hooks/logs/
β”œβ”€β”€ trades.jsonl          # All trades
β”œβ”€β”€ circuit_breaker.json  # Circuit breaker events
β”œβ”€β”€ pre_trade.json        # Pre-trade validations
└── post_trade.json       # Post-trade results

Metrics database:

db/metrics.db             # SQLite database

Support

Readme

Quantitative Trading System Plugin

Complete production-grade quantitative trading stack for cryptocurrency markets.

Features

πŸ›‘οΈ Safety First

  • Circuit Breaker - Automatic failover to paper trading on risk/latency errors
  • Kill Switch - Emergency stop all trading with one command
  • Approval Guards - Manual approval required for live trades
  • Pre-trade Validation - Risk checks before every execution

πŸ“Š Trading Infrastructure

  • Risk Manager - Multi-layer risk validation and position sizing
  • CCXT Integration - Support for 100+ cryptocurrency exchanges
  • Metrics Tracking - Comprehensive trade logging and analytics
  • Paper/Live Modes - Safe testing before going live

πŸ”„ Automated Workflows

  • 5-Minute Loop - Continuous trading execution (configurable)
  • Pre-Trade Hooks - Validation, risk checks, approvals
  • Post-Trade Hooks - Logging, metrics, notifications

Installation

/plugin install quant-trading-system

Configuration

Required Environment Variables

EXCHANGE_API_KEY=your_api_key
EXCHANGE_SECRET=your_api_secret

Optional Configuration

PAPER_TRADING=true              # Default: true (safe mode)
TRADE_INTERVAL=5                # Minutes between trades
MAX_POSITION_SIZE=1000          # Maximum position size in USD
RISK_LIMIT_PERCENT=2            # Max risk per trade (%)

Usage

Paper Trading (Safe)

# Hooks automatically enforce paper mode without PIN
/crypto-trader start

Live Trading (Requires Approval)

# Set environment
export PAPER_TRADING=false

# Start trading (will prompt for PIN via guard_approve.sh)
/crypto-trader start

Emergency Stop

# Immediately halt all trading
.claude/hooks/kill_switch.sh

Circuit Breaker

The circuit breaker automatically triggers when:

  • Risk limits exceeded
  • API latency > threshold
  • Unexpected errors occur
  • Loss limit reached

Status: Automatically flips to paper trading mode

Hooks

pre_trade.sh

Runs before every trade:

  • Validates exchange connection
  • Checks risk limits
  • Verifies API keys
  • Requires approval for live trades

post_trade.sh

Runs after every trade:

  • Logs trade details to logs/trades.jsonl
  • Updates metrics database
  • Calculates P&L
  • Sends notifications (if configured)

circuit_breaker.sh

Continuously monitors:

  • API latency
  • Error rates
  • Position sizes
  • P&L thresholds

Auto-recovery: Resumes paper trading after cooldown

Commands

/ccxt-exchange

CCXT exchange operations:

/ccxt-exchange balance           # Check account balance
/ccxt-exchange ticker BTC/USDT   # Get ticker data
/ccxt-exchange markets           # List available markets

/metrics-write

Write custom metrics:

/metrics-write trade_count 42
/metrics-write total_pnl 1250.50

Safety Checklist

Before going live:

  • Test in paper mode for 7+ days
  • Verify risk limits are appropriate
  • Set up kill switch access
  • Configure notification alerts
  • Review circuit breaker thresholds
  • Backup API keys securely
  • Document emergency procedures

Workflows

crypto-trader.md

5-minute trading loop:

  1. Fetch market data
  2. Run strategy signals
  3. Pre-trade validation
  4. Execute trades
  5. Post-trade logging
  6. Sleep until next interval

quant-trading-workflow.md

Complete workflow:

  1. Research phase (DSPy optimization)
  2. Backtesting
  3. Paper trading validation
  4. Gradual live deployment
  5. Continuous monitoring

Risk Management

The risk-manager agent enforces:

  • Position Sizing - Kelly Criterion or fixed %
  • Stop Losses - Automatic exit on loss threshold
  • Take Profits - Lock in gains at targets
  • Exposure Limits - Max total portfolio risk
  • Correlation Limits - Avoid concentrated risk

Troubleshooting

Trade Rejected

Check:

  1. pre_trade.sh logs in .claude/hooks/logs/
  2. Risk limits in configuration
  3. Exchange API connectivity
  4. Account balance

Circuit Breaker Triggered

  1. Check .claude/hooks/logs/circuit_breaker.json
  2. Review error messages
  3. Wait for cooldown period
  4. Restart in paper mode
  5. Investigate root cause

Kill Switch Activated

  1. All positions immediately closed
  2. All orders cancelled
  3. System halted
  4. Manual intervention required to restart

Examples

Basic Setup

# Install plugin
/plugin install quant-trading-system

# Configure
export EXCHANGE_API_KEY=xxx
export EXCHANGE_SECRET=yyy
export PAPER_TRADING=true

# Start paper trading
/crypto-trader start

Production Deployment

# After successful paper trading
export PAPER_TRADING=false
export MAX_POSITION_SIZE=500
export RISK_LIMIT_PERCENT=1

# Start with approval guard
/crypto-trader start
# (Will prompt for PIN approval)

Monitoring

Logs stored in:

.claude/hooks/logs/
β”œβ”€β”€ trades.jsonl          # All trades
β”œβ”€β”€ circuit_breaker.json  # Circuit breaker events
β”œβ”€β”€ pre_trade.json        # Pre-trade validations
└── post_trade.json       # Post-trade results

Metrics database:

db/metrics.db             # SQLite database

Support

Details

Marketplace
jmanhype/claude-code-plugin-marketplace
Source
plugins/quant-trading-system
Category
Community
Listed since
Apr 7, 2026

Questions

What does the quant-trading-system plugin add to Claude Code?

The quant-trading-system plugin adds a crypto trading stack with a circuit breaker that fails over to paper trading, a kill switch, approval guards for live trades, and pre-trade and post-trade hooks. It also provides the /crypto-trader workflow and the /ccxt-exchange and /metrics-write commands.

How do I install the quant-trading-system plugin?

Run /plugin marketplace add jmanhype/claude-code-plugin-marketplace first, then run /plugin install quant-trading-system@multi-agent-intelligence-marketplace inside Claude Code. The plugin then gives you the crypto-trader and exchange commands for trading on cryptocurrency exchanges.

Does quant-trading-system trade with real money by default?

No, the quant-trading-system plugin defaults to paper trading through its PAPER_TRADING setting. Live trades need PAPER_TRADING set to false and a PIN approval through its guard_approve.sh script.

Where does quant-trading-system stand in the Finance & Trading category?

The quant-trading-system plugin is listed in the Finance & Trading category on Claude Marketplaces, alongside ruflo-market-data, ruflo-neural-trader, daily-stock-analysis, benzinga-automation and Braintree Automation. It stands out for its built-in safety layer of circuit breakers, kill switch and approval guards.

More from jmanhype/claude-code-plugin-marketplace

All 22

Similar to quant-trading-system

More Finance & Trading