I have been messing around with the API for a little bit and I have a few Guards all over my code for when I think the unexpected has happened and one of those triggered today…
I put in a Limit Sell Order in and it got filled twice within a few minutes. As well as selling my position it then shorted it…
I have turned on “No Shorting” now so I can just handle that rejection in future, I hope…
But is there a parameter I should have been passing with my Sell Order to indicate that it was to Close rather to Open or if best practice is to then Cancel after it has been fulfilled? Because it the first time it has happened.