Api/XRPApi
// 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
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.
accountSettingsXrpBlockchainKMS()
Example
#️⃣ Execute command in terminal
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
transferXrpBlockchain()
Example
#️⃣ Execute command in terminal
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.
transferXrpBlockchainAsset()
Example
#️⃣ Execute command in terminal
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
transferXrpBlockchainAssetKMS()
Example
#️⃣ Execute command in terminal
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
transferXrpBlockchainKMS()
Example
#️⃣ Execute command in terminal
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
trustLineXrpBlockchain()
Example
#️⃣ Execute command in terminal
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.
trustLineXrpBlockchainKMS()
Example
#️⃣ Execute command in terminal
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
xrpBroadcast()
Example
#️⃣ Execute command in terminal
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
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.
xrpGetAccountBalance()
Example
#️⃣ Execute command in terminal
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.
xrpGetAccountInfo()
Example
#️⃣ Execute command in terminal
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
Description
Get Account info
5 credits per API call.
Get XRP Account info.
xrpGetAccountTx()
Example
#️⃣ Execute command in terminal
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
Description
Get Account transactions
5 credits per API call.
List all Account transactions.
xrpGetFee()
Example
#️⃣ Execute command in terminal
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
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.
xrpGetLastClosedLedger()
Example
#️⃣ Execute command in terminal
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
Description
Get XRP Blockchain Information
5 credits per API call.
Get XRP Blockchain last closed ledger index and hash.
xrpGetLedger()
Example
#️⃣ Execute command in terminal
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
Description
Get Ledger
5 credits per API call.
Get ledger by sequence.
xrpGetTransaction()
Example
#️⃣ Execute command in terminal
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
Description
Get XRP Transaction by hash
5 credits per API call.
Get XRP Transaction by transaction hash.
xrpWallet()
Example
#️⃣ Execute command in terminal
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
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.