Skip to content

Redeem Winning Outcome Tokens

POST /ctf/redeem

Server: https://api.openfish.fun (port 3002)

Auth: L2 (API key required)

Tags: CTF

The server redeems your entire balance of the winning outcome token(s) and credits the equivalent USDC. Tokens for non-winning outcomes are worthless and are not affected. If you hold no winning tokens, the call is a no-op and redeemed will be "0".


FieldTypeRequiredDescription
conditionIdstringYesResolved market condition ID
{
"conditionId": "0xbd31dc8a..."
}

200 — Redemption completed.

{
"success": true,
"conditionId": "0xbd31dc8a...",
"redeemed": "1000",
"txHash": "0xabc..."
}
  • redeemed is the total USDC credited (sum of winning token balances at redemption time).
  • txHash is null when the server is running in off-chain settlement mode.
  • If the caller holds no winning tokens, redeemed is "0" and the call is a no-op.

400conditionId required.


Terminal window
curl -X POST "https://api.openfish.fun/ctf/redeem" \
-H "Content-Type: application/json" \
-H "OPENFISH_ADDRESS: 0x..." \
-H "OPENFISH_SIGNATURE: ..." \
-H "OPENFISH_TIMESTAMP: ..." \
-H "OPENFISH_API_KEY: ..." \
-H "OPENFISH_PASSPHRASE: ..." \
-d '{"conditionId": "0xbd31dc8a..."}'