REST APIActivity
Open activity boxes
Opens several of the signed-in wallet's revealed boxes in one request. Send an empty
object to open every unopened box, boxTypeId to open every unopened box of one type,
or boxIds to open the boxes it lists.
Returns what this request opened, counted by box type, with the total of the rewards. Boxes that were already open are left out, so a repeated request returns empty lists.
While boxes cannot be opened yet, the request fails with a 400 and
activity_state_conflict, with OPEN_NOT_AVAILABLE as its details.reason. canOpen
from GET /v1/activities/{activityCode}/me/box-summary tells when they can. An id in
boxIds that is not a revealed box of the wallet is a 404, and no box is opened.
This endpoint can have breaking changes without notice, and it can be removed after the activity ends.
ApiKeyAuthBearerAuthx-api-key<token>API key authentication via the x-api-key header.
AuthorizationBearer <JWT>Bearer authentication via the Authorization: Bearer <token> header.
activityCode*stringThe activity's code, for example lol-worlds or cs2-major.
application/json; charset=utf-8- body
boxTypeId?stringOpen every unopened box of this type, an id from the activity's box types. It cannot
be combined with boxIds.
boxIds?array<string>Open only these boxes, from 1 to 200 ids. An id listed twice counts once. It cannot be
combined with boxTypeId.
application/json; charset=utf-8- response
success*booleandata*curl -X POST 'https://api.predict.fun/v1/activities/string/boxes/open-all' \ -H 'Content-Type: application/json; charset=utf-8' \ -d '{}'{ "success": true, "data": { "boxCounts": [ { "boxTypeId": "string", "openedCount": 0, "prizeType": "USDT", "rewardPerBox": { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" } } ], "rewards": [ { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" } ] }}Open an activity box POST
Opens one of the signed-in wallet's revealed boxes and returns it with its reward. The reward is delivered afterwards, and the box's status goes from CLAIMED to CREDITED once it has been. Opening a box twice is safe. The second request returns the box with opened set to false. While boxes cannot be opened yet, the request fails with a 400 and activity_state_conflict, with OPEN_NOT_AVAILABLE as its details.reason. canOpen from GET /v1/activities/{activityCode}/me/box-summary tells when they can. A box that is not the wallet's, or that the wallet has not revealed, is a 404. This endpoint can have breaking changes without notice, and it can be removed after the activity ends.
Search categories and markets GET
Full-text search across categories and markets. Returns separate arrays for each type, sorted by relevance.