Behaviour change for historical overreach
complete
v
vurtmeister
Currently the API returns "no_data" if the from/start date of an API request exceeds the historical data age limit.
It would help if the API only limited data to the plan limit and returned what you were allowed instead.
This would allow for transparent plan upgrades and downgrades without code modification. (easier integration)
It would also be a more accurate response, since "no_data" is not a correct response. (there actually is data).
Log In
M
Max
complete
M
Max
This is done. The API now returns 402 PAYMENT REQUIRED when you don't have permission to get data too far in the past.
v
vurtmeister
Also requesting a date range which falls on a closing day returned "no_data" and obviously no data. Say, for example: requesting the stock candle for a Saturday.
That makes sense but the absence of data on a Saturday is a successful response and it should have a status code of "ok" with an empty result set.
Returning "no_data" is ambiguous because it broaches the same conceptual problem as a NULL result or an empty result. Is there no data (server data error or client request error?) or is there an empty result set? Which one is it?