PUT /api/v1/events/{id}/pools/{pool_id}/probabilities
Updates the market probabilities for a specific pool. This adjusts the LMSR AMM state to reflect the new target probabilities. Only the event creator can perform this action.
Authenticationβ
Creator β requires a valid Bearer token in the Authorization header. The authenticated user must be the creator of the parent event.
Requestβ
Path Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The parent event ID |
pool_id | integer | Yes | The pool ID to update |
Bodyβ
| Field | Type | Required | Description |
|---|---|---|---|
probabilities | array of floats | Yes | New probability values for each market outcome. Must sum to 1. |
Exampleβ
curl -X PUT https://yoyo.market/api/v1/events/10/pools/42/probabilities \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"probabilities": [0.55, 0.45]
}'
Responseβ
200 OKβ
{
"message": "probabilities updated"
}
Errorsβ
| Status | Code | Description |
|---|---|---|
| 400 | invalid_probabilities | Probabilities array is missing, empty, or does not sum to 1 |
| 401 | unauthorized | Missing or invalid authentication token |
| 403 | forbidden | Authenticated user is not the event creator |
| 404 | pool_not_found | No pool exists with the given ID under this event |
| 500 | internal_error | Unexpected server error |