Limit the number of external API calls per second
I would like to use wp_remote_post to retrieve data from an external API. The matter is that the external API only accepts a maximum of 5 requests per second. However, depending on how many users are using the related feature on my website, my website may send more than 5 requests per second. How can I, in Wordpress, enqueue (or limit) the output requests (or the use of wp_remote_post) in order to allow only 5 external API calls per second from my website ? Thanks.
Topic wp-remote-post limit api Wordpress
Category Web