Skip to content

Commit e3262d1

Browse files
Ran prettier
1 parent 8d8c6ae commit e3262d1

3 files changed

Lines changed: 11 additions & 88 deletions

File tree

website/src/pages/en/ai-suite/x402-introduction.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

website/src/pages/en/subgraphs/guides/x402-payments.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ The existing API-key endpoints continue to work unchanged with x402 is an additi
3232
| Mainnet | `https://gateway.thegraph.com` | Base | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
3333
| Testnet | `https://testnet.gateway.thegraph.com` | Base Sepolia | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` |
3434

35-
## Options for Accessing the API:
35+
## Options for Accessing the API
3636

3737
### Option 1: API Key (Best for Humans)
3838

3939
Get an API key from [Subgraph Studio](https://thegraph.com/studio) and include it in requests.
4040

4141
**Endpoints:**
42+
4243
- `POST /api/subgraphs/id/{subgraph_id}`
4344
- `POST /api/deployments/id/{deployment_id}`
4445

@@ -49,6 +50,7 @@ Get an API key from [Subgraph Studio](https://thegraph.com/studio) and include i
4950
Pay per query with USDC. No API key required.
5051

5152
**Endpoints:**
53+
5254
- `POST /api/x402/subgraphs/id/{subgraph_id}`
5355
- `POST /api/x402/deployments/id/{deployment_id}`
5456

@@ -140,8 +142,6 @@ const result = await execute(GetPairsDocument, { first: 5 })
140142
```
141143

142144
**Environment Variables:**
145+
143146
- `X402_PRIVATE_KEY`: Wallet private key for payment signing
144147
- `X402_CHAIN`: `base` (mainnet) or `base-sepolia` (testnet)
145-
146-
147-

website/src/pages/en/token-api/guides/polymarket.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ sidebarTitle: Polymarket Data
55

66
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.
77

8-
### Why Use The Graph for Polymarket Data?
8+
## Why Use The Graph for Polymarket Data
99

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.
1111

12-
**What Users Get with The Graph's Token API:**
12+
### What Users Get with The Graph's Token API
1313

1414
- **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.
1515
- **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
1818
- **OHLCV price history:** Standard candlestick data for any outcome token, ready for charting and backtesting.
1919

2020
> **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-
>
2221
23-
### Getting Started
22+
## Getting Started
2423

2524
All Polymarket endpoints are available under the Token API base URL:
2625

@@ -30,9 +29,7 @@ https://token-api.thegraph.com/v1/polymarket/
3029

3130
You'll need a Token API key. See the [Quick Start guide](https://claude.ai/token-api/quick-start/) to create one.
3231

33-
[Market Endpoints](https://thegraph.com/docs/en/token-api/polymarket-markets/markets/)
34-
[Platform Endpoints](https://thegraph.com/docs/en/token-api/polymarket-platform/platform/)
35-
[User Endpoints](https://thegraph.com/docs/en/token-api/polymarket-users/users/)
32+
[Market Endpoints](https://thegraph.com/docs/en/token-api/polymarket-markets/markets/)[Platform Endpoints](https://thegraph.com/docs/en/token-api/polymarket-platform/platform/)[User Endpoints](https://thegraph.com/docs/en/token-api/polymarket-users/users/)
3633

3734
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.
3835

@@ -49,7 +46,7 @@ You can also set up the [Token API MCP](https://thegraph.com/docs/en/ai-suite/to
4946
| **Users** | `/v1/polymarket/users` | User stats and leaderboard (volume, PnL, trade counts) |
5047
| **Users** | `/v1/polymarket/users/positions` | Per-user position breakdown with cost basis and PnL |
5148

52-
### Recommended Use Cases
49+
## Recommended Use Cases
5350

5451
**1. Portfolio review and self-analysis**
5552

@@ -69,4 +66,4 @@ Use Platform Aggregates to track Polymarket's overall trajectory, including dail
6966

7067
**5. AI-assisted research with MCP tools**
7168

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

Comments
 (0)