Skip to content
Automation
Skill

/opportunity

Find and execute cross-platform arbitrage opportunities across prediction markets

From plugin
cloddsbot
3.1k121 skills

Claude Code

$ npx -y skills add alsk1992/CloddsBot --skill opportunity --agent claude-code

SKILL.md

opportunity.SKILL.md
name: opportunity
description: "Find and execute cross-platform arbitrage opportunities across prediction markets"
emoji: "🎯"
gates:
  envs:
    anyOf:
      - POLY_API_KEY
      - KALSHI_API_KEY

Opportunity Finder - Complete API Reference

Discover and execute cross-platform arbitrage opportunities across Polymarket, Kalshi, Betfair, Smarkets, Manifold, Metaculus, PredictIt, and Drift.

Based on [arXiv:2508.03474](https://arxiv.org/abs/2508.03474) which found **$40M+ in realized arbitrage** on Polymarket.

Opportunity Types

| Type | Description | Example | |------|-------------|---------| | **Internal** | YES + NO < $1 on same platform | Buy both for guaranteed profit | | **Cross-Platform** | Same market priced differently | Buy low on A, sell high on B | | **Combinatorial** | Logical violations (P(A) > P(B) when A implies B) | Trump > Republican | | **Edge** | Market vs external model (538, polls) | Market 45%, model 52% |

---

Chat Commands

Scanning

/opportunities scan                         # Scan all platforms for opportunities
/opportunities scan "trump"                 # Scan with keyword filter
/opportunities scan --min-edge 2            # Min 2% edge
/opportunities scan --min-liquidity 1000    # Min $1000 liquidity

/opportunities active                       # View active opportunities
/opportunities active --sort edge           # Sort by edge size
/opportunities active --sort liquidity      # Sort by liquidity

Real-Time Monitoring

/opportunities realtime start               # Start continuous scanning
/opportunities realtime stop                # Stop scanning
/opportunities realtime status              # Check monitoring status
/opportunities realtime config --interval 30 # Set scan interval (seconds)

Market Linking

/opportunities link <market-a> <market-b>   # Manually link equivalent markets
/opportunities unlink <market-a> <market-b> # Remove link
/opportunities links                        # View all linked markets
/opportunities auto-match                   # Run auto-matching algorithm

Execution

/opportunities execute <id>                 # Execute an opportunity
/opportunities execute <id> --size 100      # Execute with $100 size
/opportunities mark-taken <id>              # Mark as taken (manual)
/opportunities record-outcome <id> <pnl>    # Record P&L outcome

Analytics

/opportunities stats                        # Performance statistics
/opportunities stats --period 7d            # Last 7 days
/opportunities history                      # Past opportunities
/opportunities by-platform                  # Stats by platform pair
/opportunities by-type                      # Stats by opportunity type

Risk Modeling

/opportunities risk <id>                    # Model execution risk
/opportunities estimate <id>                # Estimate execution costs
/opportunities kelly <id>                   # Calculate Kelly fraction

---

TypeScript API Reference

Create Opportunity Finder

import { createOpportunityFinder } from 'clodds/opportunity';

const finder = createOpportunityFinder({
  platforms: ['polymarket', 'kalshi', 'betfair', 'manifold'],

  // Filtering
  minEdge: 0.5,           // 0.5% minimum edge
  minLiquidity: 500,      // $500 minimum liquidity
  minConfidence: 0.7,     // 70% match confidence

  // Real-time
  enableRealtime: true,
  scanIntervalMs: 30000,  // 30 second intervals

  // Credentials
  polymarket: { apiKey, apiSecret, passphrase, privateKey },
  kalshi: { apiKey, privateKey },
});

Scan for Opportunities

// One-time scan
const opportunities = await finder.scan({
  query: 'election',      // Optional keyword
  minEdge: 1,             // 1% minimum
  minLiquidity: 1000,     // $1000 minimum
  platforms: ['polymarket', 'kalshi'],
});

for (const opp of opportunities) {
  console.log(`${opp.type}: ${opp.description}`);
  console.log(`  Edge: ${opp.edge.toFixed(2)}%`);
  console.log(`  Liquidity: $${opp.liquidity.toLocaleString()}`);
  console.log(`  Confidence: ${(opp.confidence * 100).toFixed(0)}%`);
  console.log(`  Score: ${opp.score}/100`);
  console.log(`  Platforms: ${opp.platforms.join(' ↔ ')}`);
}

Real-Time Monitoring

// Start real-time scanning
await finder.startRealtime();

// Event handlers
finder.on('opportunity', (opp) => {
  console.log(`🎯 New opportunity: ${opp.description}`);
  console.log(`   Edge: ${opp.edge.toFixed(2)}%`);
});

finder.on('opportunityExpired', (opp) => {
  console.log(`❌ Opportunity expired: ${opp.id}`);
});

finder.on('opportunityUpdated', (opp) => {
  console.log(`📊 Updated: ${opp.id} - Edge now ${opp.edge.toFixed(2)}%`);
});

// Get active opportunities
const active = await finder.getActive();

// Stop monitoring
await finder.stopRealtime();

Market Linking

// Manually link equivalent markets
await finder.linkMarkets(
  { platform: 'polymarket', id: 'market-123' },
  { platform: 'kalshi', id: 'TRUMP-WIN' }
);

// Auto-match using semantic similarity
const matches = await finder.autoMatchMarkets({
  minSimilarity: 0.85,
  platforms: ['polymarket', 'kalshi'],
});

console.log(`Found ${matches.length} potential matches`);
for (const match of matches) {
  console.log(`${match.marketA.question}`);
  console.log(`  ↔ ${match.marketB.question}`);
  console.log(`  Similarity: ${(match.similarity * 100).toFixed(0)}%`);
}

// Get all links
const links = await finder.getLinks();

Execute Opportunity

// Execute an opportunity
const result = await finder.execute(opportunityId, {
  size: 100,              // $100 position
  maxSlippage: 0.5,       // 0.5% max slippage
  useProtectedOrders: true,
});

console.log(`Executed: ${result.status}`);
console.log(`  Filled: $${result.filledSize}`);
console.log(`  Avg price: ${result.avgPrice}`);
console.log(`  Fees: $${result.fees}`);

// Mark as taken manually
await find
Read more
@alsk1992
Ships withcloddsbot

Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.

3.1k121 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
3.1k
Star history of alsk1992/CloddsBot on GitHub, a chart by star-history.com

Other skills on cloddsbot.

acp

acp

Enable agent-to-agent commerce with on-chain escrow, cryptographic agreements, and service discovery.

@alsk1992@alsk1992Install Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about opportunity.

Which coding agents can use opportunity?
opportunity installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.