REST APIActivity
Get activity box summary
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.
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- response
success*booleandata*The signed-in wallet's boxes in an activity's current phase.
curl -X GET 'https://api.predict.fun/v1/activities/string/me/box-summary'{ "success": true, "data": { "phaseId": 0, "canOpen": true, "boxCounts": [ { "boxTypeId": "string", "revealedCount": 0, "openedCount": 0, "creditedCount": 0, "prizeType": "USDT", "rewardPerBox": { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" } } ], "openedRewards": [ { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" } ], "creditedRewards": [ { "rewardType": "TOKEN", "currencyId": 0, "symbol": "string", "decimals": 0, "amount": "string" } ] }}Reveal activity boxes POST
Reveals the boxes the signed-in wallet earned in every match of a phase whose boxes are ready. A wallet earns boxes by trading on the activity's matches after it joins the activity. The boxes of a match stay hidden until the wallet reveals them, and only revealed boxes can be listed, counted and opened. Returns one entry for each match this request revealed, with the wallet's trading in that match and the boxes it earned. A match revealed earlier is left out, so a repeated request returns an empty list. If a response is lost, read the boxes from GET /v1/activities/{activityCode}/me/boxes. This endpoint can have breaking changes without notice, and it can be removed after the activity ends.
Get activity boxes GET
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.