build_sell_shares_tx
Build an unsigned transaction to sell YES or NO prediction-market shares and return stablecoin via CPMM pricing, with optional minimum proceeds for slippage protection.
Instructions
Build an unsigned transaction to sell YES or NO shares on a prediction market. Returns stablecoin based on CPMM pricing.
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": {
"market_address": "<market_address>",
"outcome": "<outcome>",
"shares": "<shares>",
"chain_id": "<chain_id>"
},
"name": "build_sell_shares_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shares | Yes | Number of shares to sell (e.g. "50.0") | |
| outcome | Yes | Market outcome: YES or NO | |
| chain_id | Yes | EVM chain ID (e.g. 8453 for Base, 369 for PulseChain) | |
| min_usdc | No | Minimum stablecoin to accept (slippage protection). Default "0" for no minimum. | 0 |
| market_address | Yes | PredictionMarket contract address |