> ## Documentation Index
> Fetch the complete documentation index at: https://aomilabs-victor-docs-redirect-build-overview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket

> Polymarket prediction market integration via Gamma, Data API, and CLOB to search markets, resolve user intent, browse trades, and submit orders onchain.

Polymarket exposes three public API surfaces: **Gamma** for market metadata, **Data API** for trade history, and **CLOB** for order submission. Aomi wraps these as tools so your AI assistant can search markets, resolve user intent, and execute trades through the connected wallet.

## Available Tools

The Polymarket App registers exactly six tools.

| Tool                              | Description                                                       | Source API |
| --------------------------------- | ----------------------------------------------------------------- | ---------- |
| `search_polymarket`               | Search prediction markets by keyword                              | Gamma      |
| `get_polymarket_details`          | Get market metadata, volume, liquidity                            | Gamma      |
| `get_polymarket_trades`           | Browse recent trades for a market                                 | Data API   |
| `resolve_polymarket_trade_intent` | Turn a plain English trade request into concrete order parameters | CLOB       |
| `build_polymarket_order`          | Build an unsigned order from resolved parameters                  | CLOB       |
| `submit_polymarket_order`         | Submit the signed order onchain                                   | CLOB       |

Trading is a two step flow: `build_polymarket_order` prepares the order, then `submit_polymarket_order` sends it. The order is simulated before you sign.

## Example Conversations

**Market research:**

> "What are the hottest prediction markets right now?"
> "Show me the recent trades on 'BTC > \$100k by June'"
> "What's the volume and liquidity on that market?"

**Trading:**

> "Buy 100 shares of 'ETH > \$4k by July' at the current ask"
> "Place a limit order on 'Fed cuts rates in June' at 60¢"

## How It Works

1. User asks a question about prediction markets
2. The Aomi assistant calls the appropriate Polymarket API tools
3. For trades, the transaction is simulated before execution
4. User reviews and signs the transaction in their wallet

## Next Steps

* [DeFi Aggregators](/examples/defi-aggregators): cross-chain swaps and liquidity
* [X APIs](/examples/x-apis): social data integration
* [Integration Guide](/guides/integration): build your own integration
