> ## 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.

# Venue adapters

> How the harness reads a venue payload before the judge sees it, and which venues it supports.

Send the exact object your agent is about to submit as `action`. Before the judge runs, a venue adapter reads it. The adapter is deterministic code, and it does four things:

* It types the action with an `actionFamily` shared by all venues and an `actionType` specific to the venue.
* It writes a summary with computed values (side, size in units and dollars, recipient, allowance) and adds notes on risks it can see in the payload, such as an unlimited approval or an output sent to a different wallet.
* For ten venues, it looks up live facts from a public API.
* It chooses which pages of the venue's documentation the judge reads first.

The judge gets the summary, the notes and the raw payload. The adapter never decides the verdict.

## How the adapter is chosen

1. If the request sets `venue` and the name resolves, that adapter is used. If the payload is not a shape it knows, the action is typed `unknown` with a note saying so.
2. Otherwise each adapter tests the payload in this order, and the first match wins: `hyperliquid`, `limitless`, `polymarket`, `dimes`, `myriad`, `orderly`, `derive`, `lifi`, `meow`, `liquid`, `robinhood`, `x402`, `agentcards`, `uniswap`, `solana`, `starknet`, `alchemy`. Specific shapes go first. A Limitless order also matches Polymarket's order shape, so Limitless is tested before Polymarket. Alchemy is last because any object with `to` and `data` is an EVM transaction.
3. If nothing matches, the object is judged as plain JSON with `mode: "semantic"` and `venue: null`.

Some payloads are too generic to detect and are classified only when `venue` is set. Each venue page lists them.

A string `action` with a `venue` gets the venue's brief, and the judge can open its documentation, but nothing is classified: `mode` is `semantic`, `actionFamily` is `unknown` and `actionType` is `null`.

### Venue names

Over HTTP (`POST /api/v1/intent`), `venue` is lowercased and stripped of everything except letters and digits. It is then matched against the venue ids, then the aliases listed on each venue page, then by prefix, so `Hyperliquid perps` resolves to `hyperliquid` and `dimes.fi` to `dimes`. A name that matches nothing is ignored without an error, and the payload is auto-detected.

Over MCP (`verify_intent`), `venue` must be one of the 17 ids below, or `evm` for Alchemy. Any other value fails validation.

## Action families

| `actionFamily` | What the action does |
| - | - |
| `order` | Places, changes or cancels an order |
| `margin` | Changes leverage, margin mode or position collateral, or opens a leveraged Dimes position |
| `position` | Closes, settles, splits, merges or redeems a position |
| `swap` | Exchanges one token for another, on one chain or across chains |
| `transfer` | Moves funds to another address or account |
| `withdrawal` | Takes funds off the venue |
| `payment` | Pays a person, a merchant or an API |
| `permission` | Grants or changes authority: token approvals, agent and session keys, spending limits |
| `staking` | Delegates or withdraws stake (Hyperliquid) |
| `vault` | Moves funds into or out of a vault (Hyperliquid) |
| `subaccount` | Subaccount and account-settings writes, such as Hyperliquid subaccounts and Robinhood watchlists |
| `unknown` | Reads, calls the adapter cannot decode, and payloads it could not type |

The family is returned as `actionFamily`, stored with the verification and shown to the judge. It does not allow or block anything by itself.

## Live lookups

| Venue | Source | What it adds |
| - | - | - |
| [Polymarket](/venues/polymarket) | `gamma-api.polymarket.com` | Market question, outcome, current price, end date |
| [Limitless](/venues/limitless) | `api.limitless.exchange` | Market title, status, deadline, outcome prices, a check that the token belongs to the named market |
| [Dimes](/venues/dimes) | `api.dimes.fi` or `api-sandbox.dimes.fi` | Market title, status, per-side eligibility and leverage caps, ask prices |
| [Myriad](/venues/myriad) | `api-v2.myriadprotocol.com` | Market title, state, outcome and price, trading model, collateral token |
| [Orderly](/venues/orderly) | `api.orderly.org` | Symbol status, mark price, tick and step sizes, minimum notional, maximum leverage |
| [Derive](/venues/derive) | `api.lyra.finance` | Instrument status, mark price, tick size, amount step, minimum amount |
| [LI.FI](/venues/lifi) | `li.quest/v1/quote` | A fresh quote for the same route |
| [Uniswap](/venues/uniswap) | `trade-api.gateway.uniswap.org` | A fresh quote for the same trade, when the deployment has a Uniswap API key |
| [Alchemy](/venues/alchemy) | Public RPC nodes | Token symbol and decimals, read from the token contract |
| [x402](/venues/x402) | The resource URL, the Coinbase x402 Bazaar, Base and Ethereum RPC | Live payment terms, vendor payment history, payee and payer checks |

