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

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: 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:
A position moves to status: closed once it is settled or sold.

By venue

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

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.