Skip to main content
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

closed and resolved in this section are market status, not position status. Status alone does not tell you what an outcome pays. Read the outcome fields below.

Reading an outcome

Read refundAtCost first: when it is true the market was voided and a share pays the user’s entry price. If payoutPerShare is set, that is the USD paid per share, from 0 to 1. Otherwise winner: true pays $1 divided by the number of winning outcomes, `winner: false` pays $0, and winner: null is not settled yet. Each outcome on GET /venue-markets, GET /venue-events and GET /venue-market-outcomes carries those fields. Check them in this order: 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.

Inferred winners

Outcomes also carry winnerSource, which says who decided winner. It is null when winner is null, and also on winners recorded before this field existed: Only ProphetX produces matched winners today. ProphetX’s resolution event names no winner. About every 15 minutes after a market resolves, AGG fills the winner from matched markets on other venues for the same game, and only when they agree. A soccer spread at exactly ±0.5 goals is filled from the same game’s moneyline instead, and is also matched, even when that moneyline is a venue result. A matched winner can still change. When ProphetX settles the market itself, that overrides the inferred winner, flips winnerSource to venue and bumps the market’s updatedAt. A push or void sets refundAtCost: true; otherwise the outcomes take ProphetX’s won or lost result. For example, in a tennis match where one player retired, prediction markets paid the player who advanced while ProphetX voided the bet, so the matched winner was replaced by a refund. The matched fill does not send market_resolved or a webhook. ProphetX’s resolution event fires earlier, with no winner. The later correction may or may not send market_resolved and the webhook (with winnerSource: "venue"), depending on how ProphetX’s result reaches AGG. To see a matched winner and any correction reliably, poll updatedAt or re-read the market. Settle held ProphetX positions only when winnerSource is "venue" or refundAtCost is true. Treat matched as provisional.

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:
A position’s status: closed is position status: that holding is settled or sold. It is not market status closed.

Redeem

POST /execution/redeem claims outcomes whose redeemStatus is eligible. mode (live or paper) is optional.
Redeem winnings for resolved positions. The call returns before an EVM claim finishes. Read redeemId and each results[] entry’s status (submitted, confirmed, ineligible, or rejected) and reason. That body is not the settlement record above. Auto-redeem. When a market resolves, AGG automatically claims payouts for your users’ winning positions on venues that require an on-chain claim (Polymarket, Limitless, Predict, Myriad), including winnings that were left unclaimed before this feature launched. The claim starts about 2 minutes after AGG sees the market resolve (an inherent delay so the venue’s on-chain payout is in place first), so expect the payout a few minutes after the market closes, depending on how quickly the venue resolves it. On by default; turn it off in the dashboard under Settings → Auto-redeem winning positions.

By venue

In this table, closed and resolved are market status. A ProphetX direct account is the user’s own ProphetX account, using that account’s cash rather than an AGG balance. Choose your integration does not list it: AGG does not deposit, withdraw, or redeem those funds, and the position settles in the 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.

Webhooks

The webhook markets.resolved and the socket event market_resolved are different channels, and EVM redeem completion is the socket event redeem_event, not market_resolved. On either settlement channel, read refundAtCost and payoutPerShare before you show an amount. When more than one outcome has winner: true, the market settled as a split or void. payoutPerShare is absent when the venue has not reported it. winnerSource is absent when winner is, and on winners recorded before this field. See the webhook event reference.