mcpField
F
find-xemm-opps

find-xemm-opps

github.com/hummingbotOther32333 installsUpdated 21w ago
Repository

About find-xemm-opps

A skill for ranking cross-exchange market-making opportunities from order book depth and liquidity. It is intended for traders with Hummingbot API and exchange connectors configured.

Key features

  1. 01Compare spreads and mid-prices
  2. 02Analyze order book depth and liquidity
  3. 03Filter by exchange connectors
  4. 04Set a minimum spread threshold
  5. 05Output results as JSON

Use cases

  1. 01Find pairs to quote on one exchange and hedge on another
  2. 02Compare bid and ask depth across exchanges
  3. 03Scan selected token combinations for XEMM

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/hummingbot/skills --skill find-xemm-opps

After installing, type/find-xemm-oppsin Claude Code to confirm it loaded.

Bundled filesscripts/find_xemm_opps.py

Details

From the project README

find-xemm-opps

Find Cross-Exchange Market Making (XEMM) opportunities by analyzing order book depth and liquidity across connected exchanges.

XEMM involves quoting on one exchange (the maker side) while hedging fills on another (the taker/hedge side). The best opportunities exist where:

  • One exchange has a wide spread and thin book (maker side — room to quote profitably)
  • Another has a tight spread and deep book (taker side — cheap to hedge)
  • A mid-price difference exists between them

Prerequisites

Hummingbot API must be running with exchange connectors configured:

bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/lp-agent/scripts/check_prerequisites.sh)

Workflow

Step 1: Define Token Pair
# Scan for SOL/USDT XEMM opportunities
python scripts/find_xemm_opps.py --base SOL --quote USDT

# Include fungible equivalents
python scripts/find_xemm_opps.py --base ETH,WETH --quote USDT,USDC

# Filter to specific connectors
python scripts/find_xemm_opps.py --base BTC --quote USDT --connectors binance,kraken,coinbase,okx

# Minimum mid-price spread between exchanges (default: 0.0%)
python scripts/find_xemm_opps.py --base SOL --quote USDC --min-spread 0.05
Step 2: Interpret Results

The script outputs a market overview table and ranked XEMM opportunity pairs:

====================================================================
  XEMM Opportunities — SOL / USDC
  Order book depth: 20 levels | Sources: 18
====================================================================

  Exchange               Pair            Mid     Spread    Bid Depth    Ask Depth    B/A
  ---------------------- -------------- ---------- -------- ------------ ------------ ------
  bitstamp               SOL-USDC         $87.45   0.120%       $23.4K       $18.9K   1.24
  binance                SOL-USDT         $87.51   0.015%      $412.0K      $389.0K   1.06
  okx                    SOL-USDT         $87.56   0.023%      $287.0K      $301.0K   0.95
  ...

  Top XEMM Opportunities (MAKER → hedge on TAKER):
  ----------------------------------------------------------------

  #1  Score: 8.42
      MAKER  bitstamp               $87.45  spread 0.120%  depth $42.3K
      TAKER  binance                $87.51  spread 0.015%  depth $801.0K
      Mid-price gap: 0.0686%  |  Spread ratio: 8.0x  |  Depth ratio: 18.9x

Columns explained:

ColumnDescription
MidMid-price between best bid and ask
SpreadBid-ask spread as % of mid
Bid/Ask DepthTotal quote value of top-N order book levels
B/ABid-to-ask depth ratio (>1 = more buy pressure)
Spread ratioMaker spread ÷ taker spread — higher = better maker edge
Depth ratioTaker depth ÷ maker depth — higher = better hedge liquidity

Script Options

OptionDescription
--baseBase token(s), comma-separated (e.g., ETH,WETH)
--quoteQuote token(s), comma-separated (e.g., USDT,USDC)
--connectorsFilter to specific connectors (optional)
--depthOrder book depth per exchange (default: 20)
--min-spreadMinimum mid-price spread % between exchanges (default: 0.0)
--include-btc-marketsInclude btc_markets (Australian residents only)
--include-ndaxInclude ndax (Canadian residents only)
--jsonOutput as JSON

Environment Variables

export HUMMINGBOT_API_URL=http://localhost:8000
export API_USER=admin
export API_PASS=admin

Scripts check for .env in: ./hummingbot-api/.env → ~/.hummingbot/.env → .env

Requirements

  • Hummingbot API running
  • At least 2 exchange connectors configured with API keys

Comments

Markdown supported