REST APIActivity
Get activity boxes
The signed-in wallet's revealed boxes in the activity's current phase. Each box has its
type, the match it was earned in and its status. An opened box also has its reward.
A box the wallet has not revealed is not listed. Reveal boxes with
POST /v1/activities/{activityCode}/matches/reveal-all.
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.
matchId?stringOnly the boxes earned in this match.
boxTypeId?stringOnly the boxes of this type, an id from
GET /v1/activities/{activityCode}/box-types.
opened?booleantrue for only the opened boxes, false for only the unopened ones. Leave it out
for both.
orderBy?stringThe order of the list: ID_ASC, the default, for the lowest box id first, or
REVEALED_AT_DESC for the most recently revealed box first.
"ID_ASC""REVEALED_AT_DESC"first?integerPage size, from 1 to 100. Defaults to 50. A value outside that range is rejected.
int32after?stringThe cursor from the previous page, to get the next one. A cursor from a page with
other filters or another order is rejected.
length <= 1024application/json; charset=utf-8- response
success*booleandata*array<>cursor?stringcurl -X GET 'https://api.predict.fun/v1/activities/string/me/boxes'{ "success": true, "data": [ { "id": "string", "matchId": "string", "match": { "title": "string", "teams": [ { "name": "string", "shortName": "string", "logoUrl": "string" } ] }, "boxTypeId": "string", "status": "ALLOCATED", "revealedAt": "string", "openedAt": "string", "reward": { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" }, "prizeType": "USDT" } ], "cursor": "string"}Get activity box summary GET
The signed-in wallet's revealed boxes in the activity's current phase, counted by box type, with the rewards of the boxes it has opened. canOpen tells whether the wallet can open boxes yet. This endpoint can have breaking changes without notice, and it can be removed after the activity ends.
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.