Closing and Resolution
When the real-world outcome of a prediction event is known, creators close the event to trigger settlement. Intotes supports closing at three levels of granularity: individual markets, pools, or the entire event. Events can also be cancelled entirely, refunding all positions.
Closing an Entire Eventβ
POST /api/v1/events/{id}/close
Closes the event and all its pools and markets at once, declaring a single winning outcome.
Request Bodyβ
| Field | Type | Required | Description |
|---|---|---|---|
outcome | integer | Yes | Zero-based index of the winning outcome |
Exampleβ
curl -X POST https://your-domain.com/api/v1/events/123/close \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"outcome": 0}'
If the event's markets are ["Yes", "No"], then outcome: 0 means "Yes" won and outcome: 1 means "No" won.
Closing a Specific Poolβ
POST /api/v1/events/{id}/pools/{pool_id}/close
Closes a single pool and its markets within an event. Other pools in the same event remain open for trading. This is useful when an event has multiple pools that resolve at different times.
Request Bodyβ
| Field | Type | Required | Description |
|---|---|---|---|
outcome | integer | Yes | Zero-based index of the winning outcome within this pool |
Exampleβ
curl -X POST https://your-domain.com/api/v1/events/123/pools/456/close \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"outcome": 1}'
Closing a Specific Marketβ
POST /api/v1/events/{id}/pools/{pool_id}/markets/{market_id}/close
Closes an individual market. This provides the finest level of control, allowing you to resolve one outcome at a time.
Request Bodyβ
| Field | Type | Required | Description |
|---|---|---|---|
outcome | integer | Yes | Zero-based index of the winning outcome |
Settlement Processβ
When a market, pool, or event is closed, the settlement process runs automatically:
- Winning shares pay out at 10,000 per share (in kopecks). If a user holds 5 shares of the winning outcome, they receive 50,000 kopecks.
- Losing shares pay out at 0. Positions on non-winning outcomes are worthless.
- PnL is recorded for each user. The profit or loss equals the settlement payout minus the total cost of acquiring the position.
- The event status transitions to
paidonce all positions are settled.
Example Settlementβ
A user buys 3 shares of "Yes" at an average cost of 6,500 kopecks per share (total cost: 19,500 kopecks).
- If "Yes" wins: User receives 3 x 10,000 = 30,000 kopecks. PnL = +10,500 kopecks.
- If "No" wins: User receives 0. PnL = -19,500 kopecks.
Cancelling an Eventβ
POST /api/v1/events/{id}/cancel
Cancels the event entirely without declaring a winner. All positions are refunded at their original purchase cost.
When to Cancelβ
- The real-world event was called off or postponed indefinitely.
- An error was made in event setup that cannot be corrected.
- Unusual trading activity suggests the event was compromised.
Exampleβ
curl -X POST https://your-domain.com/api/v1/events/123/cancel \
-H "Authorization: Bearer <token>"
Cancellation refunds every user's positions in the event and prevents further trading. This action is irreversible.
Best Practicesβ
- Close promptly -- Settle events as soon as the outcome is confirmed. Delayed settlement frustrates users and ties up their funds.
- Verify the outcome index -- Double-check which index corresponds to which outcome before closing. An incorrect outcome cannot be easily reversed.
- Use granular closing for multi-pool events -- If different pools resolve at different times (e.g., match result vs. total goals), close each pool individually as its outcome becomes known.
- Prefer cancellation over incorrect closure -- If there is uncertainty about the correct outcome, cancelling and refunding is safer than declaring a potentially wrong winner.