# XRPL Token API
> Read live XRP Ledger token data from public XRPL nodes — no key — focused on the parts that account-balance APIs miss: what an issuer has actually issued, the native DEX, and native AMM pools. The issuer endpoint returns a gateway's obligations — the total amount of each currency it has issued into circulation, effectively each token's supply. The order-book endpoint returns the live XRPL decentralized-exchange book for any currency pair (against XRP or another issued token) with the best quality offers. And the AMM endpoint returns the on-chain Automated Market Maker pool for a pair — its two reserves, trading fee and LP token outstanding. Distinct from account-, balance- and transaction-level APIs: this is the token-issuance and on-chain-market layer for XRPL wallets, gateways, stablecoin issuers, market makers and analytics. Live from the ledger; short cache only.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/xrpltoken-api/..."
```

## Pricing
- **Free** (Free) — 5,500 calls/Mo, 3 req/s
- **Starter** ($11/Mo) — 116,000 calls/Mo, 8 req/s
- **Pro** ($39/Mo) — 728,000 calls/Mo, 20 req/s
- **Business** ($111/Mo) — 4,620,000 calls/Mo, 50 req/s

## Endpoints

### XRPL

#### `GET /v1/amm` — Native AMM pool for a pair (reserves, fee, LP token)

**Parameters:**
- `asset` (query, required, string) — First asset currency (XRP or code) Example: `XRP`
- `asset2` (query, required, string) — Second asset currency (e.g. USD) Example: `USD`
- `asset2_issuer` (query, optional, string) — Second asset issuer (for issued tokens) Example: `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B`
- `asset_issuer` (query, optional, string) — First asset issuer (if issued token)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/xrpltoken-api/v1/amm?asset=XRP&asset2=USD&asset2_issuer=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
```

**Response:**
```json
{
    "data": {
        "note": "On-chain XRPL Automated Market Maker pool for the pair: its two reserves (amount/amount2), LP token outstanding and trading fee. trading_fee is in units of 1/100000 (trading_fee_pct is the percentage).",
        "asset": {
            "currency": "XRP"
        },
        "amount": "3903443325",
        "asset2": {
            "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
            "currency": "USD"
        },
        "source": "public XRPL JSON-RPC (amm_info)",
        "account": "rHUpaqUPbwzKZdzQ8ZQCme18FrgW9pB4am",
        "amount2": {
            "value": "4466.834526319855",
            "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
            "currency": "USD"
        },
        "lp_token": {
            "value": "3340531.752567071",
            "issuer": "rHUpaqUPbwzKZdzQ8ZQCme18FrgW9pB4am",
            "currency": "03930D02208264E2E40EC1B0C09E4DB96EE197B1"
        },
        "trading_fee": 219,
        "trading_fee_pct": 0.219
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:00.462Z",
        "request_id": "c42c8449-978a-4f46-8467-bf4e26b42a2b"
    },
    "status": "ok",
    "message": "AMM pool retrieved successfully",
    "success": true
}
```

#### `GET /v1/issuer` — An issuer's obligations — issued supply per currency

**Parameters:**
- `account` (query, required, string) — XRPL issuer/gateway account (r...) Example: `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/xrpltoken-api/v1/issuer?account=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
```

**Response:**
```json
{
    "data": {
        "note": "Obligations of the issuer: for each currency, the total amount it has issued into circulation — effectively the token's supply. Sorted by amount.",
        "assets": null,
        "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
        "source": "public XRPL JSON-RPC (gateway_balances)",
        "tokens": [
            {
                "issued": "8387794.672870027",
                "currency": "USD"
            },
            {
                "issued": "4960395.578424789",
                "currency": "EUR"
            },
            {
                "issued": "898766.9732126573",
                "currency": "JPY"
            },
            {
                "issued": "8999.899901060894",
                "currency": "CHF"
            },
            {
                "issued": "8692.124775162521",
                "currency": "AUD"
            },
            {
                "issued": "2358.979490177198",
                "currency": "GBP"
            },
            {
                "issued": "389.7290413769974",
                "currency": "ETH"
            },
            {
                "issued": "326.0626268684788",
                "currency": "BTC"
            }
        ],
        "token_count": 8,
        "frozen_balances": {
            "rEDtyWDqWs9q1aZY82bjoetpADy7iviqhz": [
                {
                    "value": "12.31459690692563",
                    "currency": "BTC"
                }
            ]
        }
    },
    "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/orderbook` — Native DEX order book for a pair

**Parameters:**
- `base` (query, required, string) — Base currency (XRP or 3-char code) Example: `XRP`
- `quote` (query, required, string) — Quote currency (e.g. USD) Example: `USD`
- `quote_issuer` (query, optional, string) — Quote issuer (required for issued tokens) Example: `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B`
- `base_issuer` (query, optional, string) — Base issuer (required if base is an issued token)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/xrpltoken-api/v1/orderbook?base=XRP&quote=USD&quote_issuer=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
```

**Response:**
```json
{
    "data": {
        "base": {
            "currency": "XRP"
        },
        "note": "Live XRPL decentralized-exchange order book: offers selling the base asset for the quote asset. quality is the exchange rate (taker_pays per taker_gets).",
        "count": 10,
        "quote": {
            "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
            "currency": "USD"
        },
        "offers": [
            {
                "account": "rPk3mNveiJzNXzxn9xkP2BhyQGUEtBAE3S",
                "quality": 1.1525e-6,
                "taker_gets": "2024724",
                "taker_pays": {
                    "value": "2.333494240408986",
                    "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
                    "currency": "USD"
                }
            },
            {
                "account": "rPk3mNveiJzNXzxn9xkP2BhyQGUEtBAE3S",
                "quality": 1.1616e-6,
                "taker_gets": "2630655",
                "taker_pays": {
                    "value": "3.055768848",
                    "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
                    "currency": "USD"
                }
            },
            {
                "account": "rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah",
                "quality": 1.1661344e-6,
                "taker_gets": "239970000000",
                "taker_pays": {
                    "value": "279837.271968",
                    "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
                    "currency":
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/xrpltoken-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "issuer_tokens": 8
        },
        "source": "public XRPL JSON-RPC nodes (gateway_balances / book_offers / amm_info), keyless",
        "service": "xrpltoken-api",
        "endpoints": {
            "GET /v1/amm": "Native AMM pool for a pair (asset, asset_issuer, asset2, asset2_issuer).",
            "GET /v1/meta": "This document.",
            "GET /v1/issuer": "An issuer's obligations — issued supply per currency (account=r...).",
            "GET /v1/orderbook": "Native DEX order book for a pair (base, base_issuer, quote, quote_issuer; XRP needs no issuer)."
        },
        "description": "Read live XRP Ledger token data from public XRPL nodes: an issuer's obligations (per-currency issued supply), the native DEX order book for any pair, and native AMM pools (reserves, fee, LP token). The token-issuance and on-chain-market layer for XRPL wallets, gateways and market makers. Distinct from account/balance/transaction APIs. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:01.620Z",
        "request_id": "0b4769b9-d200-4c55-be30-5f18e853e6d5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/xrpltoken-api
OpenAPI spec: https://www.oanor.com/api/xrpltoken-api/openapi.json
