The API is cached, you shouldn’t poll with the request faster than once per minute. Excessively requesting the same data can even return erroneous results where you may hit different cache servers and so get stale data after previously getting fresh data.
The ratelimit is 800 requests per minute, so if you’re getting a 429 response you’re sending requests faster than that. If you’re only requesting a single channel at a time, despite the Get Streams endpoint supporting up to 100 channels per request, then that will also likely result in you using significantly more requests than you should be on top of the excessive polling interval.
What you may want to do is just use EventSub on your server and subscribe to the stream.online and stream.offline types, then Twitch will send you notifications when the stream goes live or offline.