Inconsistent order history

I’m using “[GET] Get a list of orders” with…

  • status = “all”
  • limit = 500

… and after/until parameters to get the complete history.

What I’m finding is that the history is inconsistent.


Example:

Iteration 1: E, D, C, B, A (A is the oldest)
Iteration 2: G, E, D, C, B, A

At this point, my balance checks indicate that my calculated positions are mismatched with the actual positions. If I delete all my data and start again…

Iteration 1’: G, F, E, D, C, B, A


The issue is that F was absent from iteration 2 (using “after” to get newer pages) but becomes visible if fetching the entire history (using “until” to get older pages).

In theory I could try to correct for this by rewinding to the last complete point (in the above example E) but I don’t have a good way of knowing how far back I need to go.

Is anybody else running into this? Is it normal for orders to be inserted into the order history “late” like this?