Build: trade a prediction market
build_prediction_tradeBuy YES/NO shares with USDC, or sell shares back for USDC before the market closes. Includes the USDC approval when needed and a minimum-output guard.
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": {
"wallet": "<wallet>",
"id": "<id>",
"side": "<side>",
"action": "<action>",
"amount": "<amount>"
},
"name": "build_prediction_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | prediction market id | |
| side | Yes | ||
| action | Yes | ||
| amount | Yes | USDC to spend (buy) or shares to sell (sell), as a decimal string, e.g. "25" or "0.5" | |
| wallet | Yes | the agent's wallet address — the one that will sign and send the calls | |
| slippageBps | No | max price movement, in basis points (100 = 1%) |