Skip to main content
skill CX Codex

finding-arbitrage-opportunities — Claude Code skill

finding-arbitrage-opportunities compares top bid and ask prices for a crypto pair across exchanges, applies taker fees, and searches triangular cycles. Useful for checking price gaps.

MIT 1 installs ★ 2,935 updated 2026-11-01

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jeremylongshore/tons-of-skills-marketplace --skill finding-arbitrage-opportunities -a claude-code
Open on GitHub

What finding-arbitrage-opportunities does

This skill checks one exact crypto pair across nine exchanges and reports cross-venue spreads before and after stated taker fees. It can also search three-trade cycles within OKX, KuCoin, or Gate, then watch a pair at a chosen interval.

The workflow runs scripts/arb_finder.py with Python and uses public exchange endpoints. It supports scan, triangular, and monitor, plus JSON output, bundled demo data, and venue-specific fees through --fee. Python 3.9 or newer and network access are required; the skill does not need API keys or third-party packages.

Only markets with the same quote asset are compared. Withdrawal and network costs, fund transfers, price movement, and order-book depth beyond the best bid and ask are excluded, so a positive net spread at the top of the book is not a withdrawable profit.

What it helps with

  • compare one crypto pair across exchanges
  • calculate a spread after taker fees
  • search triangular cycles on OKX, KuCoin, or Gate
  • monitor a pair at a chosen interval
  • run a bundled offline demo

Example prompts for the agent

  • Scan BTC USDT across exchanges and show the net spread after fees.
  • Search for triangular arbitrage on okx with --fee okx=0.1.
  • Monitor SOL USDT every 15 seconds with a zero threshold.

How to install finding-arbitrage-opportunities

1Skills CLI (Vercel)

npx skills add jeremylongshore/tons-of-skills-marketplace --skill finding-arbitrage-opportunities -a claude-code

2Manually: put the files in place

~/.claude/skills/finding-arbitrage-opportunities/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/finding-arbitrage-opportunities/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about finding-arbitrage-opportunities

How do I install finding-arbitrage-opportunities in Claude Code?

Run npx skills add jeremylongshore/tons-of-skills-marketplace --skill finding-arbitrage-opportunities -a claude-code, then check ~/.claude/skills/finding-arbitrage-opportunities/SKILL.md.

What does finding-arbitrage-opportunities do?

The skill compares the best prices for one crypto pair across exchanges, calculates gross and net spreads, and searches triangular cycles within one venue.

What does the skill require?

It requires Python 3.9 or newer and network access to public exchange endpoints. API keys and extra Python packages are not required.

Source text

SKILL.md · MIT
---
name: finding-arbitrage-opportunities
description: 'Compare live best bid and ask for one crypto pair across exchanges and
  report every cross-venue spread, gross and net of stated taker fees; search
  three-trade cycles within one exchange. Read-only, no API keys.

  Use when checking whether a coin trades at different prices on different
  exchanges, sizing a spread against fees, or looking for triangular price gaps on
  OKX, KuCoin or Gate.

  Trigger with phrases like "find arbitrage", "scan for arb", "price spread",
  "exchange price difference", "triangular arb", or "cross-exchange spread".

  '
allowed-tools: Bash(python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py:*)
argument-hint: "<scan BASE QUOTE | triangular VENUE | monitor BASE QUOTE>"
version: 2.0.0
author: Jeremy Longshore <[email protected]>
license: MIT
tags:
- crypto
- arbitrage
- order-book
compatibility: Designed for Claude Code
---
# 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`.

1. **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
   ```

2. **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
   ```

3. **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
   ```

4. **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
   ```

5. **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
   ```

6. **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: [`references/implementation.md`](references/implementation.md).

## Error Handling

| Message | Cause | What to do |
|---------|-------|------------|
| `refused from this network (HTTP 451/403 ...)` | Binance or Bybit blocks the region | Nothing; other venues still report |
| `BTC-USD not listed` (or similar) | The venue has no market for that exact pair | Try another quote asset (USD, USDT, USDC) |
| `no confirmed fee for kucoin` | Triangular search needs a fee | Pass `--fee kucoin=PERCENT` |
| `rate limited (HTTP 429)` | Too many requests | Raise `--interval`, wait a minute |
| `the bundled demo recording covers ...` | `--demo` with something not recorded | Run without `--demo` |
| Exit code 2 | No venue returned data | Read the "Unavailable" list |

More in [`references/errors.md`](references/errors.md).

## Examples

**Cross-venue BTC/USDT check** (an excerpt of captured live output; full runs with their capture time are in `references/examples.md`, and live figures change every minute):

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan BTC USDT --top 3
```

