docs: sync Polymarket docs - 2026-04-14

This commit is contained in:
Etherdrake
2026-04-14 21:53:47 +02:00
parent 814cdc00c9
commit d8e396519a
263 changed files with 1118 additions and 21257 deletions
+12 -10
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Market Channel
> Real-time orderbook, price, and trade data
@@ -12,7 +16,7 @@ wss://ws-subscriptions-clob.polymarket.com/ws/market
## Subscription
```json theme={null}
```json theme={null}
{
"assets_ids": ["<token_id_1>", "<token_id_2>"],
"type": "market",
@@ -30,7 +34,7 @@ Each message includes an `event_type` field identifying the type.
Emitted when first subscribed to a market and when there is a trade that affects the book.
```json theme={null}
```json theme={null}
{
"event_type": "book",
"asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
@@ -54,7 +58,7 @@ Emitted when first subscribed to a market and when there is a trade that affects
Emitted when a new order is placed or an order is cancelled.
```json theme={null}
```json theme={null}
{
"market": "0x5f65177b394277fd294cd75650044e32ba009a95022d88a0c1d565897d72f8f1",
"price_changes": [
@@ -88,7 +92,7 @@ A `size` of `"0"` means the price level has been removed from the book.
Emitted when the minimum tick size of a market changes. This happens when the book's price reaches the limits: price > 0.96 or price \< 0.04.
```json theme={null}
```json theme={null}
{
"event_type": "tick_size_change",
"asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
@@ -103,7 +107,7 @@ Emitted when the minimum tick size of a market changes. This happens when the bo
Emitted when a maker and taker order is matched, creating a trade event.
```json theme={null}
```json theme={null}
{
"asset_id": "114122071509644379678018727908709560226618148003371446110114509806601493071694",
"event_type": "last_trade_price",
@@ -122,7 +126,7 @@ Emitted when a maker and taker order is matched, creating a trade event.
Emitted when the best bid or ask prices for a market change.
```json theme={null}
```json theme={null}
{
"event_type": "best_bid_ask",
"market": "0x0005c0d312de0be897668695bae9f32b624b4a1ae8b140c49f08447fcc74f442",
@@ -154,7 +158,7 @@ Where a `FeeSchedule` object is of the form:
| taker\_only | boolean | whether fee applies to taker only |
| rebate\_rate | string | maker rebate rate |
```json theme={null}
```json theme={null}
{
"id": "1031769",
"question": "Will NVIDIA (NVDA) close above $240 end of January?",
@@ -204,7 +208,7 @@ Where a `FeeSchedule` object is of the form:
Emitted when a market is resolved.
```json theme={null}
```json theme={null}
{
"id": "1031769",
"question": "Will NVIDIA (NVDA) close above $240 end of January?",
@@ -229,5 +233,3 @@ Emitted when a market is resolved.
"event_type": "market_resolved"
}
```
Built with [Mintlify](https://mintlify.com).
+9 -7
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Overview
> Real-time market data and trading updates via WebSocket
@@ -46,7 +50,7 @@ Send a subscription message after connecting to specify which data you want to r
### Market Channel
```json theme={null}
```json theme={null}
{
"assets_ids": [
"21742633143463906290569050155826241533067272736897614950488156847949938836455",
@@ -65,7 +69,7 @@ Send a subscription message after connecting to specify which data you want to r
### User Channel
```json theme={null}
```json theme={null}
{
"auth": {
"apiKey": "your-api-key",
@@ -105,7 +109,7 @@ Modify subscriptions without reconnecting.
### Subscribe to more assets
```json theme={null}
```json theme={null}
{
"assets_ids": ["new_asset_id_1", "new_asset_id_2"],
"operation": "subscribe",
@@ -115,7 +119,7 @@ Modify subscriptions without reconnecting.
### Unsubscribe from assets
```json theme={null}
```json theme={null}
{
"assets_ids": ["asset_id_to_remove"],
"operation": "unsubscribe"
@@ -124,7 +128,7 @@ Modify subscriptions without reconnecting.
For the user channel, use `markets` instead of `assets_ids`:
```json theme={null}
```json theme={null}
{
"markets": ["0x1234...condition_id"],
"operation": "subscribe"
@@ -175,5 +179,3 @@ pong
<Accordion title="Authentication failed - user channel">
Verify your API credentials are correct and haven't expired.
</Accordion>
Built with [Mintlify](https://mintlify.com).
+23 -21
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Real-Time Data Socket
> Stream comments, crypto prices, and equity prices via WebSocket
@@ -20,7 +24,7 @@ Some user-specific streams may require `gamma_auth` with your wallet address.
Send a JSON message to subscribe to data streams:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -46,7 +50,7 @@ Subscriptions can be added, removed, and modified without disconnecting. Send `P
All messages follow this structure:
```json theme={null}
```json theme={null}
{
"topic": "string",
"type": "string",
@@ -70,7 +74,7 @@ Real-time cryptocurrency price data from two sources: **Binance** and **Chainlin
Subscribe to all symbols:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -84,7 +88,7 @@ Subscribe to all symbols:
Subscribe to specific symbols with a comma-separated filter:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -101,7 +105,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
**Solana price update:**
```json theme={null}
```json theme={null}
{
"topic": "crypto_prices",
"type": "update",
@@ -116,7 +120,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
**Bitcoin price update:**
```json theme={null}
```json theme={null}
{
"topic": "crypto_prices",
"type": "update",
@@ -137,7 +141,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
Subscribe to all symbols:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -152,7 +156,7 @@ Subscribe to all symbols:
Subscribe to a specific symbol with a JSON filter:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -169,7 +173,7 @@ Symbols use slash-separated format (e.g., `eth/usd`, `btc/usd`).
**Ethereum price update:**
```json theme={null}
```json theme={null}
{
"topic": "crypto_prices_chainlink",
"type": "update",
@@ -184,7 +188,7 @@ Symbols use slash-separated format (e.g., `eth/usd`, `btc/usd`).
**Bitcoin price update:**
```json theme={null}
```json theme={null}
{
"topic": "crypto_prices_chainlink",
"type": "update",
@@ -235,7 +239,7 @@ All asset classes stream through a single `equity_prices` topic. When you subscr
Subscribe to a specific symbol with a JSON filter:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -250,7 +254,7 @@ Subscribe to a specific symbol with a JSON filter:
Subscribe to multiple symbols across asset classes:
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -264,7 +268,7 @@ Subscribe to multiple symbols across asset classes:
Use `type: "*"` to receive all message types (live updates and snapshots):
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -291,7 +295,7 @@ Filter values are case-insensitive on subscribe, but the `symbol` field in paylo
**Apple stock update:**
```json theme={null}
```json theme={null}
{
"topic": "equity_prices",
"type": "update",
@@ -308,7 +312,7 @@ Filter values are case-insensitive on subscribe, but the `symbol` field in paylo
**Gold price update (market closed):**
```json theme={null}
```json theme={null}
{
"topic": "equity_prices",
"type": "update",
@@ -328,7 +332,7 @@ Filter values are case-insensitive on subscribe, but the `symbol` field in paylo
On subscribe, the server delivers a backfill of the last 2 minutes of price data. Use the `type` field to distinguish: `"subscribe"` for the initial snapshot vs `"update"` for live ticks.
```json theme={null}
```json theme={null}
{
"topic": "equity_prices",
"type": "subscribe",
@@ -420,7 +424,7 @@ Real-time comment events on the Polymarket platform, including new comments, rep
### Subscribe
```json theme={null}
```json theme={null}
{
"action": "subscribe",
"subscriptions": [
@@ -445,7 +449,7 @@ Real-time comment events on the Polymarket platform, including new comments, rep
Emitted when a user posts a new comment or replies to an existing one.
```json theme={null}
```json theme={null}
{
"topic": "comments",
"type": "comment_created",
@@ -474,7 +478,7 @@ Emitted when a user posts a new comment or replies to an existing one.
A reply to the above comment — note `parentCommentID` references the parent:
```json theme={null}
```json theme={null}
{
"topic": "comments",
"type": "comment_created",
@@ -548,5 +552,3 @@ Comments support nested threading:
<Accordion title="Authentication failures">
If subscribing to user-specific streams, ensure your `gamma_auth` object includes a valid wallet `address`. Authentication failures will prevent subscription to protected topics.
</Accordion>
Built with [Mintlify](https://mintlify.com).
+7 -5
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Sports WebSocket
> Live sports scores and game state
@@ -16,7 +20,7 @@ No subscription message required — connect and start receiving data for all ac
The server sends `ping` every 5 seconds. Respond with `pong` within 10 seconds or the connection will close.
```javascript theme={null}
```javascript theme={null}
ws.onmessage = (event) => {
if (event.data === "ping") {
ws.send("pong");
@@ -43,7 +47,7 @@ Emitted when:
**NFL (in progress):**
```json theme={null}
```json theme={null}
{
"gameId": 19439,
"leagueAbbreviation": "nfl",
@@ -62,7 +66,7 @@ Emitted when:
**Esports — CS2 (finished):**
```json theme={null}
```json theme={null}
{
"gameId": 1317359,
"leagueAbbreviation": "cs2",
@@ -209,5 +213,3 @@ Game status values vary by sport:
| `finished` | Match completed |
| `postponed` | Match postponed |
| `cancelled` | Match canceled |
Built with [Mintlify](https://mintlify.com).