executePredictionSell
Execute a sell order to convert prediction outcome token shares into USDC. Requires user confirmation after previewing order estimate.
Instructions
Execute a sell order for prediction outcome tokens. Exchanges token shares for USDC.
Prerequisites (mandatory):
Call
getPredictionEngineStatus— engine must be availableCall
getPredictionPositionList— verify the user holds the token sharesCall
getPredictionOrderEstimate— preview the sell order detailsDisplay the estimate to the user and obtain explicit confirmation
Do NOT call this endpoint without explicit user confirmation.
Phase 1 supports orderType=1 (FOK) only.
A FOK order that cannot be fully filled will be entirely cancelled.
Use slippage to set price tolerance (e.g., "0.05" = 5%).
Response is an ACK only. Check getPredictionOrderList for final fill status.
Agent hint: REQUIRES explicit user confirmation before calling. Always call getPredictionEngineStatus, getPredictionPositionList, and getPredictionOrderEstimate first. Show estimate details to user and wait for explicit "yes" before proceeding. orderType=1 (FOK) is the only supported type. size is in shares (not USDC). Response is async ACK — check getPredictionOrderList for actual fill result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| eventId | Yes | ||
| tokenId | Yes | ||
| slippage | Yes | ||
| orderType | Yes | ||
| toTokenCode | No |