XRP

XRP Blockchain enables access to the most commonly used XRP methods. These methods bring a small level of abstraction and are used for applications that communicate with the blockchain directly. Some of the methods are used alongside Tatum Private Ledger to connect the blockchain and the private ledger, like wallet generation or getting information about transactions.
Tatum supports 2 chains:


In order to start using the XRP blockchain, we first need to create an XRP account. In XRP, the same account is used for the Mainnet and the Test chain. In order to have the account activated, it must be credited with 20 XRP. Because of this requirement, it is common to use one account for all customers and differentiate them via Destination tags, i.e. a number included in every transaction as an account distinguisher.
When an off-chain deposit address is created for the ledger account, a Destination tag is generated, e.g. 12345 for that account. When a transaction to the blockchain is performed, it should contain the address of the recipient and the Destination tag as an account distinguisher.

Generate XRP account

5 credits per API call.


Generate XRP account. Tatum does not support HD wallet for XRP, only specific address and private key can be generated.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/account
Request samples
Response samples
application/json
{
  • "address": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
  • "secret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}

Get XRP Blockchain Information

5 credits per API call.


Get XRP Blockchain last closed ledger index and hash.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/info
Request samples
Response samples
application/json
{
  • "ledger_hash": "20C40AAF14D52FB614E41625218AF6C97B43076C30060E85AEFB38D54A99050F",
  • "ledger_index": 760383
}

Get actual Blockchain fee

5 credits per API call.


Get XRP Blockchain fee. Standard fee for the transaction is available in the drops.base_fee section and is 10 XRP drops by default. When there is a heavy traffic on the blockchain, fees are increasing according to current traffic.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/fee
Request samples
Response samples
application/json
{
  • "current_ledger_size": "8",
  • "current_queue_size": "0",
  • "drops": {
    },
  • "expected_ledger_size": "67",
  • "ledger_current_index": 760411,
  • "levels": {
    },
  • "max_queue_size": "2000"
}

Get Account transactions

5 credits per API call.


List all Account transactions.

SecurityX-API-Key
Request
path Parameters
account
required
string

Address of XRP account.

query Parameters
min
number

Ledger version to start scanning for transactions from.

marker
string

Marker from the last paginated request. It is stringified JSON from previous response.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/account/tx/{account}
Request samples
Response samples
application/json
{
  • "account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
  • "ledger_index_max": 760762,
  • "ledger_index_min": 614,
  • "marker": {
    },
  • "transactions": [
    ]
}

Get Ledger

5 credits per API call.


Get ledger by sequence.

SecurityX-API-Key
Request
path Parameters
i
required
number >= 0

Sequence of XRP ledger.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/ledger/{i}
Request samples
Response samples
application/json
{
  • "ledger": {
    },
  • "ledger_hash": "198E3A43EFD03F61CF11EAD6585E8C82A21C1B91CCF782A3264973867E697906",
  • "ledger_index": 6543210,
  • "validated": true
}

Get XRP Transaction by hash

5 credits per API call.


Get XRP Transaction by transaction hash.

SecurityX-API-Key
Request
path Parameters
hash
required
string = 64 characters

Transaction hash

Example: 1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/transaction/{hash}
Request samples
Response samples
application/json
{
  • "hash": "1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250",
  • "ledger_index": 760469,
  • "Account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
  • "Amount": "1000000000",
  • "Destination": "rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF",
  • "Fee": "12",
  • "TransactionType": "Payment",
  • "Flags": 2147483648,
  • "LastLedgerSequence": 760473,
  • "Sequence": 118697,
  • "date": 622916620,
  • "inLedger": 760469,
  • "SigningPubKey": "02356E89059A75438887F9FEE2056A2890DB82A68353BE9C0C0C8F89C0018B37FC",
  • "TxnSignature": "304402206BB719587C55513515C092122813BC71C0BA28E7061830ABE6395308A1CAA0B302205B8256181965BB1345902597B2D3F1670F5F23A2E62097B3CCAA1F2EE631655E",
  • "meta": {
    },
  • "validated": true
}

Get Account info

5 credits per API call.


Get XRP Account info.

SecurityX-API-Key
Request
path Parameters
account
required
string

Account address you want to get balance of

Example: rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/account/{account}
Request samples
Response samples
application/json
{
  • "account_data": {
    },
  • "ledger_current_index": 760476,
  • "validated": false
}

Get Account Balance

5 credits per API call.


Get XRP Account Balance. Obtain balance of the XRP and other assets on the account.

SecurityX-API-Key
Request
path Parameters
account
required
string

Account address you want to get balance of

Example: rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/xrp/account/{account}/balance
Request samples
Response samples
application/json
{
  • "assets": [
    ],
  • "balance": "1000000000"
}

Send XRP from address to address

10 credits per API call.


Send XRP from account to account.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
fromAccount
required
string [ 33 .. 34 ] characters

XRP account address. Must be the one used for generating deposit tags.

to
required
string [ 33 .. 34 ] characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent, in XRP.

fromSecret
required
string = 29 characters

Secret for account. Secret, or signature Id must be present.

fee
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Fee to be paid, in XRP. If omitted, current fee will be calculated.

sourceTag
integer

Source tag of sender account, if any.

destinationTag
integer

Destination tag of recipient account, if any.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/xrp/transaction
Request samples
application/json
{
  • "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
  • "to": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
  • "amount": "10000",
  • "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Create / Update / Delete XRP trust line

10 credits per API call.


Create / Update / Delete XRP trust line between accounts to transfer private assets. By creating trustline for the first time, the asset is created automatically and can be used in the transactions.
Account setting rippling must be enabled on the issuer account before the trust line creation to asset work correctly. Creating a trust line will cause an additional 5 XRP to be blocked on the account.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
fromAccount
required
string [ 33 .. 34 ] characters

XRP account address. Must be the one used for generating deposit tags.

issuerAccount
required
string [ 33 .. 34 ] characters

Blockchain address of the issuer of the assets to create trust line for.

limit
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount of the assets to be permitted to send over this trust line. 0 means deletion of the trust line.

token
required
string = 40 characters ^[A-F0-9]{40}$

Asset name. Must be 160bit HEX string, e.g. SHA1.

fromSecret
required
string = 29 characters

Secret for account. Secret, or signature Id must be present.

fee
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Fee to be paid, in XRP. If omitted, current fee will be calculated.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/xrp/trust
Request samples
application/json
{
  • "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
  • "issuerAccount": "rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc",
  • "limit": "10000",
  • "token": "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709",
  • "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Modify XRP account

10 credits per API call.


Modify XRP account settings. If an XRP account should be an issuer of the custom asset, this accounts should have rippling enabled to true. In order to support off-chain processing, required destination tag should be set on the account.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
fromAccount
required
string [ 33 .. 34 ] characters

XRP account address. Must be the one used for generating deposit tags.

fromSecret
required
string = 29 characters

Secret for account. Secret, or signature Id must be present.

fee
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Fee to be paid, in XRP. If omitted, current fee will be calculated.

rippling
boolean

Should be true, if an account is the issuer of assets.

requireDestinationTag
boolean

Should be true, if an account should support off-chain processing.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/xrp/account/settings
Request samples
application/json
{
  • "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
  • "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Broadcast signed XRP transaction

5 credits per API call.


Broadcast signed transaction to XRP blockchain. This method is used internally from Tatum KMS or Tatum client libraries. It is possible to create custom signing mechanism and use this method only for broadcasting data to the blockchain.

SecurityX-API-Key
Request
Request Body schema: application/json
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

signatureId
string <uuid>

ID of prepared payment template to sign. Required only, when broadcasting transaction signed by Tatum KMS.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/xrp/broadcast
Request samples
application/json
{
  • "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}