Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Query lending markets, token metadata, and oracle prices
const markets = await land.listMarkets({ chain: "solana", protocol: "kamino", }); for (const market of markets.items) { console.log(`${market.underlying_token.symbol} (${market.lending_market_name})`); console.log(` Supply APY: ${((market.current_supply_rate ?? 0) * 100).toFixed(2)}%`); console.log(` Borrow APY: ${((market.current_borrow_rate_variable ?? 0) * 100).toFixed(2)}%`); console.log(` Utilization: ${((market.utilization ?? 0) * 100).toFixed(1)}%`); console.log(` Price: $${market.price_usd}`); }
// Highest supply APY first const topYield = await land.listMarkets({ sort: "current_supply_rate", order: "desc", }); // Alphabetical by symbol const alphabetical = await land.listMarkets({ sort: "symbol", order: "asc", });
const mainMarket = await land.listMarkets({ pool_ref: "MainMarketPoolAddress...", });
const market = await land.getMarket("market-uuid"); console.log(`Collateral factor: ${market.collateral_factor}`); console.log(`Liquidation threshold: ${market.liquidation_threshold}`); console.log(`Liquidation bonus: ${market.liquidation_bonus}`); console.log(`Isolated: ${market.is_isolated}`); console.log(`Supply cap: ${market.supply_cap}`); console.log(`Borrow cap: ${market.borrow_cap}`);
const tokens = await land.listTokens({ chain: "solana" }); for (const token of tokens.items) { console.log(`${token.symbol} (${token.name})`); console.log(` Decimals: ${token.decimals}`); console.log(` Stablecoin: ${token.is_stablecoin}`); console.log(` Risk flags: ${token.risk_flags.join(", ") || "none"}`); }
const sol = await land.listTokens({ symbol: "SOL" });
const prices = await land.listPrices({ chain: "solana" }); for (const price of prices.items) { console.log(`$${price.price_usd} (${price.source}, ${price.staleness_seconds}s ago)`); }