Redeem Winning Outcome Tokens
Endpoint
Section titled “Endpoint”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".
| Field | Type | Required | Description |
|---|---|---|---|
conditionId | string | Yes | Resolved market condition ID |
{ "conditionId": "0xbd31dc8a..."}Response
Section titled “Response”200 — Redemption completed.
{ "success": true, "conditionId": "0xbd31dc8a...", "redeemed": "1000", "txHash": "0xabc..."}redeemedis the total USDC credited (sum of winning token balances at redemption time).txHashisnullwhen the server is running in off-chain settlement mode.- If the caller holds no winning tokens,
redeemedis"0"and the call is a no-op.
400 — conditionId required.
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..."}'