> For the complete documentation index, see [llms.txt](https://docs.cournot.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cournot.ai/api-reference/partner-public-api.md).

# Partner Public API

Cournot provides partners with public endpoints to retrieve market verdicts and file disputes. The system produces final settlement records including verdicts, confidence assessments, and blockchain proofs.

### Base URL

> <https://interface.cournot.ai>

#### Response Envelope

All responses return HTTP 200. Branch on the `code` field, not HTTP status:

```json
// Success
{ "code": 0, "msg": "Success", "data": { /* payload */ } }

// Error
{ "code": 4100, "msg": "slug is required", "detail": "slug is required" }
```

<table data-header-hidden><thead><tr><th width="158.44140625" align="center"></th><th width="107.1875" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Field</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><pre><code>code
</code></pre></td><td align="center">int</td><td align="center">0 = success; non-zero = error</td></tr><tr><td align="center"><pre><code>msg
</code></pre></td><td align="center">string</td><td align="center">Human-readable status</td></tr><tr><td align="center"><pre><code>data
</code></pre></td><td align="center">object</td><td align="center">Present on success</td></tr><tr><td align="center"><pre><code>detail
</code></pre></td><td align="center">string</td><td align="center">Present on error</td></tr></tbody></table>

### GET `/cournot/markets/public`

Retrieve a market's public settlement record. No authentication required.

**Query Parameters**:

<table data-header-hidden><thead><tr><th width="139.34765625" align="center"></th><th width="142.44140625" align="center"></th><th width="137.65625" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center">Parameter</td><td align="center">Type</td><td align="center">Required</td><td align="center">Description</td></tr><tr><td align="center"><code>slug</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">Market slug (no leading/trailing slashes)</td></tr><tr><td align="center"><code>source</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">Partner-specific identifier issued by Cournot</td></tr></tbody></table>

#### Example Request:

```json
curl -G "https://interface.cournot.ai/cournot/markets/public" \
  --data-urlencode "slug=ram-average-price-above-600-by-end-of-march" \
  --data-urlencode "source=YOUR_SOURCE_ID"
```

#### Example Response:

```json
{
  "code": 0,
  "msg": "Success",
  "data": {
    "markets": [
      {
        "id": 61,
        "source": "YOUR_SOURCE_ID",
        "slug": "ram-average-price-above-600-by-end-of-march",
        "status": "resolved",
        "verdict": "YES",
        "resolved_at": "2026-04-28T10:08:40Z",
        "confidence": "HIGH",
        "reasoning": "multi-source evidence confirmed the final outcome is YES",
        "proofs": [
          { "chain": "base", "tx_hash": "0xabc..." },
          { "chain": "bsc", "tx_hash": "0xdef..." }
        ],
        "disputes": [
          {
            "id": 4,
            "status": "closed",
            "submitter_selection": "NO",
            "reason_text": "we believe the resolved outcome is incorrect",
            "submitted_at": "2026-04-28T10:30:00Z",
            "decision": {
              "type": "override",
              "partner_final_verdict": "NO",
              "reason_text": "submitted dispute is valid",
              "decided_at": "2026-04-28T11:00:00Z"
            }
          }
        ]
      }
    ]
  }
}
```

#### Response Fields (`data.markets[]`):

<table data-header-hidden><thead><tr><th width="147.43359375" align="center"></th><th width="140.875" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Field</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>id</code></td><td align="center">int64</td><td align="center">Market identifier</td></tr><tr><td align="center"><code>source</code></td><td align="center">string</td><td align="center">Partner source identifier</td></tr><tr><td align="center"><code>slug</code></td><td align="center">string</td><td align="center">Market slug</td></tr><tr><td align="center"><code>status</code></td><td align="center">string</td><td align="center"><code>monitoring</code> / <code>resolved</code> / <code>disputed</code> / <code>closed</code></td></tr><tr><td align="center"><code>verdict</code></td><td align="center">string</td><td align="center">Final verdict text</td></tr><tr><td align="center"><code>resolved_at</code></td><td align="center">string</td><td align="center">RFC 3339 UTC timestamp</td></tr><tr><td align="center"><code>confidence</code></td><td align="center">string</td><td align="center"><code>VERY_HIGH</code> / <code>HIGH</code> / <code>MEDIUM</code> / <code>LOW</code> / <code>VERY_LOW</code></td></tr><tr><td align="center"><code>reasoning</code></td><td align="center">string</td><td align="center">Human-readable explanation</td></tr><tr><td align="center"><code>proofs</code></td><td align="center">array</td><td align="center">On-chain proof records</td></tr><tr><td align="center"><code>disputes</code></td><td align="center">array or null</td><td align="center">Dispute records; <code>null</code> if none</td></tr></tbody></table>

#### Proof Item:

| **Field** | **Type** |  **Description** |
| :-------: | :------: | :--------------: |
|  `chain`  |  string  |  `base` or `bsc` |
| `tx_hash` |  string  | Transaction hash |

#### Dispute Item:

<table data-header-hidden><thead><tr><th width="222.2109375" align="center"></th><th width="203.828125" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Field</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>id</code></td><td align="center">int64</td><td align="center">Dispute identifier</td></tr><tr><td align="center"><code>status</code></td><td align="center">string</td><td align="center"><code>open</code> or <code>closed</code></td></tr><tr><td align="center"><code>submitter_selection</code></td><td align="center">string</td><td align="center">Claimed correct outcome</td></tr><tr><td align="center"><code>reason_text</code></td><td align="center">string</td><td align="center">Justification</td></tr><tr><td align="center"><code>submitted_at</code></td><td align="center">string</td><td align="center">RFC 3339 UTC timestamp</td></tr><tr><td align="center"><code>decision</code></td><td align="center">object or null</td><td align="center">Present only when closed</td></tr></tbody></table>

#### Decision Object:

<table data-header-hidden><thead><tr><th width="217.4296875" align="center"></th><th width="169.484375" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Field</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>type</code></td><td align="center">string</td><td align="center"><code>keep</code> or <code>override</code></td></tr><tr><td align="center"><code>partner_final_verdict</code></td><td align="center">string</td><td align="center">Final verdict after decision</td></tr><tr><td align="center"><code>reason_text</code></td><td align="center">string</td><td align="center">Decision justification</td></tr><tr><td align="center"><code>decided_at</code></td><td align="center">string</td><td align="center">RFC 3339 UTC timestamp</td></tr></tbody></table>

Notes:

* When no disputes exist, `disputes` is `null` (not an empty array).
* When no market matches, `data.markets` returns an empty array.

***

### POST `/cournot/markets/dispute/submit`

File a dispute on behalf of an end user. Requires API key authentication.

#### Headers:

<table data-header-hidden><thead><tr><th width="266.7421875" align="center"></th><th width="304.3671875" align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Header</strong></td><td align="center"><strong>Value</strong></td></tr><tr><td align="center"><code>Content-Type</code></td><td align="center"><code>application/json</code></td></tr><tr><td align="center"><code>x-api-key</code></td><td align="center">Partner API key</td></tr></tbody></table>

#### Request Body:

<table data-header-hidden data-search="false"><thead><tr><th width="205.22265625" align="center"></th><th align="center"></th><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Field</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Required</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>market_id</code></td><td align="center">int64</td><td align="center">Yes</td><td align="center">Market ID from <code>get_public_market</code></td></tr><tr><td align="center"><code>submitter_id</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">End user's unique identifier on partner platform</td></tr><tr><td align="center"><code>submitter_name</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">Submitter's display name</td></tr><tr><td align="center"><code>submitter_selection</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">Outcome the submitter claims is correct</td></tr><tr><td align="center"><code>reason_text</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">Dispute justification</td></tr><tr><td align="center"><code>submitted_at</code></td><td align="center">string</td><td align="center">Yes</td><td align="center">RFC 3339 UTC timestamp</td></tr></tbody></table>

#### Example Request:

```json
curl -X POST "https://interface.cournot.ai/cournot/markets/dispute/submit" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_PARTNER_API_KEY" \
  -d '{
    "market_id": 61,
    "submitter_id": "partner_user_1001",
    "submitter_name": "alice",
    "submitter_selection": "NO",
    "reason_text": "we believe the resolved outcome is incorrect based on source evidence",
    "submitted_at": "2026-04-28T10:30:00Z"
  }'
```

#### Example Response:

```json
{ "code": 0, "msg": "Success", "data": { "dispute_id": 4 } }
```

**Business Rules:**

* The partner's `source` (derived from API key) must match the market's source. Cross-partner disputes are forbidden.
* Only markets with `status = resolved` can be disputed.
* Each market accepts a maximum of one dispute.

***

### Integration Workflows

#### Standard Resolution Flow:

1. Poll `GET /cournot/markets/public` for your markets.
2. When a market reaches `status: resolved`, extract the `verdict`, `confidence`, and `proofs`.
3. Use this record to settle the corresponding market on your platform.

#### Dispute Handling Flow:

1. End user contests a verdict on your platform.
2. Submit dispute via `POST /cournot/markets/dispute/submit`.
3. Market transitions from `resolved` → `disputed`.
4. Cournot conducts internal review.
5. Market becomes `closed` with a `decision` object (`type: keep` or `type: override`).
6. Poll `GET /cournot/markets/public` to retrieve the final decision.

#### Market Lifecycle:

<figure><img src="https://2241883016-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWPGzY99JooaGhfRwwXbw%2Fuploads%2FzyLvFXdpbtmBd8BYsjqS%2F10.%20Lifecycle.png?alt=media&amp;token=2f603d9b-4d03-4be9-abb7-9bfddbb271e6" alt=""><figcaption></figcaption></figure>

***

Traditional oracles made trusted data available on-chain. Cournot makes trusted data programmable by meaning, extends it into intelligence, and ultimately enables action.

<figure><img src="https://2241883016-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWPGzY99JooaGhfRwwXbw%2Fuploads%2FAO9Hp5Qpn2ZFDcuL3lGv%2F11.%20Cournot%20Protocol%20Building%20Oracle%204.0.png?alt=media&amp;token=b3eb9a06-3189-41a3-8317-598f0c541626" alt=""><figcaption></figcaption></figure>

Prediction markets prove the architecture. RWA pricing proves semantic aggregation. Trading intelligence proves persistent monitoring. The agent economy is where it all converges.

**Data → Semantic Data → Intelligence → Action.**

Cournot is building Oracle 4.0.