Each lookup has a timeout (3.5 seconds for most, 6 to 7 seconds for LI.FI, Uniswap and x402) and a cache (60 seconds for quotes and x402 terms, 5 minutes for everything else). A failed lookup never fails the request. The adapter adds a note that the fact is unverified, and the judge weighs that against your rules.

Hyperliquid, Robinhood, Liquid, Meow, AgentCard, Solana and Starknet have no live lookup. Each page says why.

## Venue knowledge

Each adapter ships a snapshot of the venue's own documentation as markdown pages, plus a short curated brief of the venue's pitfalls. Nothing is fetched from the venue's docs at verdict time. The snapshot changes only when the harness is redeployed.

The judge's instructions include the brief, the adapter's summary and notes, and the pages the adapter chose for this action type. The judge can open any other page in the snapshot with its `load_venue_doc` tool.

## What you get back

The HTTP response carries four venue fields:

| Field | Value |
| - | - |
| `mode` | `structured` when an adapter classified an object payload, otherwise `semantic` |
| `venue` | The adapter id, or `null` |
| `actionFamily` | One of the families above, or `null` |
| `actionType` | The venue-specific type listed on each venue page, or `null` |

The MCP tool returns the same fields except `actionType`.

The summary and notes are not in the response. They are in the run's transcript, a hash chain whose root the judge signs. Three events carry the venue work:

* `venue.context` holds the venue id, the knowledge snapshot version (a hash over every page and the brief), the family and action type, the summary and notes including anything a live lookup resolved, and the topic and sha256 of each preloaded page.
* `agent.doc` is recorded for each page the judge opens with `load_venue_doc`, with its sha256 and the snapshot version.
* `run.start` holds the full task, including the raw payload.

Read them with your API key:

```bash theme={null}
curl -s "$TRANSCRIPT_URI" -H "x-api-key: $CHANCE_API_KEY" \
  | jq '.lines[] | fromjson | select(.type == "venue.context") | .data'
```

`$TRANSCRIPT_URI` is `proof.transcriptUri` from the response. See [Receipts](/concepts/proofs) for how the transcript is verified.

## Supported venues

| Venue | `venue` | What to send | Live lookup |
| - | - | - | - |
| [Hyperliquid](/venues/hyperliquid) | `hyperliquid` | An `/exchange` action | No |
| [Robinhood](/venues/robinhood) | `robinhood` | An Agentic Trading MCP tool call | No |
| [Liquid](/venues/liquid) | `liquid` | A Liquid Co-Invest MCP tool call | No |
| [Polymarket](/venues/polymarket) | `polymarket` | A CLOB order, a cancel, or a split, merge or redeem | Yes |
| [Limitless](/venues/limitless) | `limitless` | A `POST /orders` body, a cancel, a redeem or a withdrawal | Yes |
| [Dimes](/venues/dimes) | `dimes` | An offer or quote body, or a Polygon transaction to a Dimes vault | Yes |
| [Myriad](/venues/myriad) | `myriad` | An AMM quote body, a signed order-book order, a batch or a cancel-all | Yes |
| [Orderly](/venues/orderly) | `orderly` | A REST trading body or a wallet-signed request | Yes |
| [Derive](/venues/derive) | `derive` | Private API params, bare or in a JSON-RPC envelope | Yes |
| [LI.FI](/venues/lifi) | `lifi` | A quote or routes request, or a returned route | Yes |
| [Uniswap](/venues/uniswap) | `uniswap` | A Trading API quote request or quote, or a transaction to a Uniswap contract | Conditional |
| [Alchemy](/venues/alchemy) | `alchemy` | An EVM transaction request `{to, value, data, chainId}` | Yes |
| [Solana](/venues/solana) | `solana` | A base64-serialized Solana transaction | No |
| [Starknet](/venues/starknet) | `starknet` | A Starknet call array | No |
| [Meow](/venues/meow) | `meow` | A payment or limit-change request body | No |
| [AgentCard](/venues/agentcards) | `agentcards` | A card purchase, card request or limit change | No |
| [x402](/venues/x402) | `x402` | x402 payment terms or a signed payment | Yes |
