This is not only relted to REST API, but to the whole exchange.
Everytime the price is moving a bit faster than usual, I place order that should fill immediately. But instead with a “orderinfo” call they have status “NEW”==“open” while they are not listed in “open_orders”.
Of course now you can say “REST API is slow, use websocket instead”, but no, in this case it is not the API, it is the whole exchange. My bot waited several seconds and because the orderstatus was still “NEW” he assumed that it simply wasnt matched and made a cancel request, to place the order to another price. But this new order failed the same way.
Now 2 scenarios are possible:
- I get an error message when trying to place an order, usually means it will get matched, but API is simply too bad.
- I dont get an error message when canceling, so the order gets indeed unfilled cancelled.
It would help alot, if the status of the order, that was not yet placed and, would be sth like “submitted” instead of “open”. It is very important to distinguish between these 2 states. If it is submitted, my bot needs to wait. If it is really unfilled and open, my bot needs to act immediately and cancel it, to place it at a better price.
Without this “submitted” status, I always need to wait, without knowing what the actual status of the order is (before doing more calls to find out more).