{"openapi":"3.1.0","info":{"title":"c2c.family API","version":"1.0.0","description":"Peer to peer loans on Robinhood Chain (4663). Reads + unsigned tx builders. See /llms.txt."},"servers":[{"url":"https://api.c2c.family"}],"paths":{"/health":{"get":{"summary":"ok, database, latest block, worker heartbeat age, feed age, contract address (or null), keeper on/off","description":"ok, database, latest block, worker heartbeat age, feed age, contract address (or null), keeper on/off","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/config":{"get":{"summary":"chain, contract, fees (bps + caps), rules (terms, liquidation, grace, price bounds), tokens (principal / collateral), su","description":"chain, contract, fees (bps + caps), rules (terms, liquidation, grace, price bounds), tokens (principal / collateral), suggested max LTV per collateral","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/assets":{"get":{"summary":"every token c2c lends or takes: t, name, px (USD, live), ch (24 h %), kind (usd | coin | stock), address, decimals, prin","description":"every token c2c lends or takes: t, name, px (USD, live), ch (24 h %), kind (usd | coin | stock), address, decimals, principal, collateral, open (market hours)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/stats":{"get":{"summary":"lentToday (USD), lentAll, activeUsd, avgApr, onTime (% repaid by term + 24 h), loans, active, closed, openOffers, onBook","description":"lentToday (USD), lentAll, activeUsd, avgApr, onTime (% repaid by term + 24 h), loans, active, closed, openOffers, onBookUsd, openRequests","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/book":{"get":{"summary":"open offers (lowest APR first) and borrower requests (highest APR first)","description":"open offers (lowest APR first) and borrower requests (highest APR first). ?asset=USDG|ETH ?term=7|14|30|60|90 ?colls=NVDA,ETH ?search=","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string"}},{"name":"term","in":"query","required":false,"schema":{"type":"string"}},{"name":"colls","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}]}},"/offers/{id}":{"get":{"summary":"one offer: amount left, APR, term, accepted collateral, max LTV, liquidation LTV, status","description":"one offer: amount left, APR, term, accepted collateral, max LTV, liquidation LTV, status","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/requests/{id}":{"get":{"summary":"one borrower request","description":"one borrower request","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/loans":{"get":{"summary":"loans: ?status=active|repaid|liquidated|defaulted|all ?addr=0x..","description":"loans: ?status=active|repaid|liquidated|defaulted|all ?addr=0x... (as lender or borrower) ?limit=","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"addr","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}]}},"/loans/{id}":{"get":{"summary":"one loan: terms, owed now (interest for whole days used), LTV, health, liquidation price, on-chain health, timeline with","description":"one loan: terms, owed now (interest for whole days used), LTV, health, liquidation price, on-chain health, timeline with tx links","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/rates":{"get":{"summary":"best (lowest) open lender APR by asset and term (USDG, ETH, and USDG offers by collateral NVDA, TSLA, AAPL); null where ","description":"best (lowest) open lender APR by asset and term (USDG, ETH, and USDG offers by collateral NVDA, TSLA, AAPL); null where no offer","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/leaders":{"get":{"summary":"lenders by USD lent: lent, loans, onTime %, earned (USD, after the interest fee)","description":"lenders by USD lent: lent, loans, onTime %, earned (USD, after the interest fee)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/activity":{"get":{"summary":"recent real events: offers, requests, loans matched, repaid, liquidated","description":"recent real events: offers, requests, loans matched, repaid, liquidated","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/slips":{"get":{"summary":"the latest matched loans (lender, borrower, amount, APR, term, collateral)","description":"the latest matched loans (lender, borrower, amount, APR, term, collateral)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/profile/{addr}":{"get":{"summary":"a wallet: borrowing, lent, closed, open offers and requests, earned by month, real balances (ETH, USDG, stock tokens)","description":"a wallet: borrowing, lent, closed, open offers and requests, earned by month, real balances (ETH, USDG, stock tokens)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string"}}]}},"/prices/{sym}":{"get":{"summary":"price history for the loan chart: ?days=7|30 -> [{at, usd}] (15 min ticks)","description":"price history for the loan chart: ?days=7|30 -> [{at, usd}] (15 min ticks)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"sym","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"}}]}},"/fee":{"get":{"summary":"borrow fee for a wallet: ?borrower=0x..","description":"borrow fee for a wallet: ?borrower=0x... -> {bps} (0 for wallets holding $30 of $C2C once the coin is live)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"borrower","in":"query","required":false,"schema":{"type":"string"}}]}},"/contracts":{"get":{"summary":"every contract and wallet c2c runs: C2CLoans, the price keeper, the treasury, with explorer links","description":"every contract and wallet c2c runs: C2CLoans, the price keeper, the treasury, with explorer links","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/events":{"get":{"summary":"SSE stream: offer, request, loan, price events (?types=loan,offer)","description":"SSE stream: offer, request, loan, price events (?types=loan,offer)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"types","in":"query","required":false,"schema":{"type":"string"}}]}},"/tx/offer":{"post":{"summary":"lend: {from, asset: \"USDG\"|\"ETH\", amount: \"6000\", apr: 9, term: 30, maxLtv: 60, liqLtv?: 80 (default maxLtv + 20; 0 = ti","description":"lend: {from, asset: \"USDG\"|\"ETH\", amount: \"6000\", apr: 9, term: 30, maxLtv: 60, liqLtv?: 80 (default maxLtv + 20; 0 = time default only), minFill?: \"500\", accepts: [\"NVDA\",\"ETH\"]}. Locks the amount in C2CLoans until taken or cancelled. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/take":{"post":{"summary":"borrow from an offer: {from, offer: 12, amount?: \"6000\" (default: all left), coll: \"NVDA\", collAmount?: \"64\" (default: e","description":"borrow from an offer: {from, offer: 12, amount?: \"6000\" (default: all left), coll: \"NVDA\", collAmount?: \"64\" (default: enough for the offer's max LTV)}. The keeper posts fresh prices first; the principal minus 0.5% lands in the same tx. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/request":{"post":{"summary":"ask for a loan: {from, asset, amount, apr, term, coll, collAmount, liqLtv?}","description":"ask for a loan: {from, asset, amount, apr, term, coll, collAmount, liqLtv?}. Locks the collateral until funded or cancelled. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/fund":{"post":{"summary":"lend into a request: {from, request: 3}","description":"lend into a request: {from, request: 3}. The borrower gets the principal in the same tx. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/repay":{"post":{"summary":"{from, loan: 7}: principal + interest for the days used; the collateral comes back","description":"{from, loan: 7}: principal + interest for the days used; the collateral comes back. Anyone may repay for the borrower. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/add-collateral":{"post":{"summary":"{from, loan, amount}: the borrower locks more collateral to raise health","description":"{from, loan, amount}: the borrower locks more collateral to raise health. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/cancel-offer":{"post":{"summary":"{from, offer}: the lender pulls back what is left","description":"{from, offer}: the lender pulls back what is left. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/cancel-request":{"post":{"summary":"{from, request}: the borrower pulls back the collateral","description":"{from, request}: the borrower pulls back the collateral. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/liquidate":{"post":{"summary":"{from, loan}: anyone may close a loan past its line (fresh price, market open) or 24 h past the term","description":"{from, loan}: anyone may close a loan past its line (fresh price, market open) or 24 h past the term. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/tx/withdraw":{"post":{"summary":"{from, asset}: pull a payout the contract could not push to you","description":"{from, asset}: pull a payout the contract could not push to you. returns {txs:[approve?, tx], summary, quote?}: send them in order from `from` (the server never signs for you)","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/house/terms":{"post":{"summary":"house rows (ids h1, h101...: off chain, manual approval, no money locked): {row, from, coll?, collAmount?, amount?} -> {","description":"house rows (ids h1, h101...: off chain, manual approval, no money locked): {row, from, coll?, collAmount?, amount?} -> {message, ts, terms}: the exact text to personal_sign","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/house/take":{"post":{"summary":"{row, from, coll?, collAmount?, amount?, ts, sig}: request a house row with your signature","description":"{row, from, coll?, collAmount?, amount?, ts, sig}: request a house row with your signature. Goes to a manual review; nothing moves until c2c confirms by hand","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/house/requests":{"get":{"summary":"your house requests and their status (pending, approved, rejected, sent + tx): ?addr=0x...","description":"your house requests and their status (pending, approved, rejected, sent + tx): ?addr=0x...","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[{"name":"addr","in":"query","required":false,"schema":{"type":"string"}}]}},"/mcp":{"post":{"summary":"MCP over streamable HTTP (JSON-RPC): tools list_offers, list_requests, get_prices, loan_health, my_loans, post_offer, ta","description":"MCP over streamable HTTP (JSON-RPC): tools list_offers, list_requests, get_prices, loan_health, my_loans, post_offer, take_offer, post_request, fund_request, repay, add_collateral, cancel, list_contracts","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"your wallet 0x address"}}}}}}}},"/llms.txt":{"get":{"summary":"this guide","description":"this guide","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}},"/openapi.json":{"get":{"summary":"OpenAPI 3.1","description":"OpenAPI 3.1","responses":{"200":{"description":"JSON"},"400":{"description":"{error}"},"404":{"description":"{error}"},"429":{"description":"{error, retry_after}"}},"parameters":[]}}}}