Piece of code I have added to my script on Friday (while waiting for round openning):
from numerapi import NumerAPI
from time import sleep
from datetime import datetime
napi = NumerAPI(public_id="your_public_id", secret_key="your_secret_key")
# wait until current round is open and get current_round number
current_round = 0
while current_round == 0:
print("Waiting for openning of current round at", datetime.now())
try:
if napi.check_round_open():
current_round = napi.get_current_round()
else:
sleep(60)
except:
sleep(60)