> For the complete documentation index, see [llms.txt](https://bound-1.gitbook.io/bound-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bound-1.gitbook.io/bound-docs/developer-guide/api-reference/bound-lending.md).

# Bound Lending

## POST /api/bound-lending/transaction/sign

> Sign bound lending/option PSBT (origination, repayment, option\_origination, option\_exercise) and broadcast

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.bound.exchange","description":"Production"}],"paths":{"/api/bound-lending/transaction/sign":{"post":{"operationId":"BoundLendingController_signTransaction","summary":"Sign bound lending/option PSBT (origination, repayment, option_origination, option_exercise) and broadcast","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignBoundLendingPsbtDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignBoundLendingPsbtResponseDto"}}}}},"tags":["bound-lending"]}}},"components":{"schemas":{"SignBoundLendingPsbtDto":{"type":"object","properties":{"psbtBase64":{"type":"string","description":"Base64-encoded PSBT with all required signatures except RadFi BE trading wallet co-sign"},"type":{"type":"string","description":"PSBT type: origination, repayment, option_origination, or option_exercise","enum":["origination","repayment","option_origination","option_exercise","order_book_premium"]},"userAccountId":{"type":"string","description":"Borrower's Bound accountId (24-hex Mongo ObjectId). When set on an origination PSBT, the server resolves the borrower's referrer (if any) and enforces that the referrer's address appears as an output receiving a proportional bUSD share of the protocol fee (referralFeeBps / MAX_FEE). Optional — omit to skip referrer validation."},"userTradingAddress":{"type":"string","description":"Trading wallet address of the user who initiates from the FE (borrower for lending, seller for options)"},"solverTradingAddress":{"type":"string","description":"Trading wallet address of the solver/counterparty (lender for lending, buyer for options)"},"borrowerPubkey":{"type":"string","description":"Borrower 33-byte compressed pubkey hex (required for origination/repayment)"},"lenderPubkey":{"type":"string","description":"Lender 33-byte compressed pubkey hex (required for origination/repayment)"},"forfeitureExpiryTimestamp":{"type":"number","description":"Absolute Unix timestamp for forfeiture CLTV leaf (required for origination/repayment)"},"previousLenderPubkey":{"type":"string","description":"Lender 33-byte compressed pubkey hex of the previous loan escrow being rolled over. Required only when the origination PSBT spends a previous escrow input (rollover)."},"previousForfeitureExpiryTimestamp":{"type":"number","description":"Forfeiture CLTV expiry timestamp of the previous loan escrow being rolled over. When set, the origination PSBT is treated as a rollover: input 0 must spend the reconstructed previous escrow (script-path) and the metadata OP_RETURN flag must be 0x04."},"previousLenderTradingAddress":{"type":"string","description":"Previous lender trading wallet address (used in cross-lender rollover to allow the payment output back to the previous lender)."},"sellerPubkey":{"type":"string","description":"Seller 33-byte compressed pubkey hex (required for option_origination/option_exercise)"},"escrowExpiryTimestamp":{"type":"number","description":"Absolute Unix timestamp for escrow CLTV expiry (required for option_origination/option_exercise)"},"hashY":{"type":"string","description":"SHA256 hash Y (32-byte hex) for HTLC escrow (required for option_origination/option_exercise)"}},"required":["psbtBase64","type"]},"SignBoundLendingPsbtResponseDto":{"type":"object","properties":{"txId":{"type":"string","description":"Transaction ID of the broadcasted transaction"},"hex":{"type":"string","description":"Raw transaction hex"}},"required":["txId","hex"]}}}}
```
