Returning empty json via API, but returns full dataset via web API demo

I’ve written some Python to retrieve historical bar data from the API, making use of the ‘next_page_token’ for extended datasets.

This works fine (intermittently) but am most recently simply returning an empty json despite also getting a status_code of 200. When I send the same parameters via the ‘Historical bars’ web demo, I return the dataset I’d expect.

First thought is that I’ve been exceeding some kind of rate limit, but see a stated upper limit of 200 calls/min for this free tier, which having paused the calls for a few minutes, should no longer be exceeded. Is there some kind of other unspoken limit at play that I’m not aware of or that isn’t being communicated via the status_code returned by the API call?

1 Like