You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/en/token-api/guides/polymarket.mdx
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ sidebarTitle: Polymarket Data
5
5
6
6
The Graph's Token API provides a complete set of REST endpoints for querying Polymarket's on-chain prediction market data. These endpoints are purpose-built for **research, analytics, and historical analysis** — covering markets, platform-wide aggregates, and individual user performance.
7
7
8
-
###Why Use The Graph for Polymarket Data?
8
+
## Why Use The Graph for Polymarket Data
9
9
10
-
Polymarket already exposes its own API for real-time order flow and WebSocket feeds optimized for low-latency trading. The Graph's Polymarket endpoints serve a different purpose: they give researchers, analysts, and builders structured access to **aggregated, historical, and cross-market data** that Polymarket's native API doesn't surface.
10
+
Polymarket already exposes its own API for real-time order flow and WebSocket feeds optimized for low-latency trading. The Graph's Polymarket endpoints serve a different purpose: they give researchers, analysts, and builders structured access to **aggregated, historical, and cross-market data** that Polymarket's native API doesn't surface.
11
11
12
-
**What Users Get with The Graph's Token API:**
12
+
### What Users Get with The Graph's Token API
13
13
14
14
-**Platform-wide aggregates:** Daily or weekly volume, open interest, fees, and split/merge activity rolled up across every Polymarket market. Track the platform's growth trajectory, not just individual markets.
15
15
-**User leaderboards and PnL breakdowns:** Paginated rankings by volume, realized PnL, unrealized PnL, or trade count. Drill into any address to see per-token position history, cost basis, and entry prices.
@@ -18,9 +18,8 @@ Polymarket already exposes its own API for real-time order flow and WebSocket fe
18
18
-**OHLCV price history:** Standard candlestick data for any outcome token, ready for charting and backtesting.
19
19
20
20
> **A note on latency:** If you need sub-second order book data or execution, Polymarket's native WebSocket endpoints are the right tool. The Graph's Polymarket endpoints are optimized for structured queries over historical and aggregated data, which feeds dashboards, research reports, and strategy backtests.
21
-
>
22
21
23
-
###Getting Started
22
+
## Getting Started
24
23
25
24
All Polymarket endpoints are available under the Token API base URL:
You can also set up the [Token API MCP](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) to query Polymarket in your AI assistant.
38
35
@@ -49,7 +46,7 @@ You can also set up the [Token API MCP](https://thegraph.com/docs/en/ai-suite/to
49
46
|**Users**|`/v1/polymarket/users`| User stats and leaderboard (volume, PnL, trade counts) |
50
47
|**Users**|`/v1/polymarket/users/positions`| Per-user position breakdown with cost basis and PnL |
51
48
52
-
###Recommended Use Cases
49
+
## Recommended Use Cases
53
50
54
51
**1. Portfolio review and self-analysis**
55
52
@@ -69,4 +66,4 @@ Use Platform Aggregates to track Polymarket's overall trajectory, including dail
69
66
70
67
**5. AI-assisted research with MCP tools**
71
68
72
-
Pair these endpoints with The Graph's Token API MCP server to let AI agents query Polymarket data conversationally. Ask questions like "Who are the top 10 traders by PnL this week?" or "What was the open interest trend on the 2026 election market?" and get structured answers grounded in on-chain data.
69
+
Pair these endpoints with The Graph's Token API MCP server to let AI agents query Polymarket data conversationally. Ask questions like "Who are the top 10 traders by PnL this week?" or "What was the open interest trend on the 2026 election market?" and get structured answers grounded in on-chain data.
0 commit comments