> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chance.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket

> Venue-aware verification for Polymarket — pass the exact CLOB order, get a verdict on the real market and outcome, bound to those bytes.

Chance understands Polymarket natively. Submit the **exact CLOB order** your agent is about to place and the harness will classify it deterministically, **resolve the outcome token to the live market** (question, outcome, current price), and judge it against your mandate with Polymarket's own documentation in the loop — returning a signed verdict whose `requestHash` binds to those exact bytes.

## What gets recognized

| Family     | Payloads                                                                              |
| ---------- | ------------------------------------------------------------------------------------- |
| `order`    | New orders (pre-sign args or signed order structs — GTC, GTD, FOK/FAK), cancellations |
| `position` | Conditional-token operations: split, merge, redeem                                    |

For orders, the classifier decodes side, price, size, and cost — and because Polymarket order payloads reference outcome tokens by an opaque 77-digit id, it resolves that id against the live market registry. The judge reasons over:

> *BUY 500 shares of outcome token 308158…200000 @ 2.0¢ (GTC) ≈ \$10.00 cost — resolved: this is the "Yes" outcome of "Will Belgium win the 2026 FIFA World Cup?". Market currently prices this outcome at 1.6¢.*

That resolution step is what catches the classic prediction-market failure: an agent whose thesis says *"back the near-certain favorite"* while its order quietly buys the cheap opposite token. The judge sees the real outcome and the live price gap — the side-inversion has nowhere to hide. If a token can't be resolved, the verdict leans ESCALATE rather than trusting the agent's own description: fail closed, never allow on assumption.

## Use it from your bot

Wrap the order you were already going to place:

```ts theme={null}
const order = {
  tokenID: "30815807067456631524510535002617106205417832891402132396713720656146245200000",
  price: 0.02,
  size: 500,
  side: "BUY",
  orderType: "GTC",
};

const res = await fetch("https://harness.chance.cc/api/v1/intent", {
  method: "POST",
  headers: { "x-api-key": process.env.CHANCE_API_KEY!, "Content-Type": "application/json" },
  body: JSON.stringify({
    intent: "High-probability favorites only: enter only when the chosen side is priced >= 95c. Max $25 per market.",
    venue: "polymarket",
    action: order, // the exact payload — the verdict binds to these bytes
  }),
});

const { verdict, reasoning, mode } = await res.json();
if (verdict !== "ALLOW") throw new Error(`Blocked: ${reasoning}`);
// only now sign and post the order to the CLOB
```

`venue` is optional — Polymarket order shapes are auto-detected — and freeform `action` descriptions still work (`mode: "semantic"`).

## Use it from Claude or ChatGPT

Add the hosted connector (`https://harness.chance.cc/api/mcp`, see [Connectors](/connectors)) and give your agent one standing instruction:

> Before placing any Polymarket order, call `verify_intent` with my rules as the intent and the exact CLOB order as the action, with `venue: "polymarket"`. Only proceed on ALLOW; on BLOCK or ESCALATE, stop and tell me why.

Agents with Polymarket execution tools then get gated automatically; agents without them still give you provable pre-trade checks in chat.

## How the harness knows Polymarket

The judge works from a **versioned snapshot of Polymarket's own docs** — order placement and signing, market data, tick sizes and fees, negative-risk markets, conditional tokens, resolution — plus a curated brief of the venue's footguns (price-as-probability, YES/NO token semantics, negRisk mechanics, UMA resolution risk). Static knowledge is never fetched at verdict time; the only live call is the market-registry lookup that resolves the order's token to its market and current price, and what it resolves is recorded in the verdict's hash-chained transcript. Every documentation page the judge consults is chained with its content hash — the receipt proves exactly which knowledge, at which version, informed the decision. See [Architecture](/concepts/architecture).

## What the receipt adds for Polymarket

On top of the standard proof bundle (transcript root, judge signature, onchain anchor), venue-aware verdicts carry `venue: "polymarket"`, the `actionFamily`, the venue `actionType`, `mode: "structured"`, the knowledge-snapshot version — and the resolved market identity (question, outcome, live price at verdict time), all inside the hash-chained transcript.

<Note>
  **Roadmap:** escrowed execution — the same contract, but an ALLOW triggers order placement by a Chance-held signer and a BLOCK physically never reaches one. The payload-first contract above is forward-compatible with it.
</Note>
