---
title: "Prepare Settlement Attestation"
method: POST
path: "/settlement/prepare"
tags: ["Settlement"]
---

# Prepare Settlement Attestation

`POST /settlement/prepare`

For an expired series, resolve the price via a tiered waterfall (settled Polymarket outcome if the market has closed, otherwise a time-weighted average price of the YES token over the 30-minute window ending at expiry, sourced from the Polymarket CLOB `prices-history` endpoint), and return a signed EIP-712 `SettlementAttestation` that anyone can submit to `ConvallaxCore.settle()`. If the TWAP window has no price data, the series is escalated to manual review and no attestation is returned.

## Request body

- SettlementInput
  - `seriesId` string, required — Series ID (uint256) as a decimal or hex string.

## Response `200`

Signed settlement attestation

- SettlementResponse
  - `success` true
  - `seriesId` string
  - `resolutionBps` integer — Settlement price in basis points of $1 (0–100).
  - `validUntil` integer — Attestation expiry (Unix seconds).
  - `signature` string — EIP-712 SettlementAttestation signature by the resolution signer.
  - `meta` SettlementMeta
    - `method` 'official' | 'twap' — Resolution tier that produced the price.
    - `twap` number — Time-weighted average YES price in [0, 1] (when method is twap).
    - `pointCount` integer — Number of in-window price samples used for the TWAP.
    - `yesPrice` number — Settled YES token price in [0, 1] (when method is official).
    - `windowStart` integer — TWAP window start (Unix seconds).
    - `windowEnd` integer — TWAP window end = expiry (Unix seconds).

## Other responses

- `400` — Error
- `503` — Error

---

[API](https://skmtc.dev/convallax/apis/convallax-rfq-api.md) · [All operations](https://skmtc.dev/convallax/apis/convallax-rfq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/convallax/convallax-rfq-api/revisions/c8cb11b778c1/schema)
