lend_repay
Repay borrowed amount (non-custodial). Returns an UNSIGNED base64 tx + current health factor. amount in base units of token. Past the daily free tier an x402 payment_header is required.
idempotency_key (optional): a client-generated UUID.
Retrying with the same key + same args replays the original result instead
of re-repaying. Reuse the SAME key across the build call and its
signed_transaction completion call -- see lend_deposit;
the two legs dedupe independently, so this never raises
IDEMPOTENCY_CONFLICT.
signed_transaction / verify (two-phase execution):
see lend_deposit -- re-call with the signed tx and Crank broadcasts it,
confirms it on-chain, and re-reads the repaid balance + obligation health.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ||
| amount | Yes | ||
| market | No | ||
| verify | No | ||
| protocol | Yes | ||
| caller_id | No | ||
| pay_in_crank | No | ||
| payment_header | No | ||
| wallet_address | Yes | ||
| idempotency_key | No | ||
| marginfi_account | No | ||
| signed_transaction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||