# N9t2 Xrpl Dex Orderbook

> Pay-per-call XRPL DEX order book and XRPL ledger data over x402 (Base USDC, no API key). Use when an agent needs live XRP liquidity, bid/ask depth, or validated XRPL account/transaction state inside a trading or analytics task. license: MIT

- Skill: `boss/n9t2-xrpl-dex-orderbook` (Agent Skill)
- Install (CLI): `npx skillmds@latest add boss/n9t2-xrpl-dex-orderbook`
- Raw SKILL.md: https://api.skillmd.com/api/skills/boss/n9t2-xrpl-dex-orderbook/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Data & Analytics
- License: MIT
- Author: N9T2 (https://skillmd.com/u/n9t2)
- Updated: 2026-10-11
- Page: https://skillmd.com/skills/boss/n9t2-xrpl-dex-orderbook

---


# N9T2 XRPL DEX Order Book (x402)

Live XRPL decentralized-exchange order books and validated XRPL ledger data, paid per call with USDC on Base through x402 v2. No account, no API key, no subscription. Your agent pays only for the calls it makes.

## When to use

- You trade XRP (spot or perps) and want on-ledger XRPL DEX liquidity alongside exchange data.
- You need the current XRP/RLUSD or XRP/USD bid/ask book, spread, or depth.
- You need validated XRPL account state, trust lines, or a transaction by hash.

## Endpoint

`GET https://x402.n9t2.com/bridge/execute`

Query parameters (all three required, each exactly once):

| Param | Value |
|---|---|
| `capability` | `base-xrpl-trading` for order books, `base-xrpl-data` for ledger data |
| `operation` | see table below |
| `params` | URL-encoded JSON object |

| Capability | Operation | Required params | Price |
|---|---|---|---|
| `base-xrpl-trading` | `book_offers` | `taker_gets`, `taker_pays` (each `{currency, issuer}`; omit issuer for XRP); optional `limit` 1–20, default 10 | $0.0025 |
| `base-xrpl-data` | `account_info` | `account` | $0.001 |
| `base-xrpl-data` | `account_lines` | `account` | $0.001 |
| `base-xrpl-data` | `account_tx` | `account` | $0.0025 |
| `base-xrpl-data` | `tx` | `transaction` (hash) | $0.0025 |
| `base-xrpl-data` | `ledger_data` | e.g. `{"ledger_index":"validated","limit":1}` | $0.0025 |

The 402 challenge is the source of truth for the current price.

A bare `GET` with no query returns the default product: the XRP/RLUSD order book (limit 5).

## Example: XRP/RLUSD order book

```
https://x402.n9t2.com/bridge/execute?capability=base-xrpl-trading&operation=book_offers&params=%7B%22taker_gets%22%3A%7B%22currency%22%3A%22XRP%22%7D%2C%22taker_pays%22%3A%7B%22currency%22%3A%22524C555344000000000000000000000000000000%22%2C%22issuer%22%3A%22rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De%22%7D%2C%22limit%22%3A5%7D
```

Decoded `params`:

```json
{"taker_gets":{"currency":"XRP"},"taker_pays":{"currency":"524C555344000000000000000000000000000000","issuer":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"},"limit":5}
```

## Payment flow (x402 v2)

1. Send the GET. The server replies `402` with a base64 `PAYMENT-REQUIRED` header: scheme `exact`, network `eip155:8453`, asset Base USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.
2. Check the offered amount against your own spending cap before signing.
3. Sign an EIP-3009 `transferWithAuthorization` for exactly the offered amount to the offered `payTo`.
4. Retry the same GET with the signed payload in `PAYMENT-SIGNATURE` (or `X-PAYMENT`).
5. On success you get `200` with JSON (`executed`, `paymentVerified`, `result`) and a `PAYMENT-RESPONSE` header carrying the settlement reference.

Any standard x402 client (Coinbase x402 SDKs, `x402-fetch`, NOFX `payment: "x402"` external data sources) handles steps 1–4 automatically.

## NOFX external data source

```json
{
  "name": "xrpl_dex_xrp_rlusd_orderbook",
  "type": "api",
  "url": "https://x402.n9t2.com/bridge/execute?capability=base-xrpl-trading&operation=book_offers&params=%7B%22taker_gets%22%3A%7B%22currency%22%3A%22XRP%22%7D%2C%22taker_pays%22%3A%7B%22currency%22%3A%22524C555344000000000000000000000000000000%22%2C%22issuer%22%3A%22rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De%22%7D%2C%22limit%22%3A5%7D",
  "method": "GET",
  "refresh_secs": 30,
  "payment": "x402",
  "max_usd_per_call": 0.003,
  "max_usd_per_day": 1.50
}
```

## Errors

- `400` — invalid query (unknown parameter, unsupported operation, missing `taker_gets`/`taker_pays`, non-XRP currency without issuer). Nothing is charged.
- `402` with `error` — payment missing, expired, or rejected by the facilitator (for example, insufficient USDC balance). Nothing is charged.
- Only read-only operations are available over GET. Transaction submission is not exposed here.

## Safety

- Set a per-call and daily spend cap in your client.
- Never send private keys or seeds to this service. Payment is a signed USDC authorization only.
- Discovery: `https://x402.n9t2.com/.well-known/x402`, `https://x402.n9t2.com/openapi.json`, `https://x402.n9t2.com/llms.txt`

