# Automatic redemption

> Reconcile supported resolved binary positions as AGARA converts resolved shares to collateral.

AGARA automatically redeems positions in supported resolved markets. You do
not submit a transaction, sign a message, spend gas, or call a redemption
endpoint.

Current support covers **standalone binary AGARA markets**. Neg-risk events
are composed of binary member markets, but those member markets are not yet
included in this flow.

## What happens after resolution [#what-happens-after-resolution]

When a supported market resolves:

1. Resting orders are cancelled with the `MARKET_RESOLVED` reason.
2. AGARA waits for earlier fills and position operations to finish settling.
3. Each held outcome produces its own `REDEEM` portfolio activity with the
   token, shares, payout, settlement transaction, and creation time.
4. Each share converts to collateral at the price its outcome resolved to, and
   both outcome balances clear. With a single winner, winning shares pay one
   unit each and losing shares pay zero. A
   [split resolution](#split-resolutions) pays each outcome its own price.
5. The private account stream sends a
   [`tokens_redeemed`](/docs/account-stream#tokens_redeemed) event for that
   account change, or
   [`payouts_redeemed`](/docs/account-stream#payouts_redeemed) for a split
   resolution.

Processing starts after resolution is confirmed, but it has no fixed
completion time. Outstanding settlement or an in-flight account batch can
delay it. The portfolio activities are the durable redemption records; the two
outcome rows can appear at different times. `tokens_redeemed` and
`payouts_redeemed` report the account change on the live stream.

Each `REDEEM` row's amount is its shares times the price its outcome paid,
rounded down to the micro unit. Losing shares pay zero, so their row shows
`$0.00`, not a cash deduction or the amount you paid for those shares. For
example, 10 winning shares and 7 losing shares produce activities for `$10.00`
and `$0.00`, and your collateral balance increases by `$10.00`. The losing row
shows a settlement price of `0¢`.

## Split resolutions [#split-resolutions]

A market can resolve to a split instead of a single winner. Each outcome then
pays its own price per share, and the two prices add up to one collateral
unit. A market cancelled at even odds resolves as a 50/50 split. For a split
that pays `37¢` per YES share and `63¢` per NO share:

| You hold         | You receive |
| ---------------- | ----------- |
| 10 YES           | `$3.70`     |
| 10 NO            | `$6.30`     |
| 10 YES and 10 NO | `$10.00`    |

The payout is rounded down to the micro unit separately for each outcome you
hold, so a very small holding can pay zero. Both outcome balances still clear,
and each outcome you held gets its own `REDEEM` row at its split price.

A split is proposed before it is final. While it is proposed, your positions
are valued at the proposed prices and can no longer be sold. The proposal can
still change, and the final split can follow it immediately; redemption starts
only after the market resolves. On the streams, a split arrives as
`payouts_proposed` and `payouts_resolved` on
[`market_status`](/docs/streaming#market_status) and as `payouts_redeemed` on
the account stream, never as a winner with an empty token.

## Reconcile your trading state [#reconcile-your-trading-state]

Treat resolution as an asynchronous account change:

1. Watch `market_resolved`, or `payouts_resolved` for a split resolution, on
   the [`market_status` stream](/docs/streaming#market_status).
2. Process `order_cancelled` events carrying `MARKET_RESOLVED` on the
   [account stream](/docs/account-stream#order_cancelled).
3. On `tokens_redeemed` or `payouts_redeemed` for the resolved `condition_id`,
   refetch
   [`POST /trade/v1/portfolio/positions/list`](/docs/portfolio#positions) and
   [`GET /trade/v1/portfolio/summary`](/docs/portfolio#summary).
4. Read
   [`GET /trade/v1/portfolio/activities`](/docs/portfolio#activities) until the
   `REDEEM` row appears for each outcome you held.
5. Use the cleared position state and updated `cash_balance_micro` before
   sizing new orders.

The account stream is live-only. If you reconnect, receive `sequence_reset`, or
do not receive the redemption event, poll until the position rows clear and
the `REDEEM` activities appear. Older redemptions may contain only a
winning-outcome activity.

A redemption activity has this shape:

```json
{
  "type": "REDEEM",
  "exchange": "AGARA",
  "id": "redeem:<uuid>",
  "condition_id": "0x...",
  "token_id": "<winning-token-id>",
  "shares_micro": "1000000",
  "amount_micro": "1000000",
  "tx_hash": "0x...",
  "created_at": "2026-07-20T12:00:00.000Z"
}
```

For 7 losing shares, `token_id` identifies the losing token, `shares_micro` is
`"7000000"`, and `amount_micro` is `"0"`. On a split that pays `63¢` per NO
share, 7 NO shares give `amount_micro: "4410000"`.

## Frozen accounts and missing payouts [#frozen-accounts-and-missing-payouts]

If your account is frozen when on-chain redemption completes, AGARA holds the
collateral credit until the account is unfrozen. The balance updates, and
`tokens_redeemed` or `payouts_redeemed` is sent, after the freeze is removed.

For a supported standalone binary market, contact support if its position
remains after resolution and your earlier fills and account batches have
finished. Include the `condition_id` and your deposit-wallet address.

See [Positions](/docs/on-chain/positions) for split and merge operations, and
[Inventory](/docs/api-traders/inventory) for quoting with binary outcome tokens.
