This is a simple call to https://ethgasstation.info/json/ethgasAPI.json
{
"fast": 111,
"fastest": 180,
"safeLow": 55,
"average": 80,
"block_time": 14.761904761904763,
"blockNum": 9819011,
"speed": 0.9302273514361274,
"safeLowWait": 18,
"avgWait": 2.8,
"fastWait": 0.5,
"fastestWait": 0.5,
"gasPriceRange": {
"4": 246,
"6": 246,
"8": 246,
"10": 246,
"20": 246,
"30": 246,
"40": 246,
"50": 21.4,
"55": 18,
"60": 10,
"70": 7.7,
"80": 2.8,
"90": 1.8,
"100": 0.8,
"110": 0.6,
"111": 0.5,
"120": 0.5,
"130": 0.5,
"140": 0.5,
"150": 0.5,
"160": 0.5,
"170": 0.5,
"180": 0.5
}
}
From the guide I read
fast: Recommended fast(expected to be mined in < 2 minutes) gas price in x10 Gwei(divite by 10 to convert it to gwei)
This is the param I need, fast
.
So in this call, fast
is 111
, so 11.1gwei
.
This is a gas price, right?
My call consume 68988 unit of gas. It's a fixed length hash, so it's every time identical, I hope.
So totale gas paid is 11.1 * 68988 = 765766.8 giga wei
.
Is this calculation right?
How can I determine the money cost of this transaction?
value > 0
)?