Lending
How Lending Works
Browse Lending Opportunities
import { ethers } from 'ethers';
import { ThetanutsClient } from '@thetanuts-finance/thetanuts-client';
const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');
const signer = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
const client = new ThetanutsClient({ chainId: 8453, provider, signer });
// Fetch all available limit orders
const opps = await client.loan.getLendingOpportunities();
for (const o of opps) {
console.log(`#${o.quotationId} | ${o.underlying}`);
console.log(` Collateral: ${o.collateralFormatted} ${o.underlying}`);
console.log(` Provide: ${o.lendAmountFormatted} USDC`);
console.log(` Strike: $${o.strike}`);
console.log(` Expiry: ${o.expiryFormatted}`);
console.log(` APR: ${o.aprFormatted}%`);
}Filter by Underlying
Exclude Your Own Loans
Fill a Limit Order
Lending Opportunity Fields
Field
Type
Description
See Also
Last updated

