Oil prices rose after ‌US and Iran traded strikes, with Tehran saying ​it had closed the vital Strait of Hormuz.