Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api/XRPApi

XRP API Reference

// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();

// MainNet API Call
$sdk->mainnet()->api()->xRP();

// TestNet API Call
$sdk->testnet()->api()->xRP();

Methods

Method Description
accountSettingsXrpBlockchain() Modify XRP account
accountSettingsXrpBlockchainKMS() Modify XRP account
transferXrpBlockchain() Send XRP from address to address
transferXrpBlockchainAsset() Send XRP from address to address
transferXrpBlockchainAssetKMS() Send XRP from address to address
transferXrpBlockchainKMS() Send XRP from address to address
trustLineXrpBlockchain() Create / Update / Delete XRP trust line
trustLineXrpBlockchainKMS() Create / Update / Delete XRP trust line
xrpBroadcast() Broadcast signed XRP transaction
xrpGetAccountBalance() Get Account Balance
xrpGetAccountInfo() Get Account info
xrpGetAccountTx() Get Account transactions
xrpGetFee() Get actual Blockchain fee
xrpGetLastClosedLedger() Get XRP Blockchain Information
xrpGetLedger() Get Ledger
xrpGetTransaction() Get XRP Transaction by hash
xrpWallet() Generate XRP account

accountSettingsXrpBlockchain()

Example

#️⃣ Execute command in terminal

✨ php -f accountSettingsXrpBlockchain.php

Request

