Ethgasstation and similar websites estimate proper Gas Price based on current state of Ethereum network. Is there any way of using working with
web3 to estimate proper Gas Price? and similar to this, how about estimate Gas Limit?
You can use
getBlock on the latest block in Web3 to get back the gas limit of that block:
Number: The maximum gas allowed in this block.
You are probably pretty safe to use that gas limit on the next transaction you want to create.
Web3 also has a gas price oracle as documented here:
Returns the current gas price oracle. The gas price is determined by the last few blocks median gas price.