# Polymarket (/docs/nodes/data/polymarket)

Prediction market data, orderbooks, prices, and trade history via Polymarket.



Polymarket is a leading prediction market platform. The Polymarket node provides market discovery, orderbook data, pricing, and trade history.

Prerequisites [#prerequisites]

No credential required. All operations use Polymarket's public APIs.

Operations [#operations]

| Operation        | Description                    | Key inputs                 |
| ---------------- | ------------------------------ | -------------------------- |
| getMarkets       | List prediction markets        | searchQuery, sortBy, limit |
| getEvents        | List prediction events         | searchQuery, limit         |
| getMarketBySlug  | Get a market by its URL slug   | marketSlug                 |
| getOrderBook     | Get orderbook for a token      | tokenId                    |
| getPrice         | Get current price for a token  | tokenId                    |
| getMidpoint      | Get midpoint price for a token | tokenId                    |
| getPriceHistory  | Get historical price data      | tokenId, interval          |
| getActiveMarkets | List currently active markets  | limit                      |

Configuration [#configuration]

| Field       | Type   | Required            | Description                                                                |
| ----------- | ------ | ------------------- | -------------------------------------------------------------------------- |
| tokenId     | string | For price/book ops  | Polymarket token ID                                                        |
| marketSlug  | string | For getMarketBySlug | Market URL slug                                                            |
| searchQuery | string | No                  | Search keyword (max 200 chars)                                             |
| sortBy      | string | No                  | Sort: Volume 24h, Volume 1w, Volume 1m, Liquidity, Start Date, or End Date |
| sortType    | string | No                  | Uses descending order for market search                                    |
| side        | string | No                  | Order side: `buy` or `sell`                                                |
| interval    | string | No                  | Price history interval: `1d`, `1w`, `1m`, `3m`, `6m`, `1y`, or `all`       |
| limit       | number | No                  | Results limit (default: 20, max: 100)                                      |

Price history uses a fixed 60-minute fidelity. Choose the interval in the node; there is no separate fidelity field in the UI.

Output [#output]

All operations return the standard envelope:

```json
{
  "success": true,
  "operation": "getPrice",
  "data": { /* raw Polymarket response */ }
}
```

Reference fields downstream with the response name (default `polymarketResponse`), for example `{polymarketResponse.data.price}` for `getPrice` or `{polymarketResponse.data[0].question}` for `getMarkets`. The upstream Polymarket payload is always under `.data`.

Common use cases [#common-use-cases]

* Monitor election and crypto event prediction odds
* Track price movements on specific outcome tokens
* Combine with AI to generate prediction market analysis

Next steps [#next-steps]

* [DFlow](/docs/nodes/defi/dflow) - Solana-native prediction markets
* [OpenRouter](/docs/nodes/ai/openrouter) - AI analysis of market data
