Providers

XRPSCAN

The XRP Ledger through XRPSCAN. Balances in drops, history, trust line tokens and ledgers as blocks. No key, ten thousand requests a day.
IDxrpscan22 / 22keyless
Provider

XRPSCAN

  • xrpl
Chains
1
Auth
none
Operations
5 of 10
served 5 / 10

Operations

  • balancegetBalanceserved
  • historygetTxHistoryserved
  • tx detailgetTxDetailserved
  • utxosgetUtxosabsent
  • pubkeygetPubkeyabsent
  • contractgetContractInfoabsent
  • tokensgetTokenBalancesserved
  • transfersgetTokenTransfersabsent
  • gasgetGasDataabsent
  • blockgetBlockInfoserved

Access

Createcreate("xrpscan")
Import@agntn/explorers/providers/xrpscan
Hostapi.xrpscan.com/api/v1
Statusproviders on the docs worker

Address it

ts
import { XRPScan } from "@agntn/explorers/providers/xrpscan";

const xrp = new XRPScan(); // or create("xrpscan")
await xrp.getBalance("rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv", "xrpl");
await xrp.getTxDetail("B01A7E11B84A2539A3DCCF65C95514F4C3A87E61BAF7DBDED9F1CDEE06D5A39C", "xrpl");

One chain, no key. baseUrl is the API root, https://api.xrpscan.com/api/v1 by default. The free tier allows 10,000 requests a day, plenty for checking whether a prize is still sitting there.

The chain key is xrpl, and xrp or ripple get you there too. An r... address with nothing else says XRP Ledger on its own, so explorers rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv just works. Any other chain is an UnsupportedChainError.

What it reads

OperationRoute
balance/account/{address}
token holdings/account/{address}/assets
history/account/{address}/transactions?marker=
one transaction/tx/{hash}
block/ledger/{index}

No token transfers and no gas. XRPSCAN has no fee endpoint, and its history has no filter by token. Scanning pages to fake one? Not today.

Gotchas

  • Drops, six decimals. One XRP is a million of them.
  • A partial payment counts what arrived, not what it asked for. Spam payments ask for 10^17 drops and deliver a few thousand. The row takes delivered_amount, so a dusting doesn't look like a fortune. A partial payment from before 2014 has no such field and reads as zero. Its Amount was only ever a ceiling.
  • Only a Payment carries value. Offers, trust lines and everything else are rows with value: "0" and to: null when there's no Destination.
  • An issued token is CURRENCY.ISSUER, the way XRPSCAN spells its token pages. A 40-hex code reads as text when it is text, so 524C5553… shows up as RLUSD.
  • Issued amounts are decimal floats on the ledger, not integers. Each one gets the decimals its own value needs. 0.01 USD is 1 with 2 decimals, a 16-digit RLUSD balance gets 16.
  • A single transaction prints issued values as JSON numbers, while history prints text. XRPSCAN already did that conversion on its side, so the 16th digit is whatever its JavaScript kept.
  • A rejected transaction (tec…) still sits in a ledger and still pays its fee. It reads as failed with no token transfers.
  • History is newest first, 25 rows a page, and XRPSCAN ignores any page size you ask for. limit up to 100, and page * limit up to 250, which is ten markers deep. sort: "asc" and ledger bounds throw.
  • An account the ledger never funded doesn't exist there. That's a NotFoundError, not a zero.
  • A ledger is a block with an empty miner and gas fields of "0". A ledger past the tip comes back as a 500 from XRPSCAN, sadly not a 404.

Where it lives

src/providers/xrpscan.ts.