I
I
Ilya Ivanov2021-11-17 13:38:56
In contact with
Ilya Ivanov, 2021-11-17 13:38:56

How fffffffff?

fffffffffffffffff

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheAndrey7, 2021-11-17
@TheAndrey7

The while loop condition is wrong. Remove the second offset condition. In the getHistory() call, for some reason, you add 200 again. There it is not needed at all, but your offset increases by count with each next iteration of the loop.
Requesting data in parts in a loop is done something like this:

var offset = 0; // Позиция
var count = 200; // Кол-во записей за проход
var total = 5000; // Общее кол-во записей
while (offset < total) {
    /* тут код запроса данных с использованием offset & count */
    offset += count;
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question