getPredictionOrderEstimate
Get prediction order estimates before every buy or sell to reveal expected fill price, shares, fees, and FOK full-fill feasibility.
Instructions
Get estimated execution details for a prediction market order before placing it. Returns estimated average fill price, total shares received/sold, fee, and whether the FOK order can be fully filled.
Mandatory before any buy or sell. AI agent must show estimated results to the user before proceeding to execution.
BUY: set
side=1,amount= USDC to invest,payTokenCode= "USDC"SELL: set
side=2,amount= number of shares to sell
Phase 1 supports orderType=1 (FOK) only.
A FOK order that cannot be fully filled will be cancelled entirely.
Agent hint: REQUIRED before calling buy or sell. Always show the estimate to the user first. side=1 is BUY (amount in USDC), side=2 is SELL (amount in shares). orderType=1 (FOK) is the only supported type in Phase 1. Show estimatedCost, estimatedReceive, feeAmount, and toWin (BUY only) to the user. Do NOT call buy/sell without user confirmation after viewing the estimate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokenId": "<tokenId>",
"side": "<side>",
"eventId": "<eventId>",
"amount": "<amount>",
"orderType": "<orderType>"
},
"name": "getPredictionOrderEstimate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| amount | Yes | ||
| eventId | Yes | ||
| tokenId | Yes | ||
| orderType | Yes | ||
| payTokenCode | No |