find-xemm-opps
Find Cross-Exchange Market Making (XEMM) opportunities by comparing order book depth and liquidity across exchanges. Identifies pairs where one exchange has thin liquidity (ideal for quoting) and another has deep liquidity (ideal for hedging).
What this skill does
# 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
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/lp-agent/scripts/check_prerequisites.sh)
```
## Workflow
### Step 1: Define Token Pair
```bash
# 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:**
| Column | Description |
|--------|-------------|
| Mid | Mid-price between best bid and ask |
| Spread | Bid-ask spread as % of mid |
| Bid/Ask Depth | Total quote value of top-N order book levels |
| B/A | Bid-to-ask depth ratio (>1 = more buy pressure) |
| Spread ratio | Maker spread ÷ taker spread — higher = better maker edge |
| Depth ratio | Taker depth ÷ maker depth — higher = better hedge liquidity |
## Script Options
| Option | Description |
|--------|-------------|
| `--base` | Base token(s), comma-separated (e.g., ETH,WETH) |
| `--quote` | Quote token(s), comma-separated (e.g., USDT,USDC) |
| `--connectors` | Filter to specific connectors (optional) |
| `--depth` | Order book depth per exchange (default: 20) |
| `--min-spread` | Minimum mid-price spread % between exchanges (default: 0.0) |
| `--include-btc-markets` | Include btc_markets (Australian residents only) |
| `--include-ndax` | Include ndax (Canadian residents only) |
| `--json` | Output as JSON |
## Environment Variables
```bash
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
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.