AgentSkillsCN

exchange

体育博彩交易所的运营工作。在检查交易所健康状况、上线各类市场、寻找套利机会,或实时监控赔率行情时使用。

SKILL.md
--- frontmatter
name: exchange
description: Sportsbook exchange operations. Use when checking exchange health, listing markets, finding arbitrage opportunities, or monitoring real-time odds feeds.

Exchange

Sportsbook exchange operations and real-time odds monitoring.

Usage

text
/exchange health   - Check exchange health status
/exchange markets  - List active markets
/exchange arb      - Get arbitrage opportunities
/exchange metrics  - View exchange performance metrics
/exchange ws       - Monitor WebSocket feed

HTTP Endpoints

EndpointDescription
GET /mcp/exchange/healthExchange health check
GET /mcp/exchange/marketsList active markets
GET /mcp/exchange/arbArbitrage opportunities
GET /mcp/exchange/metricsPerformance metrics
WS /mcp/exchangeReal-time WebSocket feed

Examples

bash
# Check exchange health
curl http://localhost:3333/mcp/exchange/health

# Get current markets
curl http://localhost:3333/mcp/exchange/markets

# Find arbitrage opportunities
curl http://localhost:3333/mcp/exchange/arb

# Get exchange metrics
curl http://localhost:3333/mcp/exchange/metrics

WebSocket Connection

bash
# Monitor real-time feed
bun --eval "
const ws = new WebSocket('ws://localhost:3333/mcp/exchange');
ws.onopen = () => console.log('Connected');
ws.onmessage = (e) => console.log(JSON.parse(e.data));
"

Message Types

TypeDescription
MARKET_UPDATEOdds/price changes
HEARTBEATConnection keepalive
RISK_ALERTRisk threshold exceeded
ARBITRAGEArbitrage opportunity detected

Configuration

VariableDefaultDescription
EXCHANGE_ENABLEDtrueEnable exchange handler
EXCHANGE_MOCK_MODEtrue (dev)Use mock data
EXCHANGE_MOCK_INTERVAL_MS100Mock update interval
EXCHANGE_MOCK_MARKETS_COUNT10Number of mock markets
EXCHANGE_HEARTBEAT_INTERVAL_MS5000WebSocket heartbeat
EXCHANGE_ENABLE_RISK_ALERTStrueBroadcast risk alerts
EXCHANGE_ENABLE_ARBITRAGE_ALERTStrueBroadcast arb alerts

Performance

  • Real-time updates: 10/sec (configurable)
  • Heartbeat: Every 5 seconds
  • Latency: <10.8ms p99
  • Daily requests: 35,546+ across 5 regions

Related Skills

  • /dev - Start development server
  • /metrics - System-wide performance metrics