# How to convert gasPrice from ETH Gas Station API to US dollars?

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
}
}
``````

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?

• Do you pass any funds in your transaction (i.e., `value > 0`)? Apr 7, 2020 at 11:03
• No, I simply pass a string, and it is fixed length Apr 7, 2020 at 13:00
• Adjusted the question title as ETH is real money. Jun 30, 2020 at 7:17
• @MikkoOhtamaa:; you adjustment is WRONG. I am doing a money -> money conversion.... Jul 1, 2020 at 12:14
• Just joking :) You made it sound like ETH is not money. Jul 1, 2020 at 20:11