# GET /v1/xrpl/amm/{a}/{b}

AMM pool reserves and trading fee for an asset pair.

## Purpose

Returns the reserves of both assets in the order requested and the trading fee as a decimal fraction (`0.005` is 0.5 %).

## When to use

To read AMM pool depth and fee for a pair.

## When not to use

It does not estimate slippage or compare venues (use the slippage page for the CLOB vs AMM comparison); a pair without a pool returns 404.

## Parameters

| Name | In | Required | Description | Constraints | Example |
|---|---|---|---|---|---|
| `a` | path | yes | First asset of the pool. | `XRP` or `CODE.issuer`. `XRP` takes no issuer; any other code needs one. The code is 3 letters or digits (A-Z, 0-9) or 40 hexadecimal digits and is upper-cased; the issuer is a valid classic XRPL address (r..., checksum verified) | `XRP` |
| `b` | path | yes | Second asset of the pool. | `XRP` or `CODE.issuer`. `XRP` takes no issuer; any other code needs one. The code is 3 letters or digits (A-Z, 0-9) or 40 hexadecimal digits and is upper-cased; the issuer is a valid classic XRPL address (r..., checksum verified) | `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh` |

## Request example

```sh
curl -s "https://api.criptonlabs.com/v1/xrpl/amm/XRP/USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
```

## Response example (200)

```json
{
  "asset_a": "XRP",
  "asset_b": "USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
  "reserve_a": "250000",
  "reserve_b": "525000",
  "trading_fee": "0.005",
  "meta": {
    "ledger_index": 100234566,
    "as_of": "2026-10-06T12:00:03.000Z",
    "age_seconds": 4,
    "cache": "hit",
    "stale": false
  }
}
```

## Errors

- 400 [invalid-parameters](https://api.criptonlabs.com/errors/invalid-parameters.md)
- 400 [bad-request](https://api.criptonlabs.com/errors/bad-request.md)
- 404 [not-found](https://api.criptonlabs.com/errors/not-found.md)
- 429 [rate-limited](https://api.criptonlabs.com/errors/rate-limited.md)
- 503 [upstream-unavailable](https://api.criptonlabs.com/errors/upstream-unavailable.md)

## Caching

Fresh for 8 seconds; on upstream failure the last good value is served for up to 60 seconds (`meta.stale` is `true`), then the service answers 503. See the [freshness guide](https://api.criptonlabs.com/docs/guides/freshness.md).

## Rate limit

Tier `expensive`. See the [rate-limits guide](https://api.criptonlabs.com/docs/guides/rate-limits.md).

## MCP tool

The MCP tool `xrpl_amm` returns the same data. See the [MCP quickstart](https://api.criptonlabs.com/docs/guides/mcp-quickstart.md).
