
Polymarket Sync Markets
- 2 installs
- Updated February 16, 2026
- machina-sports/polymarket-template
Syncs active sports prediction markets from the Polymarket Gamma API into documents with prices and vector embeddings.
About
Fetches active Polymarket sports markets with prices, maps them to polymarket-markets documents, and stores them with embeddings. A developer uses it to import prediction-market and sports-odds data with filtering by tag, type, and pagination.
- Filters by tag_id, market type, limit, and offset
- Pipeline: get_sports_markets, mapping, bulk-save with embeddings
Polymarket Sync Markets by the numbers
- 2 all-time installs (skills.sh)
- Ranked #870 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/machina-sports/polymarket-template --skill polymarket-sync-marketsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| Last updated | February 16, 2026 |
| Repository | machina-sports/polymarket-template ↗ |
What it does
Syncs active sports prediction markets from the Polymarket Gamma API into documents with prices and vector embeddings.
Files
Polymarket - Sync Markets
Syncs active sports prediction markets from Polymarket Gamma API into polymarket-markets documents with vector embeddings.
Workflow
Name: polymarket-sync-markets
| Input | Default | Description |
|---|---|---|
tag_id | 1 (Sports) | Polymarket tag filter |
sports_market_types | "" (all) | Filter by type (moneyline, spread, total, etc.) |
limit | 100 | Max markets to fetch |
offset | 0 | Pagination offset |
Usage
# Sync all sports markets
mcp__docker-localhost__execute_workflow(
name="polymarket-sync-markets",
input_data={"tag_id": 1, "limit": 100}
)
# Sync only moneyline markets
mcp__docker-localhost__execute_workflow(
name="polymarket-sync-markets",
input_data={"sports_market_types": "moneyline", "limit": 50}
)Pipeline
get_sports_markets → polymarket-market-mapping → bulk-save (polymarket-markets)Dependencies
- polymarket connector (no auth required)
- machina-ai connector (for embeddings) — requires
$TEMP_CONTEXT_VARIABLE_SDK_OPENAI_API_KEY
Polymarket Sports Market Types
Reference for the 58+ market types available on Polymarket sports.
Common Market Types
| Type | Description | Example |
|---|---|---|
moneyline | Winner of the game | "Will the Lakers win?" |
spread | Point spread | "Will the Chiefs cover -3.5?" |
total | Over/under points | "Will the total go over 45.5?" |
player_points | Player points prop | "Will LeBron score over 25.5?" |
player_rebounds | Player rebounds prop | "Will Jokic get over 10.5 rebounds?" |
player_assists | Player assists prop | "Will Trae Young get over 9.5 assists?" |
player_touchdowns | Player TD prop | "Will Mahomes throw 3+ TDs?" |
player_passing_yards | QB passing yards | "Will Burrow throw over 275.5 yards?" |
player_rushing_yards | RB rushing yards | "Will Henry rush over 90.5 yards?" |
player_receiving_yards | WR receiving yards | "Will Jefferson get over 85.5 yards?" |
first_scorer | First to score | "Who will score first?" |
halftime_result | Halftime winner | "Who leads at halftime?" |
Filtering by Market Type
# Sync only moneyline markets
mcp__docker-localhost__execute_workflow(
name="polymarket-sync-markets",
input_data={"sports_market_types": "moneyline", "limit": 100}
)
# Get all available market types
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_sports_market_types",
payload={}
)Market Data Structure
Each synced market document contains:
{
"title": "Will the Lakers win vs Celtics?",
"sportsMarketType": "moneyline",
"gameId": "game_abc123",
"outcomes": [
{"name": "Yes", "price": 0.55, "clob_token_id": "tok_yes"},
{"name": "No", "price": 0.45, "clob_token_id": "tok_no"}
],
"volume": 150000.0,
"volume24h": 25000.0,
"liquidity": 80000.0,
"spread": 0.02,
"startDate": "2026-02-20T00:00:00Z",
"endDate": "2026-02-21T00:00:00Z",
"eventId": "evt_123",
"tags": ["NBA", "Basketball"]
}Price Interpretation
- Prices are probabilities from 0.0 to 1.0
- Price 0.65 = 65% implied probability
- American odds conversion:
price > 0.5 → -(price/(1-price)*100)else+((1-price)/price*100) - Example: 0.65 → -186, 0.35 → +186
Polymarket Pricing API (CLOB)
Reference for real-time pricing, order books, and trade history via the CLOB API.
Getting Real-Time Prices
Use clob_token_id from market outcomes to fetch live prices.
# Get midpoint + buy/sell prices for a token
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_market_prices",
payload={"token_id": "<clob_token_id>"}
)
# Returns: {midpoint: 0.65, buy_price: 0.64, sell_price: 0.66}
# Batch prices for multiple tokens (max 20)
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_market_prices",
payload={"token_ids": ["tok_1", "tok_2", "tok_3"]}
)Order Book
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_order_book",
payload={"token_id": "<clob_token_id>"}
)
# Returns: {bids: [...], asks: [...], best_bid, best_ask, spread, bid_depth, ask_depth}Price History
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_price_history",
payload={
"token_id": "<clob_token_id>",
"interval": "max", # or "1d", "1w", "1m"
"fidelity": 120 # data points
}
)Last Trade Price
mcp__docker-localhost__connector_executor(
name="polymarket",
command="get_last_trade_price",
payload={"token_id": "<clob_token_id>"}
)
# Returns: {price: 0.65, side: "BUY"}API Endpoints
| Endpoint | Base URL | Description |
|---|---|---|
/midpoint | clob.polymarket.com | Current midpoint price |
/price | clob.polymarket.com | Buy/sell price by side |
/book | clob.polymarket.com | Full order book |
/prices-history | clob.polymarket.com | Historical price data |
/last-trade-price | clob.polymarket.com | Last executed trade |
All CLOB endpoints are public and require no authentication.
skill:
name: "polymarket-sync-markets"
title: "Polymarket - Sync Markets"
description: "Sync sports prediction markets from Polymarket to Machina documents."
version: "1.0.0"
category:
- "data-acquisition"
- "prediction-markets"
status: "available"
domain: "https://github.com/machina-sports/polymarket-template"
references:
- name: "skill-reference"
title: "Market Types"
filename: "references/market-types.md"
filetype: "markdown"
metadata:
category: "reference"
skill: "polymarket-sync-markets"
reference_id: "market-types"
- name: "skill-reference"
title: "Pricing API"
filename: "references/pricing-api.md"
filetype: "markdown"
metadata:
category: "reference"
skill: "polymarket-sync-markets"
reference_id: "pricing-api"
workflows:
- name: "polymarket-sync-markets"
description: "sync-sports-markets"
inputs:
tag_id: "$.get('tag_id', 1)"
sports_market_types: "$.get('sports_market_types', '')"
limit: "$.get('limit', 100)"
offset: "$.get('offset', 0)"
outputs:
workflow-status: "$.get('workflow-status', 'skipped')"