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

> ## Agent Instructions
> To integrate AGG, start with Quickstart: REST (https://docs.agg.market/quickstart/rest), then Order lifecycle & statuses (https://docs.agg.market/concepts/order-lifecycle).
> Track every trade until it reaches a terminal status. Before retrying a failed or timed-out call, read Errors, retries & idempotency (https://docs.agg.market/concepts/errors).
> The API reference is generated from https://docs.agg.market/openapi/openapi.json.

# Market resolution & voids

> How a market settles, how to read a split or refunded outcome, and what happens to positions and open orders

When a market ends, AGG records how each outcome settled and updates the user's positions. Most
markets settle to one winner. Some settle as a split, where every share pays part of a dollar, or
as a void, where holders get their stake back. This page shows how to read each case and what the
user has to do.

## Market status

| Status | Meaning |
| - | - |
| `closed` | Trading has stopped. On some venues a voided market also ends in `closed`. |
| `resolved` | The venue has published how the market settled. |

Status alone does not tell you what an outcome pays. Read the outcome fields below.

## Reading an outcome

Each outcome on `GET /venue-markets`, `GET /venue-events` and `GET /venue-market-outcomes` carries
three settlement fields. Check them in this order:

| Check | Meaning | What a share pays |
| - | - | - |
| `refundAtCost: true` | The market was voided and holders are refunded. | The user's entry price |
| `payoutPerShare` is set | The venue published a per-share payout. | `payoutPerShare` USD (0 to 1) |
| `winner: true` | The outcome won. | \$1 divided by the number of winning outcomes |
| `winner: false` | The outcome lost. | \$0 |
| `winner: null` | Not settled yet. | Keep showing the market price |

A void often shows up as more than one outcome with `winner: true`. Always check `refundAtCost`
and `payoutPerShare` before assuming a winner pays \$1.

Examples:

* **Polymarket 50/50.** Both outcomes have `winner: true` and `payoutPerShare: 0.5`. Each share
  pays \$0.50.
* **Refund at cost.** Every outcome has `refundAtCost: true`. A position bought at 0.42 is
  refunded at \$0.42 a share.

## Positions after settlement

`GET /execution/positions` reflects settlement for each outcome the user holds:

* `winner` is set, `currentPrice` becomes the payout per share, and `priceSource` is `settled`.
* `redeemStatus` tells you whether to call `POST /execution/redeem`:

| `redeemStatus` | Meaning |
| - | - |
| `eligible` | Claim the payout with `POST /execution/redeem`. |
| `pending` | A claim is in progress. |
| `redeemed` | Already claimed or settled. |
| `ineligible` | Nothing to claim through AGG: the outcome lost, the venue settles on its own, or the position is self-custody and is claimed on the venue. |

A position moves to `status: closed` once it is settled or sold.

## By venue

| Venue | How a split or void appears | What the user does |
| - | - | - |
| Polymarket | `resolved`. A 50/50 has both outcomes `winner: true` with `payoutPerShare: 0.5`. | Managed: call `POST /execution/redeem`, which pays \$0.50 a share. Self-custody: redeem on Polymarket. |
| Kalshi | A cancelled or postponed event settles `resolved` at a fair price: YES pays Kalshi's settlement value as `payoutPerShare` and NO pays the rest. Every side that pays anything has `winner: true`. | Nothing. Kalshi settles the payout itself; there is no redeem step. |
| Limitless | A 50/50 settles `resolved`. Both outcomes have `winner: true` and their `payoutPerShare`, for example `0.5`. | Managed: call `POST /execution/redeem`, which pays the split. |
| Predict | A 50/50, for example a cancelled match, settles `resolved` with both outcomes `winner: true` and no `payoutPerShare`. Each share pays $1 divided by the two winners, $0.50. | Call `POST /execution/redeem`, which pays \$0.50 a share. |
| Myriad | A voided market ends as `closed`. Each outcome's `payoutPerShare` is its last market price, which Myriad refunds. | Call `POST /execution/redeem` to claim the refund. `redeemStatus` is `eligible`. |
| Hyperliquid | `resolved`. Split or scalar settlements set `payoutPerShare` on each outcome. | Nothing. Positions settle automatically. |
| BetDEX | A voided market ends as `closed`. | Nothing. The hosted account settles automatically, and the position closes with the settled result. |
| TipRun | A void or fractional settlement ends as `closed`. | Nothing. Positions settle automatically at the venue's payout. |
| ProphetX (Direct accounts) | A cancelled market is `resolved` with `refundAtCost: true` on every outcome. | Nothing. The stake is refunded at the entry price in the user's ProphetX account. |

## Open orders

When a market closes or resolves, or its end date passes, AGG cancels the user's resting managed
limit orders on the venue. They end with status `expired`.

Self-custody limit orders on Polymarket and Hyperliquid are different: AGG does not cancel them.
They stay on the venue until the venue expires them or the user cancels. See
[Limit orders](/recipes/limit-orders).

## Webhooks

`markets.resolved` fires when a market settles. Each entry in `outcomes` carries `label`, `winner`,
`payoutPerShare` and `refundAtCost`. The `market_resolved` WebSocket event carries the same fields.
When more than one outcome has `winner: true`, the market settled as a split or void: read
`payoutPerShare` and `refundAtCost` before you show the user an amount. `payoutPerShare` is absent
when the venue has not reported it. See the
[webhook event reference](/recipes/webhooks/event-reference).

## Related

* [Markets, outcomes & matching](/concepts/markets)
* [Execution](/concepts/execution): redeeming winnings
* [Order lifecycle & statuses](/concepts/order-lifecycle)
