Finding Arbitrage Opportunities
Overview
Compare one exact pair's best bid and ask across nine exchanges and compute every cross-venue spread, gross and net of stated taker fees. A triangular search checks three-trade cycles inside one venue.
Venues: Kraken, Coinbase, KuCoin, Gate, OKX, Bitfinex, Crypto.com, Binance, Bybit. Binance and Bybit refuse US networks (HTTP 451/403); the tool names them and carries on.
Pairs with different quote assets are never compared: BTC/USD against BTC/USDT measures the USDT/USD rate, not an arbitrage.
Prerequisites
- Python 3.9 or newer. Standard library only: no packages, no API keys.
- Network access to the exchanges' public endpoints.
Instructions
All commands run python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py. Every command accepts --format json, --fee VENUE=PERCENT (the actual account taker fee), --demo (bundled recorded data, marked on every line) and --timeout SECONDS.
- Scan one pair across venues:
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan BTC USDT
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan ETH USD --venues kraken,coinbase,bitfinex,gate
```
- Set actual account fees (fees vary by tier, region and token discounts):
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan BTC USDT --fee coinbase=0.6 --fee kucoin=0.1
```
- Express the best net spread in money for a trade size in base units:
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan SOL USDT --amount 25 # 25 = trade size in SOL
```
- Search triangles on one venue (okx, kucoin, gate), using pairs above a 24-hour volume floor:
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular okx
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular kucoin --fee kucoin=0.1 --min-volume-usd 250000 # 250000 = USD volume floor
```
- Watch a pair for a few minutes (minimum interval 5 seconds):
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py monitor BTC USDT --interval 15 --count 8 --threshold 0
```
- See fee assumptions and their sources:
arb_finder.py venues.
When reporting, give the spreads with the fee assumptions and the "not included" list below. Describe what the data shows; never recommend a trade.
Output
Console tables end with sources and the line "Research output only. Not financial advice. This tool places no trades." JSON output is one envelope with skill, version, command, generated_at, mode (live or demo), sources, failures, data, not_included and disclaimer.
Every spread excludes withdrawal and network fees, the time to move funds between venues, price moves in that time, and depth beyond the best bid and ask. A positive net spread at the top of the book is not a collectable amount.
Fee assumptions are base-tier spot taker fees taken from each venue's published schedule (dates and sources in arb_finder.py venues). Gate's is read live from its API. KuCoin and Coinbase do not show a base-tier fee without a login, so their net column reads n/a until --fee sets it. Details: