POST /api/v1/events/{id}/pools/{pool_id}/markets/{market_id}/close
Close a specific market within a pool by declaring the winning outcome. Positions in this market are settled: holders of the winning side receive payouts.
Authentication​
Required -- Bearer token. Caller must be the event creator.
Request​
| Parameter | Type | In | Description |
|---|---|---|---|
id | int64 | path | Event ID (int64) |
pool_id | int64 | path | Pool ID (int64) |
market_id | int64 | path | Market ID (int64) |
won_side | string | body | Winning outcome: "YES" or "NO" |
Example​
curl -X POST https://intotes.com/api/v1/events/1/pools/10/markets/101/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": "market not found"
}
409 Conflict​
Returned when the market is already closed.
{
"error": "market already resolved"
}