POST /api/v1/events/{id}/pools/{pool_id}/close
Close a specific pool within an event by declaring the winning outcome. All markets in the pool are settled and positions are paid out accordingly.
Authentication​
Required -- Bearer token. Caller must be the event creator.
Request​
| Parameter | Type | In | Description |
|---|---|---|---|
id | int64 | path | Event ID |
pool_id | int64 | path | Pool ID |
won_side | string | body | Winning outcome: "YES" or "NO" |
markets | array | body | Per-market outcomes (alternative to won_side) |
Example​
curl -X POST https://intotes.com/api/v1/events/1/pools/10/close \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "won_side": "YES" }'
Response​
200 OK​
{
"status": "ok"
}
403 Forbidden​
Returned when the authenticated user is not the event creator.
{
"error": "forbidden"
}
404 Not Found​
{
"error": "pool not found"
}
409 Conflict​
Returned when the pool is already closed.
{
"error": "pool already resolved"
}