exchange.IO("lp.pools", ...)
List a token's concentrated-liquidity pools on Meteora DLMM, Raydium CLMM and Orca Whirlpools, largest USD TVL first.
exchange.IO(k, token)
exchange.IO(k, token, quote)Examples
-
List the 5 SOL/USDC pools with the largest USD TVL.
javascriptfunction main() { var pools = exchange.IO("lp.pools", "SOL", "USDC") if (!pools) { Log("Query failed:", GetLastError()) return } Log(pools.length, "pools") for (var i = 0; i < pools.length && i < 5; i++) { var p = pools[i] var grid = p.protocol == "meteora" ? "binStep " + p.binStep : "tickSpacing " + p.tickSpacing Log(p.dex, p.id, "fee", p.fee / 1e4 + "%", grid, "price", p.price, "TVL", Math.round(p.tvlUsd), "24h volume", Math.round(p.volume24hUsd)) } } -
List the farm rewards of the 10 SOL pools with the largest TVL and whether they are being emitted (Meteora rows have no active).
javascriptfunction main() { var pools = exchange.IO("lp.pools", "SOL") if (!pools) { Log("Query failed:", GetLastError()) return } pools.slice(0, 10).forEach(function(p) { var names = (p.rewards || []).map(function(r) { var state = r.active === undefined ? "" : (r.active ? " (emitting)" : " (ended)") return r.symbol + state }) Log(p.dex, p.symbol, p.id, "rewards:", names.length ? names.join(", ") : "none") }) }
Returns
| Type | Description |
array / null value | An array of pools sorted by |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Set to |
token | string | Yes | The token to look up: a name in the token table, a verified Jupiter token name or a mint address, for example |
quote | string | No | List only pools against this quote token. Without it, pools against SOL, USDC and USDT are listed (excluding the token itself). |
See Also
Jupiter exchange.IO exchange.IO("lp.select") exchange.IO("lp.pool") exchange.IO("lp.ticks") exchange.IO("lp.plan")
Remarks
Common fields
idis the pool address, which can be passed tolp.pool,lp.ticksand thepoolparameter oflp.plan;protocolismeteora,raydiumororca, anddexthe display name (Meteora DLMM,Raydium CLMM,Orca Whirlpools).symbolis writtentoken_quote;baseandquoteare the mint addresses of the two tokens;priceis the quote value of one token;reserveBaseandreserveQuoteare the pool's balances of the two tokens, andtvlQuoteis their total value in the quote token at the current price.feeis the base fee in millionths (400is 0.04%, the unit of the Uniswap exchange object'sfee), andfeeRateis the same fee as a ratio (0.0004).tvlUsd,volume24hUsdandfees24hUsdare the USD TVL, 24h volume and 24h fees from each protocol's data API; when a protocol's API is unavailable its pools are found on chain by mint with the node'sgetProgramAccounts, and those rows have the three fieldsnull.emptytruemarks an empty pool (no price yet), whosepriceandtvlQuotearenull;lp.plancannot add liquidity to an empty pool.
Fields by protocol
protocol | Price grid | Extra fields | Each item of rewards |
|---|---|---|---|
meteora | bins: binStep (basis points) and the active bin activeId | feeRateNow (current fee including the volatility surcharge), enabled | {mint, symbol} |
raydium | ticks: tickSpacing and the current tick | liquidity (liquidity at the price), sqrtPriceX64, enabled | {mint, symbol, active, endTime} |
orca | ticks: tickSpacing and the current tick | liquidity, sqrtPriceX64, adaptiveFee, fullRangeOnly | {mint, symbol, active} |
rewards are the pool's farm reward tokens, active true meaning the reward is being emitted. On Orca, adaptiveFee true means the fee follows volatility (fee is the base fee), and fullRangeOnly true marks a Splash pool, which takes full-range positions only.
Data sources: prices and balances are read on chain (Raydium's fee from the pool's AmmConfig account); the USD statistics come from Meteora's data API (dlmm.datapi.meteora.ag), the Raydium API v3 (api-v3.raydium.io) and Orca's public API (api.orca.so).
Popular tokens often have over a hundred pools (most with little TVL); to pick one by rule, use exchange.IO("lp.select").