Sell a bet
sell_betSells all or part of an open wager position, either immediately at the best bids or as a limit order, after a confirmed simulation. Requires the wager ID; omit shares to exit the whole position.
Instructions
Sells all or part of an open wager (position) for the user. It moves the user's balance and cannot be undone, so only run it after the user has confirmed a simulation for the same wager and shares (get_bet_simulation with side ask, or get_partial_sell_amount). Pass the wager id; omit shares to sell the whole position. On order-book events, which is every current market, the sale is placed as a sell order on the wager's market: without price it sells immediately at the best bids, with price it is a limit order that may rest on the book. The result then contains the created order.
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": "sell_bet"
}
}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. | |
| price | No | Order-book events only: minimum price per share to accept, in whole cents between 0.01 and 0.99. Omit to sell immediately at the best available bids. | |
| shares | No | Number of shares to sell. Omit to sell the entire position. Must not exceed the shares held; selling all of them is the same as omitting it. |