Prepare: liquidate a position
liquidateUnsigned transaction liquidating a position past its limit, through the market's own liquidator (anyone may call it, and it pays the caller): no money of the wallet's, Morpho hands over the collateral, it is sold, the debt repaid, and the rest goes to the wallet. market: a stock's symbol with side short or usdg, an agent credit market's symbol (as credit_markets lists them), or a market id (0x and 64 hex) for a coin short or a coin loan (a coin's address with side works too; keeper_jobs gives the arguments). Reads the position fresh from the chain, sizes it as Borro's keeper does, simulates it from the wallet, and sets minProfit to 90% of the simulated profit unless min_profit_usdg is given: under it the transaction reverts and costs the gas alone. Refused in words when the position is healthy, the profit is under min_profit_usdg, the stock vault has lent its stock out (CannotRedeem), or the market is not Borro's.
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>",
"market": "<market>",
"borrower": "<borrower>"
},
"name": "liquidate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Optional, as /jobs.json's prepare gives it: checked against the market | |
| side | No | For a stock or a coin given by its address: short (it is borrowed) or usdg (USDG borrowed against it) | |
| market | Yes | A stock's symbol (like "NVDA", with side), an agent credit market's symbol, a market id (0x and 64 hex), or a coin's address (with side) | |
| wallet | Yes | The wallet that sends it and is paid | |
| borrower | Yes | The position's owner on Morpho (for a stock short, the shorter's wallet or its BorroShort account) | |
| min_profit_usdg | No | The least USDG the wallet will take; less and it reverts (default 90% of the simulated profit) |