I have trades done in the same second (differ my milliseconds). Koinly often imports them in the wrong order causing "missing purchase history"
Workaround
I have to fix the order of the transactions manually, moving the later transaction 1 min to the future.