If you do have control, this is better controlled at the API level. Code the five minutes rule as an option in the API.
If you can’t do in in the API, then you are limited in what control you have in the GET command. You can only really get all of the data and then filter on it afterwards. Which still relies on data like a timestamp.
I am not in full control of the API, so I can’t code the five minutes rule as an option unfortunately. The GET command I’m running does return a timestamp down to the second, so I can filter afterwards, honestly just learning how to code and haven’t been able to figure out the filtering part.