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
1
<?php
2
$api_base = "https://blockchainapi.org/api/eth";
3
4
$curl = curl_init();
5
curl_setopt_array($curl, array(
6
CURLOPT_RETURNTRANSFER => 1,
7
CURLOPT_URL => $api_base . "?method=check_fees"
8
));
9
10
$response = curl_exec($curl);
11
$http_status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
12
curl_close($curl);
13
14
if ($http_status_code == 200) {
15
16
$decoded = json_decode($response, true);
17
18
$gas = $decoded['success']['gas']; // In WEI
19
$gasPrice = $decoded['success']['gasPrice']; // In WEI
20
$transaction_fee = $decoded['success']['transaction_fee']; // In ETH
21
$lastUpdated = $decoded['success']['lastUpdated'];
22
23
} else {
24
echo "Failed to get fees";
25
}
26
?>
Copied!
Last modified 3mo ago