Skip to content

XRP Ledger

Endpointhttps://rpc.lab.au.ro/xrp
Protocolrippled JSON-RPC over HTTPS (POST)
Networkmainnet
Batch— (rippled has no batch)

rippled's HTTP dialect wraps parameters in a one-element array: {"method":"...","params":[{...}]} — and returns errors insideresult (HTTP stays 200).

Supported methods

Live-verified: server_info, server_state, fee, ledger, ledger_current, account_info, tx, random, submit — the public rippled API. Admin methods are rejected by the node.

Quick test

bash
curl -X POST https://rpc.lab.au.ro/xrp \
  -H "apikey: $YOUR_API_KEY" -H 'Content-Type: application/json' \
  -d '{"method":"server_info","params":[{}]}'
# {"result":{"info":{"build_version":"3.1.3","complete_ledgers":"104874056-104874578",...}}}

SDK integration

xrpl.js's Client class is WebSocket-only — until our WS endpoint ships, use the HTTP dialect directly (it is the same JSON shapes xrpl.js uses):

js
async function xrpl(method, params = {}) {
  const res = await fetch('https://rpc.lab.au.ro/xrp', {
    method: 'POST',
    headers: { apikey: process.env.YOUR_API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ method, params: [params] })
  })
  const { result } = await res.json()
  if (result.error) throw new Error(`${result.error}: ${result.error_message ?? ''}`)
  return result
}

const { info } = await xrpl('server_info')
console.log('validated ledgers:', info.complete_ledgers)

const fee = await xrpl('fee')
console.log('open ledger fee (drops):', fee.drops.open_ledger_fee)

xrpl.js is still the right tool offlineWallet, transaction autofill templates and encode/sign work without a connection; submit the signed blob via submit.

Recipes

Account balance

js
const r = await xrpl('account_info', {
  account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
  ledger_index: 'validated'
})
console.log('XRP:', Number(r.account_data.Balance) / 1_000_000)
// unknown accounts throw actNotFound — an account funded below the
// 10 XRP reserve does not exist on-ledger

Submit a signed transaction

js
const r = await xrpl('submit', { tx_blob: signedHex })
console.log(r.engine_result)   // tesSUCCESS | tec*/tem* codes

Watch validated ledgers

ledger_current (3 s cache) returns the in-progress index; poll ledger {ledger_index:"validated"} for closed ledgers (~4 s cadence).

Limitations

  • No WebSocket yet → no streaming subscriptions; poll instead.
  • complete_ledgers shows the node's history window — queries below it return lgrNotFound.