When it fires
POST /v1/partner/accounts/{accountId}/release was called while the account:
- holds USDC;
- holds a position in a market that has not resolved, a winning position it has not redeemed, or a position in a cancelled market;
- has a trade, redemption, payout, withdrawal, or other transfer or charge on its wallet that has not finished; or
- had any of those finish less than two minutes ago.
detail says which one stopped it. An account still provisioning, or whose provisioning failed, has no wallet and is released without these checks. A losing position in a resolved market is worth nothing and does not stop a release.
Why it happens
Once you release an account you can no longer act for it, and the user cannot yet reach the account directly. Releasing it with money inside would leave that money stranded, so the API refuses. Holdings are read from the chain, which can take a moment to show a result that has just finished. Nothing was changed.How to fix
- Sell the account’s open positions, or wait for their markets to resolve (
GET /v1/portfolio/positionslists them). A position in a market that has not resolved can only be sold, or held until it resolves. - Wait for every trade, redemption and payout to finish.
- Withdraw the remaining USDC with
POST /v1/partner/accounts/{accountId}/withdrawals, and wait forwithdrawal.completed. A suspended account must be reactivated first, since it cannot withdraw. - Check that
GET /v1/balanceshows nothing left, wait two minutes after the last of these finished, then call release again.
Related codes
WITHDRAWALS_HELD: a withdrawal cannot be made yet after a destination changeDEPENDENCY_UNAVAILABLE: the holdings could not be read, so the account was not released; retry