Sponsor Suno AI Music arrow_forward
Slash Command

Find Arbitrage

Find arbitrage opportunities across CEX/DEX with real-time detection

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Find Arbitrage is

Find Arbitrage is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Find Arbitrage gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Find Arbitrage

Claude Code

  1. Download find-arbitrage.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/crypto/arbitrage-opportunity-finder/commands/find-arbitrage.md, shared under the repository's MIT license. Read the full file on GitHub.

Advanced arbitrage opportunity scanner that detects profitable trading opportunities across centralized exchanges (CEX), decentralized exchanges (DEX), cross-chain bridges, and funding rate differentials. Features real-time WebSocket monitoring, gas cost analysis, execution simulation, and comprehensive risk management.

Overview

This command scans multiple markets simultaneously to identify price discrepancies that can be exploited for profit. It supports:

  • Cross-Exchange Arbitrage (CEX-CEX): Price differences between Binance, Coinbase, Kraken, and other centralized exchanges
  • DEX Arbitrage: Triangular arbitrage on Uniswap, Sushiswap, Curve, and Balancer
  • Flash Loan Arbitrage: Zero-capital opportunities using Aave/dYdX flash loans
  • Cross-Chain Arbitrage: Bridge opportunities between Ethereum, BSC, Polygon, and Arbitrum
  • Funding Rate Arbitrage: Perpetual futures funding rate discrepancies
  • Statistical Arbitrage: Mean reversion and correlation-based strategies

Key Features

  • Real-Time Detection: WebSocket connections with <100ms latency
  • Profitability Analysis: Gas costs, slippage, and fee calculations
  • Execution Simulation: Test strategies without risking capital
  • Risk Management: Position sizing, stop-loss, and maximum drawdown controls
  • Backtesting Framework: Historical performance analysis
  • Multi-Chain Support: Ethereum, BSC, Polygon, Arbitrum, Optimism

Architecture

┌─────────────────────────────────────────────────────────────┐
│                  Arbitrage Finder Engine                     │
├─────────────────────────────────────────────────────────────┤
│                                                               │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐      │
│  │  CEX Monitor │  │  DEX Monitor │  │ Bridge Monitor│      │
│  │  (WebSocket) │  │  (RPC Calls) │  │  (API Calls) │      │
│  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘      │
│         │                  │                  │              │
│         └──────────┬───────┴──────────────────┘              │
│                    ▼                                          │
│         ┌──────────────────────┐                             │
│         │  Opportunity Detector │                             │
│         │  - Price Analysis    │                             │
│         │  - Spread Calculation│                             │
│         │  - Gas Estimation    │                             │
│         └──────────┬───────────┘                             │
│                    ▼                                          │
…

Implementation

Complete Arbitrage Scanner (800+ Lines)

#!/usr/bin/env python3
"""
Advanced Arbitrage Opportunity Finder
Supports CEX, DEX, flash loans, cross-chain, and funding rate arbitrage
"""

import asyncio
import json
import time
from typing import Dict, List, Optional, Tuple
from dataclasses import dataclass, field
from decimal import Decimal
from enum import Enum
import websockets
import aiohttp
from web3 import Web3
from web3.middleware import geth_poa_middleware
import ccxt.async_support as ccxt
…

Usage Examples

Basic Opportunity Scan

# Find all arbitrage opportunities
/find-arbitrage

# Filter by minimum profit
/find-arbitrage --min-profit 100

# Filter by risk level
/find-arbitrage --risk low

# Specific arbitrage type
/find-arbitrage --type cex_cex

Real-Time Monitoring

# Start WebSocket monitoring
detector = ArbitrageDetector(['binance', 'coinbase', 'kraken'], rpc_url, eth_price)
await detector.start_monitoring(['BTC/USDT', 'ETH/USDT'])

# Get opportunities in real-time
opportunities = detector.get_top_opportunities(limit=10)

Execution Simulation

# Simulate execution with 0.2% slippage
simulator = ExecutionSimulator()
result = await simulator.simulate_execution(opportunity, slippage_percentage=Decimal('0.2'))

# Get statistics
stats = simulator.get_statistics()
print(f"Success Rate: {stats['success_rate']:.1%}")
print(f"Total Profit: ${stats['total_profit_usd']:.2f}")

Backtesting

# Load historical data
backtest = BacktestEngine(initial_capital=Decimal('10000'))
opportunities = backtest.load_historical_data('opportunities.json')

# Run backtest
metrics = backtest.run_backtest(opportunities, strategy='low_risk_only')

print(f"Total Return: {metrics['total_return_percentage']:.2f}%")
print(f"Win Rate: {metrics['win_rate_percentage']:.1f}%")
print(f"Max Drawdown: {metrics['max_drawdown_percentage']:.2f}%")

Risk Management

Position Sizing

  • Maximum Capital Per Trade: 20% of total capital
  • Stop Loss: Close position if loss exceeds 2%
  • Take Profit: Close 50% at 5% profit, trail remaining

Gas Cost Monitoring

# Set maximum acceptable gas cost
max_gas_usd = Decimal('50')

# Filter opportunities
profitable_opps = [
    opp for opp in opportunities
    if opp.gas_cost is None or opp.gas_cost.cost_usd < max_gas_usd
]

Slippage Protection

# Calculate acceptable slippage
max_slippage = Decimal('0.5')  # 0.5%
min_net_profit = opportunity.gross_profit_usd * (1 - max_slippage / 100)

# Only execute if profitable after slippage
if min_net_profit > opportunity.fees_usd:
    execute_trade(opportunity)

Performance Optimization

WebSocket Connection Pooling

  • Maintain persistent WebSocket connections
  • Reconnect automatically on disconnection
  • Rate limit: 10 messages/second per exchange

Price Cache

  • TTL: 1 second for CEX prices
  • TTL: 5 seconds for DEX prices

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Find Arbitrage?

Find Arbitrage is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Find arbitrage opportunities across CEX/DEX with real-time detection

How do I install Find Arbitrage in Claude Code?

Download find-arbitrage.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Find Arbitrage in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Find Arbitrage safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.