The benchmark indices Sensex and Nifty extended gains in Wednesday's trade on hopes of US-Iran ceasefire after US President Donald Trump said that Washington was making progress toward negotiating an end to the war.