Skip to main content

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​

ParameterTypeInDescription
idint64pathEvent ID
pool_idint64pathPool ID
won_sidestringbodyWinning outcome: "YES" or "NO"
marketsarraybodyPer-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"
}