Is there a way or api endpoint to calculate the gas fee before sending the ETH? My client requirements is to calculate the gas fee before sending an ETH to other user.
I can only get the gas price using blockcypher api.
Thank you
If you are only sending Ethers directly to a user's wallet the gas usage is always 21000. But if you are sending Ethers to a contract it may be arbitrary.
Most clients offer functionality to estimate the gas usage in advance. Note that this is only an estimation and sometimes it's not possible to make even an estimate.
If you mean only the gas price, you can get that for example here: https://docs.ethgasstation.info/gas-price