---
title: "Open revealed lootboxes"
method: POST
path: "/exchanges/predictfun/activities/{code}/open"
tags: ["Onboarding"]
---

# Open revealed lootboxes

`POST /exchanges/predictfun/activities/{code}/open`

## Request

- Base URL: `https://execution.kairos.trade`
- URL: `https://execution.kairos.trade/exchanges/predictfun/activities/{code}/open`
- Auth: API key in header `X-Client-Id` and API key in header `X-Api-Key` and API key in header `X-Api-Secret`

Opens every revealed, unopened box, by box type, repeating a type while each venue call opens more. Returns the boxes this call opened and their rewards. A venue failure after earlier calls succeeded returns `502`; what was done stays done and retrying is safe.
> **Error shape.** Minimal `{"error": "...", "code": "..."}` (`OrderSimpleErrorResponse`).
**Rate limited** at 20 requests/minute per user (bucket `predictfun-lootbox`, shared by the overview, box list, and bulk reveal/open/claim routes), fail-closed.
**Auth.** API keys and delegations need `trade:execute` (a cold venue session is minted by signing a login challenge with the user's wallet) and the `predictfun` platform access flag.

## Path parameters

- `code` string, required

## Response `200`

Open revealed lootboxes.

- OrderPredictfunLootboxOpen
  - `boxCounts` object[], required
    - `boxTypeId` string, required
    - `openedCount` integer, required
    - `prizeType` string, nullable, required
    - `rewardPerBox` OrderPredictfunRewardAmount, required: An amount in base units; divide by `10^decimals` to display.
      - `rewardType` 'TOKEN' | 'PREDICT_POINTS', required
      - `symbol` string, nullable
      - `decimals` integer, required
      - `amount` string, required
  - `rewards` OrderPredictfunRewardAmount[], required
    - `rewardType` 'TOKEN' | 'PREDICT_POINTS', required
    - `symbol` string, nullable
    - `decimals` integer, required
    - `amount` string, required

## Other responses

- `401`: No valid credential presented — missing/invalid API-key headers or an invalid/expired session token.
- `403`: `PLATFORM_API_ACCESS_DENIED` — the credential lacks `trade:execute` or `predictfun` access.
- `404`: `NO_CREDENTIALS` — the caller has no Predict.fun wallet; `ACTIVITY_NOT_FOUND` — the campaign is not one this deployment enrolls accounts in.
- `409`: `BOXES_LOCKED` — box opening has not unlocked yet; or `SIGNING_RESYNC_REQUIRED` — the wallet's signing delegation must be re-established before the venue session can be minted.
- `429`: `RATE_LIMITED` — more than 20 lootbox requests in a minute. No `Retry-After` header.
- `502`: `PREDICTFUN_API_ERROR` — Predict.fun rejected or failed a call.
- `503`: `NOT_CONFIGURED` — Predict.fun is not configured on this deployment, or API-key access could not be checked (fails closed).

---

[API](https://skmtc.dev/kairos/apis/kairos-order-execution-api.md) - [All operations](https://skmtc.dev/kairos/apis/kairos-order-execution-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kairos/apis/kairos-order-execution-api/revisions/9ba7d463d505?raw)
