> For the complete documentation index, see [llms.txt](https://whitepaper.aitech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.aitech.io/agentforge/tools/polymarket.md).

# polymarket

[Polymarket](https://polymarket.com/) is a prediction market platform where users trade on the outcomes of real-world events.

In Agent Forge, the Polymarket Data integration allows agents and workflows to query public market data, event metadata, prices, orderbooks, spreads, historical prices, positions, trades, activity, leaderboards, and market holders. It is designed for research, monitoring, analytics, and market intelligence workflows.

### Usage Instructions

Use Polymarket Data for read-only market intelligence. Select the operation that matches the data you need, then provide the required market ID, event ID, series ID, token ID, wallet address, or search query.

### Tools

#### Markets and Events

* `polymarket_get_markets` - List markets
* `polymarket_get_market` - Get a single market
* `polymarket_get_events` - List events
* `polymarket_get_event` - Get a single event
* `polymarket_get_tags` - List tags
* `polymarket_search` - Search markets and events
* `polymarket_get_series` - List series
* `polymarket_get_series_by_id` - Get a series by ID

#### Trading Data

* `polymarket_get_orderbook` - Get orderbook data for a token
* `polymarket_get_price` - Get buy or sell price
* `polymarket_get_midpoint` - Get midpoint price
* `polymarket_get_price_history` - Get historical price data
* `polymarket_get_last_trade_price` - Get the last traded price
* `polymarket_get_spread` - Get market spread
* `polymarket_get_tick_size` - Get tick size

#### User and Market Activity

* `polymarket_get_positions` - Get user positions
* `polymarket_get_trades` - Get trades
* `polymarket_get_activity` - Get user or market activity
* `polymarket_get_leaderboard` - Get leaderboard data
* `polymarket_get_holders` - Get market holders

### Common Inputs

| Parameter     | Type   | Required           | Description               |
| ------------- | ------ | ------------------ | ------------------------- |
| `marketId`    | string | Operation-specific | Market ID or slug         |
| `conditionId` | string | Operation-specific | Market condition ID       |
| `eventId`     | string | Operation-specific | Event ID or slug          |
| `seriesId`    | string | Operation-specific | Series ID                 |
| `tokenId`     | string | Operation-specific | CLOB token ID             |
| `side`        | string | Operation-specific | Price side, buy or sell   |
| `searchQuery` | string | Operation-specific | Search query              |
| `userAddress` | string | Operation-specific | Wallet address            |
| `limit`       | string | No                 | Maximum number of results |
| `offset`      | string | No                 | Pagination offset         |

### Output

| Parameter  | Type | Description                  |
| ---------- | ---- | ---------------------------- |
| `response` | json | Polymarket API response data |

### Notes

* Category: `tools`
* Type: `polymarket_data`
* This integration is for read-only market and activity data. Use Polymarket Trade for order management.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://whitepaper.aitech.io/agentforge/tools/polymarket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
