# XRP Ledger API

The Crypto APIs XRP Ledger API, part of the Blockchain API, lets you read XRP balances, transactions and ledgers and send XRP without running a node. One API key covers mainnet and testnet. Webhooks tell your server when a payment confirms, and we never hold your private keys.

## Key facts

| | |
| --- | --- |
| Networks | Mainnet, Testnet |
| Model | Account (XRP Ledger) |
| Endpoints | 37 |
| Confirmations webhook | Yes, per address |
| Custody | Non-custodial, you sign |
| Free trial | 14 days, no card |

## How do I get the latest XRP Ledger block?

Send one GET request with your API key; the same request works on testnet when you replace mainnet with testnet in the path.

```
curl https://rest.cryptoapis.io/blocks/xrp/mainnet/latest/details \
  -H "X-API-Key: YOUR_API_KEY"
```

## Which XRP Ledger endpoints are available?

The main calls. Every path takes the network: mainnet or testnet.

| What it does | Method and path | Reference |
| --- | --- | --- |
| Latest block | `GET /blocks/xrp/mainnet/latest/details` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/blocks-xrp/get-latest-mined-block-xrp/get) |
| Block by height | `GET /blocks/xrp/mainnet/height/{blockHeight}/details` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/blocks-xrp/get-block-details-by-block-height-xrp/get) |
| Address balance | `GET /addresses-latest/xrp/mainnet/{address}/balance` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/address-latest-xrp/get-address-balance-xrp/get) |
| Transactions of an address | `GET /addresses-latest/xrp/mainnet/{address}/transactions` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/address-latest-xrp/list-transactions-by-address-xrp/get) |
| Transaction by hash | `GET /transactions/xrp/mainnet/{transactionHash}` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/transactions-data-xrp/get-transaction-details-by-transaction-hash-xrp/get) |
| Fee recommendations | `GET /blockchain-fees/xrp/mainnet/mempool` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/blockchain-fees-xrp/get-fee-recommendations-xrp/get) |
| Derive addresses from an xPub | `GET /utils/xrp/mainnet/xpubs/{extendedPublicKey}/derive-addresses` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/features/derive-hd-wallet-xpub-ypub-zpub-change-or-receiving-addresses/get) |
| Prepare an unsigned transaction | `POST /prepare-transactions/xrp/mainnet/native-coins` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/prepare-transactions-xrp/prepare-transaction-from-address-xrp/post) |
| Broadcast a signed transaction | `POST /broadcast-transactions/xrp/mainnet` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/broadcast-locally-sign-transactions/broadcast-locally-signed-transaction/post) |
| Webhook on a confirmed payment | `POST /blockchain-events/xrp/mainnet/address-coins-transactions-confirmed` | [Docs](https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/create-subscriptions-for/new-confirmed-coins-transactions/post) |

## XRP Ledger API questions

**Is there a free XRP Ledger API?** You can try it free for 14 days. The Blockchain API free trial covers XRP Ledger and every feature, with no card. It ends after 14 days or when its credits run out; after that, calls need a subscription, listed on the pricing page.

**How do I get the balance of a XRP Ledger address?** Call the address balance endpoint with the account address; it returns the confirmed XRP balance. Part of every XRP account is held back as the base reserve.

**How do I broadcast a XRP Ledger transaction?** Sign the transaction on your own server, then send the signed raw transaction to the broadcast endpoint, authenticated with your API key, and Crypto APIs pushes it to the XRP Ledger network and returns the transaction ID. We can prepare the unsigned transaction for you first.

**Do you support XRP Ledger testnet?** Yes. Every XRP Ledger endpoint works on mainnet and testnet. Change mainnet to testnet in the path; the same API key works on both.

**What makes XRP Ledger different to work with?** It is an account-model ledger with a reserve requirement. An XRP account must hold a base reserve to exist, and payments to an exchange usually need a destination tag — the field most often missing when a deposit goes unattributed.

**How do I know when a XRP Ledger transaction is confirmed?** Create a webhook subscription for the address. Crypto APIs calls your URL when a transaction to or from it confirms on XRP Ledger.

## Transferring assets with XRP

XRP is a digital payment network created in 2012 and it’s cryptocurrency is called XRP. Multiple major banks worldwide have adopted the XRP payment system. Is available over Mainnet and Testnet networks.

XRP is like a bridge to other currencies. The XRP payment protocol is used not only for XRP transactions but also the transfer of money in any form, fiat or crypto. Any currency can be exchanged for another one. Unlike Bitcoin, XRP has lower processing times and lower costs.

| About XRP Ledger | |
| --- | --- |
| Released | 2012 |
| Consensus | XRP Ledger Consensus Protocol |
| Block time | ~ 3 - 5 seconds |
| Smart contracts | No |

## Other chains on the same API

- [Solana API](/chains/solana)
- [Tron API](/chains/tron)
- [Ethereum API](/chains/ethereum)

## Pointers

- [Blockchain API](/products/blockchain-api)
- [All networks](/what-we-support)
- [Pricing](/pricing)
- [Developer portal](https://developers.cryptoapis.io/)
