I-am not sure if it’s applicable for your issue, but @jesse posted two ideas on a similar topic. With the addition of reading rate limit headers.
@Gugi Some extra information.