This quickstart assumes you already have a list of outcome token mints you want to redeem. If you need to discover your positions first, see the User Prediction Positions guide.Redemption involves trading expired OutcomeTokens for the stablecoin you opened your position with. For more details on the settlement process, see the Event Settlement and Redemption concept guide.Note: Outcome tokens always have 0 decimals, so the amount to redeem is the raw token count from the user’s token balance.
Overview
To redeem determined market outcome tokens, you’ll need to:- Check if the outcome token is redeemable by verifying market status and redemption availability
- Request a redemption order using the DFlow Trade API
- Sign and submit the transaction (same process as regular trading)
1
Check if Outcome Token is Redeemable
Use the
/api/v1/market/by-mint/{mint_address} endpoint to fetch market details and verify that the outcome token is redeemable. A token is redeemable when:- The market status is
"determined"or"finalized" - The market result (
"yes"or"no") matches the user’s outcome token (the outcome mint must match theyesMintornoMintfor the determined side) - The redemption status for the settlement mint is
"Open"
Check Redemption Eligibility
Check Redemption Eligibility
2
Request Redemption Order
Use the Trade API
/order endpoint to request a redemption order. The redemption is treated as a trade where you swap your outcome token for the settlement stablecoin.Request Redemption Order
Request Redemption Order
3
Sign and Submit Redemption Transaction
The redemption transaction follows the same workflow as regular trading. Deserialize the transaction, sign it with your keypair, and submit it to Solana. Then monitor the order status based on the execution mode.
Sign and Submit Transaction
Sign and Submit Transaction
Redemption uses the same Trade API workflow as regular trading. Follow the steps in the Trade Tokens quickstart to:
- Sign the Transaction: Deserialize the transaction from base64 and sign it with your keypair
- Submit to Solana: Send the signed transaction to your Solana RPC connection
- Monitor Order Status:
- For sync trades: Use standard RPC confirmation
- For async trades: Poll the
/order-statusendpoint
API Response Structure
Market Response
The/api/v1/market/by-mint/{mint_address} endpoint returns market data including:
- Status: Market status (
"determined"or"finalized"when outcome is finalized) - Result: The determined outcome as a string (
"yes"or"no") - Accounts: Object mapping settlement mint addresses (e.g.,
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"for USDC) to account information:yesMint: YES outcome token mint addressnoMint: NO outcome token mint addressredemptionStatus: Redemption status ("Open"when redemption is available,"pending"when not yet available)marketLedger: Market ledger account address
Order Response
The Trade API/order endpoint returns:
- Transaction: Base64-encoded transaction ready to sign and submit
- Execution Mode:
"sync"(atomic) or"async"(multi-transaction) - Quote information including expected output amount