Exact XRPL AMM swap quotes, with price impact.
Constant-product math against the live pool state: how many tokens a given XRP amount buys, the spot vs effective price, and the exact price impact — what an agent needs before committing to a trade.
MCP tool: quote_amm Price: $0.001 / call
Parameters
| Param | Description |
|---|---|
issuer | XRPL issuer address (r...) |
currency | 3-char code or 40-char hex |
xrp_in | XRP amount to quote (default 10) |
Example
Call (MCP tools/call arguments):
{
"issuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz",
"currency": "534F4C4F00000000000000000000000000000000",
"xrp_in": 100
}
Result:
{
"tokens_out": 7372.6979,
"spot_price_xrp_per_token": 0.0134256,
"price_impact_pct": 1.0276,
"pool_xrp": 39116.73,
"trading_fee_pct": 0.766
}
FAQ
How is price impact calculated for an XRPL AMM?
XLS-30 AMMs are constant-product pools (x·y=k). The quote applies the pool's trading fee to the input, computes output from the invariant, and reports the percentage difference between the effective price and the pre-trade spot price.
Connect via MCP at
https://cerberusindex.com/mcp — see
the quickstart. Payment is automatic for x402-aware clients.
Verdicts are informational risk signals, not financial advice.