```
Buy        Sell            Gross  Net of fees   Size at best
bitfinex   okx          +0.0293%     -0.3208%    1.35507 BTC
bitfinex   coinbase     +0.0291%          n/a     0.0109 BTC
bitfinex   cryptocom    +0.0258%     -0.4743%     0.3817 BTC
No venue pair stays positive after assumed taker fees.
```

**Triangles on OKX as JSON:**

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py triangular okx --format json
```

**Try it offline:**

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/arb_finder.py scan BTC USDT --demo
```

## Resources

- [`references/implementation.md`](references/implementation.md): endpoints, formulas, fee sources, what is not covered
- [`references/examples.md`](references/examples.md): real output for every command
- [`references/errors.md`](references/errors.md): error messages and fixes
- Tests: `python3 -m unittest discover -s tests -v` (offline)
- Refresh the demo recording: `python3 scripts/record_demo.py`

© Jeremy Longshore · MIT · jeremylongshore/tons-of-skills-marketplace

Similar skills

All skills for Finance and business →
find-arbitrage-opps hummingbot The find-arbitrage-opps skill pulls prices for one pair from every connected exchange and ranks the gaps between the cheapest and priciest source. CX Codex +1 505installs polymarket-arbitrage-trading-bot reason-machines polymarket-arbitrage-trading-bot — a skill that builds a trading bot for Polymarket's 15-minute Up/Down markets: it watches BTC, ETH, SOL and XRP and buys both legs once their combined price drops under a threshold. CX Codex +1 987installs polymarket-arbitrage-bot reason-machines polymarket-arbitrage-bot automates dump-and-hedge strategies on Polymarket 15-minute Up/Down crypto markets. Helps configure TypeScript trading bots, manage CLOB orders, and test without real capital. CX Codex +1 815installs Oracle3 prediction-market arbitrage checks YichengYang-Ethan Oracle3 prediction-market arbitrage checks wires Kalshi and Polymarket into your agent: contract search, quotes, relationship checks and fee math. Handy when you need to compare markets and see the net edge. CX Codex +1 ★ 570repo stars connectors-available hummingbot connectors-available is a Claude Code skill that tests exchange connectivity from your current IP and looks up token trade specifications. It shows minimum order sizes, tick intervals, and order types. CX Codex +1 414installs finding-speaking-opportunities-on-twitter apidojo finding-speaking-opportunities-on-twitter — a skill that searches Twitter for conferences, podcasts, and summits actively recruiting speakers. CX Codex +1 900installs

From the same set139

The whole set →
optimizing-staking-rewards optimizing-staking-rewards compares staking yields across PoS networks and liquid protocols with risk evaluations. Helps identify competitive rates and rebalance positions. CX Codex +1 1installs tracking-crypto-derivatives tracking-crypto-derivatives collects public exchange data on crypto derivatives, including funding, open interest, futures basis, liquidations and options. Use it to compare markets by symbol. CX Codex +1 1installs tracking-crypto-portfolio tracking-crypto-portfolio — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode that monitors crypto holdings with live valuations, asset allocation analysis, and P&L tracking. CX Codex +1 1installs calculating-crypto-taxes calculating-crypto-taxes is a Claude Code skill that processes exchange CSVs, calculates crypto capital gains using FIFO, LIFO, or HIFO, and prepares Form 8949 data. CX Codex +1 1installs routing-dex-trades routing-dex-trades — a skill that pulls quotes from 1inch, Paraswap, and 0x to find swap routes with lower slippage and gas. Use it before trading to compare venues or split a large order. CX Codex +1 1installs simulating-flash-loans simulating-flash-loans simulates flash loans across Aave V3, dYdX, and Balancer without spending real tokens. It estimates arbitrage and liquidation net profits, gas costs, and execution risks. CX Codex +1 1installs speak-hello-world speak-hello-world — a skill for Claude Code, Codex, Cursor, and other platforms that sets up a language tutoring session via the Speak API with pronunciation scoring and real-time feedback. CX Codex +1 1installs speak-cost-tuning speak-cost-tuning — a skill that tunes costs for a Speak API integration. It monitors usage, picks a tier, and makes audio processing cheaper. CX Codex +1 1installs

Project sponsors

Companies that keep this analytics open