Prepare a buyback
build_buybackReturns the unsigned transactions to pay back a loan and get collateral back: a USDC approval (only if needed) then buyback. Omit payment_usdc to pay the full remaining amount.
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": {
"loan_id": "<loan_id>",
"borrower": "<borrower>"
},
"name": "build_buyback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loan_id | Yes | Loan ID | |
| borrower | Yes | ||
| payment_usdc | No |