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.
Provider
XRPSCAN
- xrpl
- Chains
- 1
- Auth
- none
- Operations
- 5 of 10
served 5 / 10
Operations
- balance
getBalanceserved - history
getTxHistoryserved - tx detail
getTxDetailserved - utxos
getUtxosabsent - pubkey
getPubkeyabsent - contract
getContractInfoabsent - tokens
getTokenBalancesserved - transfers
getTokenTransfersabsent - gas
getGasDataabsent - block
getBlockInfoserved
Access
- Create
create("xrpscan") - Import
@agntn/explorers/providers/xrpscan - Host
api.xrpscan.com/api/v1 - Statusproviders on the docs worker
Address it
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
| Operation | Route |
|---|---|
| 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. ItsAmountwas only ever a ceiling. - Only a Payment carries
value. Offers, trust lines and everything else are rows withvalue: "0"andto: nullwhen there's noDestination. - An issued token is
CURRENCY.ISSUER, the way XRPSCAN spells its token pages. A 40-hex code reads as text when it is text, so524C5553…shows up asRLUSD. - Issued amounts are decimal floats on the ledger, not integers. Each one gets the decimals its own value needs.
0.01USD is1with 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 asfailedwith no token transfers. - History is newest first, 25 rows a page, and XRPSCAN ignores any page size you ask for.
limitup to 100, andpage * limitup 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
minerand 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.