I did some debugging and found out some points, which could be useful to many, and am listing them below:
-
This looks to be happening when we sent orders in quick succession
-
From point#1, it looks to me that this is happening because Alpaca system is receiving the second order before it is able to properly assimilate the effects of the first order (pardon my usage of these terms, but I hope that the meaning is clear).
To get around this, I have started pausing the program for around 500ms after sending of an order, so that Alpaca system has it’s time to properly take into account the effects of the first order. This looks to be working fine as I have not seen this error since then.
This is what I could find. @Dan_Whitnable_Alpaca can comment further on this.
Thanks