Api/BlockchainFeesApi
// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();
// MainNet API Call
$sdk->mainnet()->api()->blockchainFees();
// TestNet API Call
$sdk->testnet()->api()->blockchainFees();
Methods
Method | Description |
---|---|
bscEstimateGas() | Estimate the fee for a BNB Smart Chain transaction |
celoEstimateGas() | Estimate the fee for a Celo transaction |
egldEstimateGas() | Estimate the fee for an Elrond transaction |
estimateFee() | Estimate the fee for a transaction on a blockchain |
estimateFeeBatchMintNft() | Estimate the fee for a transaction on a blockchain |
estimateFeeDeployCustodialWallet() | Estimate the fee for a transaction on a blockchain |
estimateFeeFromAddress() | Estimate the fee for a transaction on a blockchain |
estimateFeeFromUTXO() | Estimate the fee for a transaction on a blockchain |
estimateFeeTransferFromCustodial() | Estimate the fee for a transaction on a blockchain |
ethEstimateGas() | Estimate the fee for an Ethereum transaction |
ethEstimateGasBatch() | Estimate the fee for multiple Ethereum transactions |
getBlockchainFee() | Get the recommended fee/gas price for a blockchain |
kcsEstimateGas() | Estimate the fee for a KuCoin Community Chain transaction |
klaytnEstimateGas() | Estimate the fee for a Klaytn transaction |
polygonEstimateGas() | Estimate the fee for a Polygon transaction |
vetEstimateGas() | Estimate the gas needed for a VeChain transaction |
xdcEstimateGas() | Estimate the fee for a XinFin transaction |
bscEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/bsc/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->bscEstimateGas(
\Tatum\Model\BscEstimateGas $bsc_estimate_gas
): \Tatum\Model\GasEstimated
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$bsc_estimate_gas | \Tatum\Model\BscEstimateGas |
Return type
Description
Estimate the fee for a BNB Smart Chain transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a BNB Smart Chain transaction. The gas price is obtained from https://explorer.bitquery.io/bsc/gas.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
celoEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/celo/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->celoEstimateGas(
\Tatum\Model\CeloEstimateGas $celo_estimate_gas
): \Tatum\Model\GasEstimated
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$celo_estimate_gas | \Tatum\Model\CeloEstimateGas |
Return type
Description
Estimate the fee for a Celo transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a Celo transaction. The gas price is obtained from https://explorer.bitquery.io/celo_rc1/gas.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
egldEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/egld/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->egldEstimateGas(
\Tatum\Model\TransactionFeeEgldBlockchain $transaction_fee_egld_blockchain
): \Tatum\Model\EgldEstimateGas200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$transaction_fee_egld_blockchain | \Tatum\Model\TransactionFeeEgldBlockchain |
Return type
\Tatum\Model\EgldEstimateGas200Response
Description
Estimate the fee for an Elrond transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for an Elrond transaction. The gas price is obtained from https://gateway.elrond.com/network/config. The gas limit is obtains from https://gateway.elrond.com/transaction/cost.
estimateFee()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFee(
\Tatum\Model\EstimateFee $estimate_fee
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee | \Tatum\Model\EstimateFee |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
10 credits per API call
Estimate the current fee for different types of transactions.
This API is supported for the following blockchains:
- Bitcoin
- BNB Smart Chain
- Celo
- Ethereum
- Harmony
- Klaytn
- Litecoin
- Polygon
- XinFin
estimateFeeBatchMintNft()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFeeBatchMintNft(
\Tatum\Model\EstimateFeeBatchMintNft $estimate_fee_batch_mint_nft
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee_batch_mint_nft | \Tatum\Model\EstimateFeeBatchMintNft |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
estimateFeeDeployCustodialWallet()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFeeDeployCustodialWallet(
\Tatum\Model\EstimateFeeDeployCustodialWallet $estimate_fee_deploy_custodial_wallet
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee_deploy_custodial_wallet | \Tatum\Model\EstimateFeeDeployCustodialWallet |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
estimateFeeFromAddress()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFeeFromAddress(
\Tatum\Model\EstimateFeeFromAddress $estimate_fee_from_address
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee_from_address | \Tatum\Model\EstimateFeeFromAddress |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
estimateFeeFromUTXO()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFeeFromUTXO(
\Tatum\Model\EstimateFeeFromUTXO $estimate_fee_from_utxo
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee_from_utxo | \Tatum\Model\EstimateFeeFromUTXO |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
estimateFeeTransferFromCustodial()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/blockchain/estimate
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->estimateFeeTransferFromCustodial(
\Tatum\Model\EstimateFeeTransferFromCustodial $estimate_fee_transfer_from_custodial
): \Tatum\Model\EstimateFee200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$estimate_fee_transfer_from_custodial | \Tatum\Model\EstimateFeeTransferFromCustodial |
Return type
\Tatum\Model\EstimateFee200Response
Description
Estimate the fee for a transaction on a blockchain
ethEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/ethereum/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->ethEstimateGas(
\Tatum\Model\EthEstimateGas $eth_estimate_gas,
[ string $x_testnet_type = 'ethereum-sepolia' ]
): \Tatum\Model\EthGasEstimation
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$eth_estimate_gas | \Tatum\Model\EthEstimateGas | ||
$x_testnet_type | string | Type of Ethereum testnet. Defaults to ethereum-sepolia. | [optional] [default to 'ethereum-sepolia'] |
Return type
Description
Estimate the fee for an Ethereum transaction
10 credits per API call
Get an estimated gas price and the number of gas units needed for an Ethereum transaction. The gas price is obtained from multiple sources and calculated based on the latest N blocks and the current mempool state.
The fast
gas price is used by default.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
ethEstimateGasBatch()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/ethereum/gas/batch
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->ethEstimateGasBatch(
\Tatum\Model\EthEstimateGasArray $eth_estimate_gas_array,
[ string $x_testnet_type = 'ethereum-sepolia' ]
): \Tatum\Model\EthGasEstimationBatch
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$eth_estimate_gas_array | \Tatum\Model\EthEstimateGasArray | ||
$x_testnet_type | string | Type of Ethereum testnet. Defaults to ethereum-sepolia. | [optional] [default to 'ethereum-sepolia'] |
Return type
\Tatum\Model\EthGasEstimationBatch
Description
Estimate the fee for multiple Ethereum transactions
10 credits per API call + 10 credits per each gas estimation
Get an estimated gas price and the number of gas units needed for multiple Ethereum transactions. The gas price is obtained from multiple sources and calculated based on the latest N blocks and the current mempool state.
The estimations are returned in the same order as the transactions were submitted in the request.
The fast
gas price is used by default.
NOTE: The estimated gas price is returned in wei. However, when making a transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
getBlockchainFee()
Example
#️⃣ Execute command in terminal
Request
GET
/v3/blockchain/fee/{chain}
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->getBlockchainFee(
string $chain
): \Tatum\Model\BlockchainFee
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$chain | string | Chain |
Return type
Description
Get the recommended fee/gas price for a blockchain
1 credit per API call
Get the recommended fee/gas price for a blockchain.
This API is supported for the following blockchains:
- Bitcoin
- Dogecoin
- Ethereum
- Litecoin
kcsEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/kcs/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->kcsEstimateGas(
\Tatum\Model\KcsEstimateGas $kcs_estimate_gas
): \Tatum\Model\GasEstimated
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$kcs_estimate_gas | \Tatum\Model\KcsEstimateGas |
Return type
Description
Estimate the fee for a KuCoin Community Chain transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a KuCoin Community Chain transaction.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
klaytnEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/klaytn/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->klaytnEstimateGas(
\Tatum\Model\KlaytnEstimateGas $klaytn_estimate_gas
): \Tatum\Model\KlaytnEstimateGas200Response
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$klaytn_estimate_gas | \Tatum\Model\KlaytnEstimateGas |
Return type
\Tatum\Model\KlaytnEstimateGas200Response
Description
Estimate the fee for a Klaytn transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a Klaytn transaction. The gas price is obtained from https://explorer.bitquery.io/klaytn/gas.
NOTE: The estimated gas price is returned in peb. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gpeb. Make sure to convert the estimated gas price from peb to Gpeb before submitting your transaction.
polygonEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/polygon/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->polygonEstimateGas(
\Tatum\Model\PolygonEstimateGas $polygon_estimate_gas
): \Tatum\Model\GasEstimated
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$polygon_estimate_gas | \Tatum\Model\PolygonEstimateGas |
Return type
Description
Estimate the fee for a Polygon transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a Polygon transaction. The gas price is obtained from https://gasstation-mainnet.matic.network/.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.
vetEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/vet/transaction/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->vetEstimateGas(
\Tatum\Model\VetEstimateGas $vet_estimate_gas
): float
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$vet_estimate_gas | \Tatum\Model\VetEstimateGas |
Return type
float
Description
Estimate the gas needed for a VeChain transaction
5 credits per API call
Get an estimated amount of gas needed for a VeChain transaction.
xdcEstimateGas()
Example
#️⃣ Execute command in terminal
Request
POST
/v3/xdc/gas
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->blockchainFees()->xdcEstimateGas(
\Tatum\Model\XdcEstimateGas $xdc_estimate_gas
): \Tatum\Model\GasEstimated
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$xdc_estimate_gas | \Tatum\Model\XdcEstimateGas |
Return type
Description
Estimate the fee for a XinFin transaction
2 credits per API call
Get an estimated gas price and the number of gas units needed for a XinFin transaction. The gas price is obtained from https://rpc.xinfin.network/gasPrice.
NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.