POST /v3/xrp/account/settings

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->accountSettingsXrpBlockchain(
    \Tatum\Model\AccountSettingsXrpBlockchain $account_settings_xrp_blockchain
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$account_settings_xrp_blockchain \Tatum\Model\AccountSettingsXrpBlockchain    

Return type

\Tatum\Model\TransactionSigned

Description

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.

Back to top


accountSettingsXrpBlockchainKMS()

Example

#️⃣ Execute command in terminal

✨ php -f accountSettingsXrpBlockchainKMS.php

Request

POST /v3/xrp/account/settings

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->accountSettingsXrpBlockchainKMS(
    \Tatum\Model\AccountSettingsXrpBlockchainKMS $account_settings_xrp_blockchain_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$account_settings_xrp_blockchain_kms \Tatum\Model\AccountSettingsXrpBlockchainKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Modify XRP account

Back to top


transferXrpBlockchain()

Example

#️⃣ Execute command in terminal

✨ php -f transferXrpBlockchain.php

Request

POST /v3/xrp/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->transferXrpBlockchain(
    \Tatum\Model\TransferXrpBlockchain $transfer_xrp_blockchain
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_xrp_blockchain \Tatum\Model\TransferXrpBlockchain    

Return type

\Tatum\Model\TransactionSigned

Description

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.

Back to top


transferXrpBlockchainAsset()

Example

#️⃣ Execute command in terminal

✨ php -f transferXrpBlockchainAsset.php

Request

POST /v3/xrp/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->transferXrpBlockchainAsset(
    \Tatum\Model\TransferXrpBlockchainAsset $transfer_xrp_blockchain_asset
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_xrp_blockchain_asset \Tatum\Model\TransferXrpBlockchainAsset    

Return type

\Tatum\Model\TransactionSigned

Description

Send XRP from address to address

Back to top


transferXrpBlockchainAssetKMS()

Example

#️⃣ Execute command in terminal

✨ php -f transferXrpBlockchainAssetKMS.php

Request

POST /v3/xrp/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->transferXrpBlockchainAssetKMS(
    \Tatum\Model\TransferXrpBlockchainAssetKMS $transfer_xrp_blockchain_asset_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_xrp_blockchain_asset_kms \Tatum\Model\TransferXrpBlockchainAssetKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Send XRP from address to address

Back to top


transferXrpBlockchainKMS()

Example

#️⃣ Execute command in terminal

✨ php -f transferXrpBlockchainKMS.php

Request

POST /v3/xrp/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->transferXrpBlockchainKMS(
    \Tatum\Model\TransferXrpBlockchainKMS $transfer_xrp_blockchain_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_xrp_blockchain_kms \Tatum\Model\TransferXrpBlockchainKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Send XRP from address to address

Back to top


trustLineXrpBlockchain()

Example

#️⃣ Execute command in terminal

✨ php -f trustLineXrpBlockchain.php

Request

POST /v3/xrp/trust

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->trustLineXrpBlockchain(
    \Tatum\Model\TrustLineXrpBlockchain $trust_line_xrp_blockchain
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$trust_line_xrp_blockchain \Tatum\Model\TrustLineXrpBlockchain    

Return type

\Tatum\Model\TransactionSigned

Description

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.

Back to top


trustLineXrpBlockchainKMS()

Example

#️⃣ Execute command in terminal

✨ php -f trustLineXrpBlockchainKMS.php

Request

POST /v3/xrp/trust

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->trustLineXrpBlockchainKMS(
    \Tatum\Model\TrustLineXrpBlockchainKMS $trust_line_xrp_blockchain_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$trust_line_xrp_blockchain_kms \Tatum\Model\TrustLineXrpBlockchainKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Create / Update / Delete XRP trust line

Back to top


xrpBroadcast()

Example

#️⃣ Execute command in terminal

✨ php -f xrpBroadcast.php

Request

POST /v3/xrp/broadcast

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpBroadcast(
    \Tatum\Model\BroadcastKMS $broadcast_kms
): \Tatum\Model\TransactionHash

Parameters

Name Type Description Notes
$broadcast_kms \Tatum\Model\BroadcastKMS    

Return type

\Tatum\Model\TransactionHash

Description

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.

Back to top


xrpGetAccountBalance()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetAccountBalance.php

Request

GET /v3/xrp/account/{account}/balance

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetAccountBalance(
    string $account
): \Tatum\Model\XrpAccountBalance

Parameters

Name Type Description Notes
$account string Account address you want to get balance of  

Return type

\Tatum\Model\XrpAccountBalance

Description

Get Account Balance

5 credits per API call.

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

Back to top


xrpGetAccountInfo()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetAccountInfo.php

Request

GET /v3/xrp/account/{account}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetAccountInfo(
    string $account
): \Tatum\Model\XrpAccount

Parameters

Name Type Description Notes
$account string Account address you want to get balance of  

Return type

\Tatum\Model\XrpAccount

Description

Get Account info

5 credits per API call.

Get XRP Account info.

Back to top


xrpGetAccountTx()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetAccountTx.php

Request

GET /v3/xrp/account/tx/{account}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetAccountTx(
    string $account,
    [ float $min, ]
    [ string $marker ]
): \Tatum\Model\XrpAccountTx

Parameters

Name Type Description Notes
$account string Address of XRP account.  
$min float Ledger version to start scanning for transactions from. [optional]
$marker string Marker from the last paginated request. It is stringified JSON from previous response. [optional]

Return type

\Tatum\Model\XrpAccountTx

Description

Get Account transactions

5 credits per API call.

List all Account transactions.

Back to top


xrpGetFee()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetFee.php

Request

GET /v3/xrp/fee

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetFee(): \Tatum\Model\XrpFee

Parameters

This endpoint does not need any parameter.

Return type

\Tatum\Model\XrpFee

Description

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.

Back to top


xrpGetLastClosedLedger()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetLastClosedLedger.php

Request

GET /v3/xrp/info

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetLastClosedLedger(): \Tatum\Model\XrpInfo

Parameters

This endpoint does not need any parameter.

Return type

\Tatum\Model\XrpInfo

Description

Get XRP Blockchain Information

5 credits per API call.

Get XRP Blockchain last closed ledger index and hash.

Back to top


xrpGetLedger()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetLedger.php

Request

GET /v3/xrp/ledger/{i}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetLedger(
    float $i
): \Tatum\Model\XrpLedger

Parameters

Name Type Description Notes
$i float Sequence of XRP ledger.  

Return type

\Tatum\Model\XrpLedger

Description

Get Ledger

5 credits per API call.

Get ledger by sequence.

Back to top


xrpGetTransaction()

Example

#️⃣ Execute command in terminal

✨ php -f xrpGetTransaction.php

Request

GET /v3/xrp/transaction/{hash}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpGetTransaction(
    string $hash
): \Tatum\Model\XrpTx

Parameters

Name Type Description Notes
$hash string Transaction hash  

Return type

\Tatum\Model\XrpTx

Description

Get XRP Transaction by hash

5 credits per API call.

Get XRP Transaction by transaction hash.

Back to top


xrpWallet()

Example

#️⃣ Execute command in terminal

✨ php -f xrpWallet.php

Request

GET /v3/xrp/account

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->xRP()->xrpWallet(): \Tatum\Model\XrpWallet

Parameters

This endpoint does not need any parameter.

Return type

\Tatum\Model\XrpWallet

Description

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.

Back to top