Go beyond raw rippled data. Get sorted pool lists, calculated APY, fee tracking, TVL history, and LP position analysis.
The native XRPL amm_info command only returns the current state of a single AMM pool. It does not provide sorted lists, historical data, or calculated metrics. The XRPL.to AMM API adds the layers that developers actually need: sorted pool listings with multiple sort options, APY calculations based on historical fee revenue, fee tracking over configurable time windows, TVL (total value locked) history for charting, volume aggregation across time periods, and LP position tracking with impermanent loss analysis.
Key AMM endpoints available through the API:
GET /amm - List all AMM pools with sorting (fees, apy, liquidity, volume)GET /amm/info - Detailed info for a specific AMM poolGET /amm/liquidity-chart - TVL history for chartingGET /lp-positions/:account - User LP positions with IL dataRetrieve a sorted list of all AMM pools. Sort by APY, trading fees earned, total liquidity, or 24h volume.
fetch('https://api.xrpl.to/v1/amm?sortBy=apy&sortType=desc&limit=10')
.then(res => res.json())
.then(data => {
data.pools.forEach(pool => {
console.log(pool.token1, '/', pool.token2);
console.log(' APY:', pool.apy + '%');
console.log(' TVL:', pool.tvl);
console.log(' 24h Fees:', pool.fees24h);
console.log(' 24h Volume:', pool.volume24h);
});
});Available sortBy values: fees, apy, liquidity, volume.
Get comprehensive data for a single AMM pool including both token balances, fee schedule, LP token supply, and calculated metrics.
curl https://api.xrpl.to/v1/amm/info?ammId=AMM_ACCOUNT
The response includes the AMM account address, both asset balances, trading fee percentage, LP token details, and time-series metrics. Refer to the API documentation for the complete response schema.
Track a user's liquidity provider positions across all AMM pools, including their share percentage and impermanent loss analysis.
curl https://api.xrpl.to/v1/lp-positions/rAddress
Each position includes the pool pair, LP token balance, share of pool, current value of the position, fees earned, and impermanent loss estimate. This is the data you need to build portfolio dashboards and yield tracking tools.
Chart total value locked over time for any AMM pool or across the entire XRPL AMM ecosystem.
curl https://api.xrpl.to/v1/amm/liquidity-chart?ammId=AMM_ACCOUNT
Returns timestamped data points suitable for rendering line charts. Combine with the pool list endpoint to build a comprehensive AMM analytics dashboard.