Build: sell an index
build_sell_indexSell index shares for USDC: one transaction redeems the shares for the basket and sells each token on KyberSwap, reverting below the quoted minimum.
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>",
"index": "<index>",
"shares": "<shares>"
},
"name": "build_sell_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | the index's token address | |
| shares | Yes | index shares to sell (18 decimals), 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 |