$npx -y skills add machina-sports/sports-skills --skill marketsMarkets orchestration — connects ESPN live schedules with Kalshi and Polymarket prediction markets. Unified dashboards, odds comparison, entity search, and bet evaluation across platforms. Use when: user wants to see prediction market odds alongside ESPN game schedules, compare o
| 1 | # Markets Orchestration |
| 2 | |
| 3 | Bridges ESPN live schedules (NBA, NFL, MLB, NHL, WNBA, CFB, CBB) with Kalshi and Polymarket prediction markets. Before writing queries, consult `references/api-reference.md` for supported sport codes, command parameters, and price normalization formats. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ```bash |
| 8 | sports-skills markets get_todays_markets --sport=nba |
| 9 | sports-skills markets search_entity --query="Lakers" --sport=nba |
| 10 | sports-skills markets compare_odds --sport=nba --event_id=401234567 |
| 11 | sports-skills markets get_sport_markets --sport=nfl |
| 12 | sports-skills markets get_sport_schedule --sport=nba |
| 13 | sports-skills markets normalize_price --price=0.65 --source=polymarket |
| 14 | sports-skills markets evaluate_market --sport=nba --event_id=401234567 |
| 15 | sports-skills markets match_markets --sport=mlb --date=2026-06-06 |
| 16 | sports-skills markets get_market_price --venue=kalshi --ticker=KXMENWORLDCUP-26-FR |
| 17 | sports-skills markets get_price_history --venue=kalshi --ticker=KXMENWORLDCUP-26-FR --interval=1d |
| 18 | ``` |
| 19 | |
| 20 | Python SDK: |
| 21 | ```python |
| 22 | from sports_skills import markets |
| 23 | |
| 24 | markets.get_todays_markets(sport="nba") |
| 25 | markets.search_entity(query="Lakers", sport="nba") |
| 26 | markets.compare_odds(sport="nba", event_id="401234567") |
| 27 | markets.get_sport_markets(sport="nfl") |
| 28 | markets.get_sport_schedule(sport="nba", date="2025-02-26") |
| 29 | markets.normalize_price(price=0.65, source="polymarket") |
| 30 | markets.evaluate_market(sport="nba", event_id="401234567") |
| 31 | markets.match_markets(sport="mlb", date="2026-06-06") |
| 32 | markets.get_market_price(venue="kalshi", ticker="KXMENWORLDCUP-26-FR", at_time="2026-05-01T12:00:00+00:00") |
| 33 | markets.get_price_history(venue="polymarket", token_id="<token_id>", interval="1h") |
| 34 | ``` |
| 35 | |
| 36 | ## CRITICAL: Before Any Query |
| 37 | |
| 38 | CRITICAL: Before calling any orchestration command, verify: |
| 39 | - A `sport` code is provided for sport-aware commands (`get_todays_markets`, `compare_odds`, `get_sport_markets`, `evaluate_market`). |
| 40 | - Price sources are identified correctly before normalization: `espn` = American odds, `polymarket` = 0-1 probability, `kalshi` = 0-100 integer. |
| 41 | |
| 42 | ## Important Notes |
| 43 | |
| 44 | - **Sport context is passed through.** `--sport=nba` maps automatically to the correct Polymarket sport code and Kalshi series ticker. |
| 45 | - **Both platforms use sport-aware search.** Polymarket uses `sport` → series_id; Kalshi uses `KXNBA`, `KXNFL`, etc. |
| 46 | - **Prices are normalized.** Everything is converted to implied probability for comparison. |
| 47 | |
| 48 | ## Workflows |
| 49 | |
| 50 | ### Today's NBA Dashboard |
| 51 | |
| 52 | ```bash |
| 53 | sports-skills markets get_todays_markets --sport=nba |
| 54 | ``` |
| 55 | Returns each game with ESPN info, DraftKings odds, matching Kalshi markets, and matching Polymarket markets. |
| 56 | |
| 57 | ### Find Arb on a Specific Game |
| 58 | |
| 59 | 1. Get the ESPN event ID: `get_sport_schedule --sport=nba` |
| 60 | 2. Compare odds: `compare_odds --sport=nba --event_id=<id>` |
| 61 | 3. If arbitrage detected, response includes allocation percentages and guaranteed ROI. |
| 62 | |
| 63 | ### Full Bet Evaluation |
| 64 | |
| 65 | 1. `evaluate_market --sport=nba --event_id=<id>` |
| 66 | 2. Fetches ESPN odds and matching prediction market price |
| 67 | 3. Pipes through `betting.evaluate_bet`: devig → edge → Kelly |
| 68 | 4. Returns fair probability, edge, EV, Kelly fraction, and recommendation |
| 69 | |
| 70 | ### Same Game on Both Venues |
| 71 | |
| 72 | 1. `match_markets --sport=mlb --date=2026-06-06` |
| 73 | 2. Each match pairs the Kalshi event (with market tickers) and the Polymarket event (with moneyline token IDs) for the same game — joined deterministically on date + team codes, fuzzy title match as fallback. |
| 74 | 3. Feed `kalshi.market_tickers[i]` and `polymarket.markets[i].token_ids[j]` straight into `get_market_price` to compare prices. |
| 75 | |
| 76 | ### Price Movement Over Time |
| 77 | |
| 78 | 1. `get_market_price --venue=kalshi --ticker=<ticker> --at_time=2026-05-01` for a single point-in-time price (both `yes`/`no` sides, 0-1). |
| 79 | 2. `get_price_history --venue=kalshi --ticker=<ticker> --interval=1d` for the full series — same `{timestamp, price}` shape on either venue. |
| 80 | |
| 81 | ## Examples |
| 82 | |
| 83 | Example 1: Today's games with prediction market odds |
| 84 | User says: "What NBA games are on today and what are the prediction market odds?" |
| 85 | Actions: |
| 86 | 1. Call `get_todays_markets(sport="nba")` |
| 87 | Result: Unified dashboard with each game's ESPN info and Kalshi/Polymarket prices |
| 88 | |
| 89 | Example 2: Cross-platform team search |
| 90 | User says: "Find |