I’m trying to use the HTTP headers x-ratelimit-remaining to figure out how many calls I have left every day.
I’m doing a Matrix V2 call with 1 origin and a little over 150 destinations.
After doing 1 call, my dashboard correctly displays 499/500 remaining
The HTTP header of the CURL return however, returned [x-ratelimit-remaining]  = 0
After the 2nd call, the dashboard correctly displays 498/500, but the HTTP header returns:
[x-ratelimit-remaining]  = 466
And after the 3rd call, the HTTP header returns [x-ratelimit-remaining]  = 445.
After the 4th call, it was finally correctly returning 496.
But after the 5th call, it returned 445 again (!).
Can anyone please explain what is going on, and how to get the correct amount of matrix v2 calls remaining?