executePredictionBuy
Execute a buy order for prediction outcome tokens, paying USDC to receive shares. Requires explicit user confirmation after previewing the order estimate.
Instructions
Execute a buy order for prediction outcome tokens. Pays USDC and receives outcome token shares.
Prerequisites (mandatory):
Call
getPredictionEngineStatus— engine must be availableCall
getPredictionEventDetail— get tokenId and verify market is openCall
getPredictionOrderEstimate— preview the 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 at the current price 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, getPredictionEventDetail, and getPredictionOrderEstimate first. Show estimate details to user and wait for explicit "yes" before proceeding. orderType=1 (FOK) is the only supported type. slippage="0.05" means accept up to 5% price movement. Response is async ACK — check getPredictionOrderList for actual fill result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| eventId | Yes | ||
| tokenId | Yes | ||
| slippage | Yes | ||
| orderType | Yes | ||
| payTokenCode | Yes |