Oil edged higher after a two-day decline, as traders weighed the outlook for an end to the US-Iran war.