Fetching new tweets by since_id


hi everyone ,
i have an issue using since_id , my objectif is to get all new tweets starting on a giving since_id ,but how to stop searching , what’s the condition to stop , also to paginate tweets im using for each iteration the since_id in refresh_url is that correct ?

thank you