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¶ms=%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:
{"taker_gets":{"currency":"XRP"},"taker_pays":{"currency":"524C555344000000000000000000000000000000","issuer":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"},"limit":5}
Payment flow (x402 v2)
- Send the GET. The server replies
402with a base64PAYMENT-REQUIREDheader: schemeexact, networkeip155:8453, asset Base USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. - Check the offered amount against your own spending cap before signing.
- Sign an EIP-3009
transferWithAuthorizationfor exactly the offered amount to the offeredpayTo. - Retry the same GET with the signed payload in
PAYMENT-SIGNATURE(orX-PAYMENT). - On success you get
200with JSON (executed,paymentVerified,result) and aPAYMENT-RESPONSEheader 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
{
"name": "xrpl_dex_xrp_rlusd_orderbook",
"type": "api",
"url": "https://x402.n9t2.com/bridge/execute?capability=base-xrpl-trading&operation=book_offers¶ms=%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, missingtaker_gets/taker_pays, non-XRP currency without issuer). Nothing is charged.402witherror— 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