Do it like this:
for eachId in listOfIds:
successful = False
while not successful:
response = makeRequest(eachId)
if response == 'market is closed':
time.sleep(24*60*60) #sleep for one day
else:
successful = True
The title of your question is the clue. Repeating is achieved by iteration, and in this case you can do it simply with a nested while.