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".
What this skill does
# 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`, and `networkx` packages
- 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
1. **Quick spread scan** on a specific pair:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC
```
Shows current prices per exchange, spread %, estimated profit after fees, and recommended action.
2. **Multi-exchange comparison** across specific exchanges:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC \
--exchanges binance,coinbase,kraken,kucoin,okx
```
3. **DEX price comparison** across decentralized exchanges:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USDC --dex-only
```
Compares Uniswap V3, SushiSwap, Curve, Balancer with gas cost estimates.
4. **Triangular arbitrage discovery** within a single exchange:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular binance --min-profit 0.5
```
5. **Cross-chain opportunities** across different blockchains:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py cross-chain USDC \
--chains ethereum,polygon,arbitrum
```
6. **Real-time monitoring** with threshold alerts:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py monitor ETH USDC \
--threshold 0.5 --interval 5
```
7. **Export opportunities** for bot integration:
```bash
python ${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:
```bash
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:
```bash
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:
```bash
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:
```bash
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](https://www.coingecko.com/en/api) - Free price data
- [CCXT Library](https://github.com/ccxt/ccxt) - Unified exchange API
- Uniswap Subgraph - DEX data
- `${CLAUDE_SKILL_DIR}/references/implementation.md` - Exchange fee tables, configuration, advanced arbitrage types, disclaimer
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.