Search…
Check Fees
You can check the current fees being used to forward transactions below.
get
https://blockchainapi.org
/api/eth?method=check_fees
Check our Ethereum fees
The following block shows an example of the request URL:

Example code

PHP
<?php
$api_base = "https://blockchainapi.org/api/eth";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $api_base . "?method=check_fees"
));
$response = curl_exec($curl);
$http_status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($http_status_code == 200) {
$decoded = json_decode($response, true);
$gas = $decoded['success']['gas']; // In WEI
$gasPrice = $decoded['success']['gasPrice']; // In WEI
$transaction_fee = $decoded['success']['transaction_fee']; // In ETH
$lastUpdated = $decoded['success']['lastUpdated'];
} else {
echo "Failed to get fees";
}
?>
Copy link
On this page
get
Check our Ethereum fees
Example code