This is generating a LOT of tokens.
You should generate a token, and use it till it’s close to expirartion, and then generate a new one, if you can.
Thats standard, it’ll take 3-5 minutes (or quicker) for a stream to show as live in the API
You may also be interested in
https://dev.twitch.tv/docs/api/webhooks-guide
So twitch can tell you when a stream is live rather than long polling