Simulate selling shares
get_partial_sell_amountSimulates the return from selling shares of a wager before you sell anything, returning amount, shares, and price for that position. Call it first to preview the proceeds, then confirm the sale.
Instructions
Simulates what selling shares of a wager would return, without selling anything: returns {amount, shares, price} for the user's wager. Production values the position from the current order-book bids; it can return an amount of 0 on the first call for a market while its book cache warms up, so call it again before believing a 0. Run this and show the result to the user before sell_bet. Pass the wager id, not a market id.
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": {
"id": "<id>"
},
"name": "get_partial_sell_amount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Wager id, as returned by get_user_bets (field `id`). This is not a market id or an event id. | |
| shares | No | Number of shares to simulate selling; must not exceed the shares held in the wager. Omit to simulate selling the entire position. |