Reference · Glossary
Indexer API & Status Reference
Quick lookup for lending-indexer. Swagger at /swagger-ui/ when API is running.
Offer statuses
| Status | Meaning |
pending | Collateral locked; waiting for lender |
active | Lender funded principal; loan running |
repaid | Borrower repaid; lender vault awaiting claim |
claimed | Lender withdrew from repayment vault |
liquidated | Term expired; lender took collateral |
cancelled | Borrower cancelled pending offer |
Tracked UTXO types
| Type | When created |
pending_offer | Offer creation tx |
active_offer | Lender acceptance tx (output 0) |
borrower_principal | Acceptance tx (output 1) — principal locked for borrower |
repayment | Full repayment tx — lender vault |
cancellation | Cancel tx (audit trail) |
liquidation | Liquidation tx (audit trail) |
claim | Lender vault claim tx |
Key endpoints
| Method | Path | Use |
| GET | /offers | Browse offers (filter by status, assets, factory) |
| GET | /offers/{id} | Full detail: NFT ids, participant UTXOs, unspent offer UTXOs |
| GET | /offers/by-script | Offer IDs for wallet holding participant NFT |
| GET | /borrowers/offers | Offers where script_pubkey is borrower |
| GET | /lenders/offers | Offers where script_pubkey is lender |
| GET | /factories/by-script | Factories owned by wallet |
| GET | /factories/{id} | Factory detail + auth/program UTXOs |
Response fields (short offer)
interest_rate — basis points (1000 = 10%)
loan_expiration_height — block height
collateral_amount, principal_amount — decimal satoshi strings
issuance_factory_id — links offer to borrower factory
participants — latest borrower/lender script pubkeys