# Kryptonian Labs XRPL APIs

> Agent-native, read-only XRP Ledger APIs: fee intelligence, funded order books, slippage, AMM pools, account summaries and upstream health. Every response carries a `meta` object (`ledger_index`, `as_of`, `age_seconds`, `cache`, `stale`). Errors are RFC 9457 `application/problem+json`.

## Agent instructions

- Call the REST routes below with plain `GET` requests, or use the MCP server at `/mcp` (stateless Streamable HTTP, one tool per endpoint). The free routes need no authentication; see Paid access for `/v1/pro/*` and `/mcp/pro`.
- Every successful response carries `meta` (`ledger_index`, `as_of`, `age_seconds`, `cache`, `stale`). If `meta.stale` is true the value is the last good one served while upstream nodes were failing; check `age_seconds` before acting on it.
- Errors are RFC 9457 `application/problem+json`. The `type` URL is a Markdown page with the cause and the fix. Do not retry 400 or 404 unchanged.
- Rate limits are per IP and per tier. On 429 or 503 wait for the `Retry-After` seconds before retrying.
- Currencies are `XRP` or `CODE.issuer`; amounts are decimal strings, never floats.

## Paid access

Calls to `/v1/pro/*` and to tools on `/mcp/pro` are paid per call with x402 in EURC on Solana mainnet (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`, mint `HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr`), VAT included: 0.005 EURC for `/v1/pro/fee`, `/v1/pro/health`, `/v1/pro/network/health`, `/v1/pro/health/history`, `/v1/pro/ledger/latest`; 0.01 EURC for `/v1/pro/orderbook`, `/v1/pro/slippage`, `/v1/pro/amm/{a}/{b}`, `/v1/pro/account/{address}/summary`. Fetch the price index with `GET /v1/pro/requirements` and the payment options with `?resource=<path>` (free), or read them from the 402 `PAYMENT-REQUIRED` header. The free routes under `/v1/` and `/mcp` need no payment.

- [Payments guide](https://api.kriptonianlabs.com/docs/guides/payments.md): how to pay, prepay, errors
- [Pro routes](https://api.kriptonianlabs.com/docs/pro.md): the `/v1/pro/*` namespace with prices
- [Paid MCP server](https://api.kriptonianlabs.com/mcp/pro): the same seven tools as `/mcp`

## Endpoints

- [GET /v1/fee](https://api.kriptonianlabs.com/docs/fee.md): Current XRPL fee tiers in drops with a congestion score.
- [GET /v1/ledger/latest](https://api.kriptonianlabs.com/docs/ledger-latest.md): Latest validated ledger index, hash and close time.
- [GET /v1/health](https://api.kriptonianlabs.com/docs/health.md): Overall and per-node health of the upstream XRPL nodes (alias of network health).
- [GET /v1/network/health](https://api.kriptonianlabs.com/docs/network-health.md): Overall and per-node health of the upstream XRPL nodes.
- [GET /v1/health/history](https://api.kriptonianlabs.com/docs/health-history.md): Bucketed upstream probe history with uptime and latency per node.
- [GET /v1/orderbook](https://api.kriptonianlabs.com/docs/orderbook.md): CLOB order book for a currency pair with unfunded offers removed.
- [GET /v1/slippage](https://api.kriptonianlabs.com/docs/slippage.md): Slippage and average price for buying an amount of base currency.
- [GET /v1/amm/{a}/{b}](https://api.kriptonianlabs.com/docs/amm.md): AMM pool reserves and trading fee for an asset pair.
- [GET /v1/account/{address}/summary](https://api.kriptonianlabs.com/docs/account-summary.md): XRP balance, sequence, owner count, transfer rate and trust lines (capped) for an account.
- [GET /v1/pro/*](https://api.kriptonianlabs.com/docs/pro.md): Pro mirror of the data routes with its own rate tier; the page states whether calls are currently paid. Paid per call via x402 in EURC on Solana mainnet, VAT included.

## Guides

- [Freshness and the meta object](https://api.kriptonianlabs.com/docs/guides/freshness.md)
- [Currencies and amounts](https://api.kriptonianlabs.com/docs/guides/currencies-and-amounts.md)
- [Rate limits](https://api.kriptonianlabs.com/docs/guides/rate-limits.md)
- [Errors](https://api.kriptonianlabs.com/docs/guides/errors.md)
- [Choosing a tool](https://api.kriptonianlabs.com/docs/guides/choosing-a-tool.md)
- [MCP quickstart](https://api.kriptonianlabs.com/docs/guides/mcp-quickstart.md)
- [Paying for pro access (x402)](https://api.kriptonianlabs.com/docs/guides/payments.md)

## Errors

- [invalid-parameters](https://api.kriptonianlabs.com/errors/invalid-parameters.md): 400 Bad Request
- [bad-request](https://api.kriptonianlabs.com/errors/bad-request.md): 400 Bad Request
- [not-found](https://api.kriptonianlabs.com/errors/not-found.md): 404 Not Found
- [unknown-route](https://api.kriptonianlabs.com/errors/unknown-route.md): 404 Not Found
- [method-not-allowed](https://api.kriptonianlabs.com/errors/method-not-allowed.md): 405 Method Not Allowed
- [rate-limited](https://api.kriptonianlabs.com/errors/rate-limited.md): 429 Too Many Requests
- [internal-error](https://api.kriptonianlabs.com/errors/internal-error.md): 500 Internal Server Error
- [upstream-unavailable](https://api.kriptonianlabs.com/errors/upstream-unavailable.md): 503 Service Unavailable
- [payment-required](https://api.kriptonianlabs.com/errors/payment-required.md): 402 Payment Required
- [payments-unavailable](https://api.kriptonianlabs.com/errors/payments-unavailable.md): 503 Service Unavailable
- [payment-settlement-failed](https://api.kriptonianlabs.com/errors/payment-settlement-failed.md): 402 Payment Required
- [payment-already-used](https://api.kriptonianlabs.com/errors/payment-already-used.md): 402 Payment Required
- [payer-blocked](https://api.kriptonianlabs.com/errors/payer-blocked.md): 403 Forbidden
- [payer-limit-reached](https://api.kriptonianlabs.com/errors/payer-limit-reached.md): 429 Too Many Requests

## Docs

- [Documentation index](https://api.kriptonianlabs.com/docs): every page below as Markdown
- [Full documentation](https://api.kriptonianlabs.com/llms-full.txt): every page in one Markdown file
- [OpenAPI 3.1 document](https://api.kriptonianlabs.com/openapi.json): machine-readable description of every REST route
- [MCP server](https://api.kriptonianlabs.com/mcp): stateless Streamable HTTP, one tool per endpoint
- [Paid MCP server](https://api.kriptonianlabs.com/mcp/pro): the same seven tools as the MCP server; see Paid access for the current mode
- [Status page](https://api.kriptonianlabs.com/status): live upstream health

## Discovery

- [Agent card](https://api.kriptonianlabs.com/.well-known/agent-card.json): discovery metadata in A2A 1.0 card format; the advertised interface is the MCP endpoint, not an A2A task endpoint
- [MCP Server Card](https://api.kriptonianlabs.com/mcp/server-card): MCP server identity, version, remotes and payment signal (alias: /.well-known/mcp/server-card.json)
- [ARD manifest](https://api.kriptonianlabs.com/.well-known/ard.json): Agentic Resource Discovery manifest listing both cards
- [Price index](https://api.kriptonianlabs.com/v1/pro/requirements): free, uncharged list of every priced route and tool (add ?resource= for one offer)
- [Paid access](https://api.kriptonianlabs.com/docs/pro.md): pro routes and /mcp/pro, with the current payment mode
- [OpenAPI 3.1 document](https://api.kriptonianlabs.com/openapi.json): machine-readable description of every REST route
- [Agent Skill xrpl](https://api.kriptonianlabs.com/skills/xrpl/SKILL.md): Read XRP Ledger data (fees, funded order books, slippage, AMM pools, account summaries, network health) through the Kryptonian Labs read-only API or its MCP server.
- [Agent Skill xrpl-fee](https://api.kriptonianlabs.com/skills/xrpl-fee/SKILL.md): Pick the fee to put on an XRP Ledger transaction and read the latest validated ledger, with congestion and freshness metadata.
- [Agent Skill xrpl-liquidity](https://api.kriptonianlabs.com/skills/xrpl-liquidity/SKILL.md): Read funded XRP Ledger order books, estimate CLOB versus AMM slippage and read AMM pool reserves and fees.
- [Agent Skill xrpl-account](https://api.kriptonianlabs.com/skills/xrpl-account/SKILL.md): Read an XRP Ledger account summary: balance, trust lines and issuer transfer rates.
- [Agent Skill xrpl-health](https://api.kriptonianlabs.com/skills/xrpl-health/SKILL.md): Check whether the XRP Ledger network is healthy and read recent upstream health history.
- [Agent Skill xrpl-payment-prep](https://api.kriptonianlabs.com/skills/xrpl-payment-prep/SKILL.md): Run a pre-payment check on the XRP Ledger from fee, network health and account state before building a transaction.
