---
name: xrpl
description: Read XRP Ledger data (fees, funded order books, slippage, AMM pools, account summaries, trust lines, transactions, token issuers, pre-payment readiness, payment paths, network health) through the Criptonlabs read-only API or its MCP server.
---

# XRPL data via Criptonlabs

Use this skill to read current XRP Ledger state. Everything is read-only; the free routes need no authentication. It is served from `https://api.criptonlabs.com` (REST) and `https://api.criptonlabs.com/mcp` (MCP, Streamable HTTP).

## Choose a tool

| Need | MCP tool | REST |
|---|---|---|
| Fee to put on a transaction, congestion | `xrpl_fee` | `GET /v1/xrpl/fee` |
| Is the network healthy | `xrpl_network_health` | `GET /v1/xrpl/network/health` |
| Funded order book for a pair | `xrpl_orderbook` | `GET /v1/xrpl/orderbook` |
| Cost of a market-style buy, CLOB vs AMM | `xrpl_slippage` | `GET /v1/xrpl/slippage` |
| AMM pool reserves and fee | `xrpl_amm` | `GET /v1/xrpl/amm/{a}/{b}` |
| Account balance, trust lines, transfer rate | `xrpl_account_summary` | `GET /v1/xrpl/account/{address}/summary` |
| Latest validated ledger | `xrpl_latest_ledger` | `GET /v1/xrpl/ledger/latest` |
| Can this payment succeed now (destination, tag, trust lines, balance, reserve) | `xrpl_payment_readiness` | `GET /v1/xrpl/payment-readiness` |
| Multi-hop or cross-currency route and its source cost | `xrpl_paths` | `GET /v1/xrpl/paths` |
| All trust lines of an account, paginated | `xrpl_account_lines` | `GET /v1/xrpl/account/{address}/lines` |
| Recent validated transactions of an account, paginated | `xrpl_account_transactions` | `GET /v1/xrpl/account/{address}/transactions` |
| Issuer due diligence for a token (flags, domain, transfer fee, total issued) | `xrpl_token` | `GET /v1/xrpl/token/{asset}` |

`xrpl_slippage` and `/v1/xrpl/slippage` compare CLOB and AMM liquidity: the `venues` object reports each venue and the best one for the amount.

Call `xrpl_payment_readiness` before sending a payment: act only on the verdict `ready`, and never treat `unknown` as `ready`. For a cross-currency or multi-hop payment, call `xrpl_paths` first; it can take up to about 20 seconds and its paths may be non-optimal. The `marker` returned by `xrpl_account_lines` and `xrpl_account_transactions` is opaque: pass it back unchanged to get the next page.

## Freshness

Every response has a `meta` object: `ledger_index`, `as_of`, `age_seconds`, `cache` and `stale`. If `meta.stale` is `true` the value is the last good one served while upstream nodes were failing; decide whether that age is acceptable before acting on it. Values older than the maximum stale window are never served.

## Currencies and amounts

- Currencies are `XRP` or `CODE.issuer` (for example `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`); the code is 3 characters or 40 hex digits.
- Amounts are decimal strings. Never convert them to floats.

## Errors

Errors are RFC 9457 `application/problem+json` with `type`, `title`, `status`, `detail` and `instance`. The `type` URL is a Markdown page that explains the cause and the fix.

- 400 and 404: do not retry unchanged; fix the request.
- 429: wait for the `Retry-After` seconds, then retry.
- 503: retry after `Retry-After`; upstream nodes are unavailable and no recent value exists (except `payments-unavailable`, which has no `Retry-After`: use the free routes or retry later).

## Payments

Pro routes (`/v1/pro/*`) and `/mcp/pro` currently serve free data: no payment is required. Paid access via x402 is announced but not active. Details: https://api.criptonlabs.com/docs/guides/payments.md

## More

Index of all networks and skills: https://api.criptonlabs.com/skills/agent-apis/SKILL.md. Full documentation index: `https://api.criptonlabs.com/docs`. Machine-readable: `/openapi.json` and `/llms.txt`.
