Agent skill
finding-arbitrage-opportunities
Detect profitable arbitrage opportunities across CEX, DEX, and cross-chain markets in real-time. Use when scanning for price spreads, finding arbitrage paths, comparing exchange prices, or analyzing triangular arbitrage opportunities. Trigger with phrases like "find arbitrage", "scan for arb", "price spread", "exchange arbitrage", "triangular arb", "DEX price difference", or "cross-exchange opportunity".
Install this agent skill to your Project
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/main/plugins/crypto/arbitrage-opportunity-finder/skills/finding-arbitrage-opportunities
SKILL.md
Finding Arbitrage Opportunities
Overview
Detect and analyze arbitrage opportunities across cryptocurrency exchanges and DeFi protocols. Aggregates prices from CEX and DEX sources, calculates net profit after fees, and identifies direct, triangular, and cross-chain arbitrage paths.
Prerequisites
- Python 3.9+ with
httpx,rich, andnetworkxpackages - Internet access for API calls (no API keys required for basic use)
- Optional: Exchange API keys for real-time order book access
- Understanding of arbitrage concepts and trading fees
Instructions
-
Quick spread scan on a specific pair:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDCShows current prices per exchange, spread %, estimated profit after fees, and recommended action.
-
Multi-exchange comparison across specific exchanges:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC \ --exchanges binance,coinbase,kraken,kucoin,okx -
DEX price comparison across decentralized exchanges:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC --dex-onlyCompares Uniswap V3, SushiSwap, Curve, Balancer with gas cost estimates.
-
Triangular arbitrage discovery within a single exchange:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular binance --min-profit 0.5 -
Cross-chain opportunities across different blockchains:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py cross-chain USDC \ --chains ethereum,polygon,arbitrum -
Real-time monitoring with threshold alerts:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py monitor ETH USDC \ --threshold 0.5 --interval 5 -
Export opportunities for bot integration:
bashpython ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC --output json > opportunities.json
Output
- Quick mode (default): Best opportunity with profit estimate, buy/sell recommendation, risk level
- Detailed mode (
--detailed): All exchange prices, fee breakdown, slippage estimates, historical spread context - Monitor mode: Real-time updates with threshold alerts and trend indicators
See ${CLAUDE_SKILL_DIR}/references/implementation.md for exchange fee tables and output format examples.
Error Handling
| Error | Cause | Fix |
|---|---|---|
| Rate limited | Too many API requests | Reduce polling frequency or add API key |
| Stale prices | Data older than 10s | Flagged with warning; retry |
| No spread | Efficient market pricing | Normal condition; try different pairs |
| Insufficient liquidity | Trade exceeds order book depth | Reduce trade size |
Examples
Quick ETH/USDC spread scan - Find best buy/sell across all CEX exchanges:
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC
Sample detection output:
ARB OPPORTUNITY: ETH/USDC
Buy: Binance @ $3,198.50 | Sell: Coinbase @ $3,214.20
Spread: 0.49% | Net Profit (after fees): 0.29% ($9.27 per ETH)
Risk: LOW | Confidence: HIGH | Window: ~30s
Triangular arb on Binance - Discover circular paths with minimum 0.5% net profit:
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular binance --min-profit 0.5
Cross-chain USDC opportunities - Compare stablecoin prices across L1/L2 chains:
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py cross-chain USDC --chains ethereum,polygon,arbitrum
Calculate exact profit - Detailed fee breakdown for a specific trade:
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py calc \
--buy-exchange binance --sell-exchange coinbase --pair ETH/USDC --amount 10 # 10 = trade size in ETH
Resources
- CoinGecko API - Free price data
- CCXT Library - Unified exchange API
- Uniswap Subgraph - DEX data
${CLAUDE_SKILL_DIR}/references/implementation.md- Exchange fee tables, configuration, advanced arbitrage types, disclaimer
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dockerfile-generator
Dockerfile Generator - Auto-activating skill for DevOps Basics. Triggers on: dockerfile generator, dockerfile generator Part of the DevOps Basics skill category.
branch-naming-helper
Branch Naming Helper - Auto-activating skill for DevOps Basics. Triggers on: branch naming helper, branch naming helper Part of the DevOps Basics skill category.
readme-generator
Readme Generator - Auto-activating skill for DevOps Basics. Triggers on: readme generator, readme generator Part of the DevOps Basics skill category.
makefile-generator
Makefile Generator - Auto-activating skill for DevOps Basics. Triggers on: makefile generator, makefile generator Part of the DevOps Basics skill category.
gitignore-generator
Gitignore Generator - Auto-activating skill for DevOps Basics. Triggers on: gitignore generator, gitignore generator Part of the DevOps Basics skill category.
pre-commit-hook-setup
Pre Commit Hook Setup - Auto-activating skill for DevOps Basics. Triggers on: pre commit hook setup, pre commit hook setup Part of the DevOps Basics skill category.
Didn't find tool you were looking for?