A transaction that transfers HBAR and tokens between Hedera accounts. You can enter multiple transfers in a single transaction. The net value of HBAR between the sending accounts and receiving accounts must equal zero. For a CryptoTransferTransactionBody: Transaction FeesDocumentation Index
Fetch the complete documentation index at: https://hedera-0c6e0218-feat-hip-1313-high-volume-entity-creation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Please see the transaction and query fees table for the base transaction fee
- Please use the Hedera fee estimator to estimate your transaction fee cost
addApprovedHbarTransfer()addApprovedTokenTransfer()addApprovedNftTransfer()addApprovedTokenTransferWithDecimals()
Note: The allowance spender must pay the fee for the transaction.
- The accounts the tokens are being debited from are required to sign the transaction
- If an authorized spender account is spending on behalf of the account that owns the tokens then the spending account is required to sign
- The transaction fee-paying account is required to sign the transaction
Constructor
| Constructor | Description |
|---|---|
new TransferTransaction() | Initializes the TransferTransaction object |
Transaction Properties
| Method | Type | Requirement |
|---|---|---|
addHbarTransfer(<accountId, amount>) | AccountId, Hbar | Required |
addTokenTransfer(<tokenId, accountId, amount>) | TokenId, AccountId, long | Optional |
addNftTransfer(<nftId, sender, receiver>) | NftId, AccountId, AccountId | Optional |
addTokenTransferWithDecimals(<tokenId, accountId, amount, decimals>) | TokenId, AccountId, long, int | Optional |
addApprovedHbarTransfer(<ownerAccountId, amount>) | AccountId, Hbar | Optional |
addApprovedTokenTransfer(<tokenId, ownerAccountId, amount>) | TokenId, AccountId, long | Optional |
addApprovedNftTransfer(<nftId, sender, receiver>) | NftId, AccountId, AccountId | Optional |
addApprovedTokenTransferWithDecimals(<tokenId, ownerAccountId, amount, decimals>) | TokenId, AccountId, long, int | Optional |
setHighVolume(<highVolume>) | boolean | Optional |
This transaction supports high-volume entity creation
(HIP-1313) when the transfer auto-creates new accounts. Setting
setHighVolume(true)
routes the account-creation portion of the transfer through dedicated high-volume throttle
capacity with variable-rate pricing. The transfer portion itself uses standard throttles
regardless of this flag. Always pair this with setMaxTransactionFee() to cap your costs.Get Transaction Values
| Method | Type | Description |
|---|---|---|
getHbarTransfers() | Map<AccountId, Hbar> | Returns the HBAR transfers |
getTokenTransfers() | Map<TokenId, Map<AccountId, long>> | Returns the token transfers |
getTokenNftTransfers() | Map<TokenId, List<TokenNftTransfer>> | Returns the NFT transfers |
getHighVolume() | boolean | Returns whether this transaction uses high-volume throttles |