What happens when i call /kline endpoint and it has no more data?

Hi,

What happens when I call /kline endpoint and it has no more data?

I assume it sends back what it has? eg: I request for a large date range with the limit set as 1000 and the API only has 800, will the API return 800?

What happens in blank situations, eg: I request limit of 1000, API responds with 1000, I then adjust the date to further back not realising the just responded 1000 was the last lot, the API on the second call responds with 0? or what will it do?

Regards,
Rohan

What happens when I call /kline endpoint and it has no more data?

If the number of candlesticks is less than the limit, for the given time range, the endpoint will return the available candlesticks.

What happens in blank situations

If no candlesticks are available for the given time range, the endpoint will return an empty array.

Hi @tantialex

Thanks. It seems the API responds in a very particularly interesting way. Eg: If I request for an epoch startTime of 1284330416000 (Sunday, 12 September 2010 10:26:56 PM), it returns data from Friday, 14 July 2017 12:00:00 AM only. Does this mean the API when it receives a date further than the data it has it just sends back as far as it can go?

Regards,
Rohan

Could you provide an example for this scenario? (Raw CURL request or query string)

HI @tantialex

Here it is:

{{BaseURI}}klines?symbol=ETHBTC&interval=1d&startTime=1284330416000&endTime=1631578885000&limit=1000

Yes this is correct. You should expect the earliest candlesticks equal to or after the start time provided.