Prepare: sell a stock
sell_stockUnsigned transactions for a plain spot sale: a stock token held in the wallet is sold for USDG on Uniswap, through the stock's own pools, and the USDG arrives in the wallet (an amount, or everything the wallet holds with all: true). Stock lent on Borro is not in the wallet: withdraw takes it back first. Exact in: all of the amount is sold and at least the quote less slip_bps arrives, or nothing is sold. Borro's fee, the same as the site's Buy tab takes, comes out of the USDG inside the swap (fee_usdg and fee_bps in the quote). Exact approvals first when they are missing: the stock to Permit2 (Uniswap's approval contract), then Permit2's allowance for Uniswap's Universal Router, which lapses after 30 minutes. Priced now; simulated from the wallet in 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": {
"wallet": "<wallet>",
"symbol": "<symbol>"
},
"name": "sell_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Sell everything the wallet holds of it | |
| amount | No | Stock to sell, in whole units as a decimal string, like "1.5" | |
| symbol | Yes | A stock on Borro by its ticker, like NVDA or AAPL (markets lists every one) | |
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| slip_bps | No | Most the price may move against the quote, in hundredths of a percent (default 50, 0.5%) |