orders filling with a lag

I have a situation I’m trying to understand (Expired close, would like to understand the reason) but it all points to a specific problem with the way binance handles the execution.

Here is an abstracted version of the setup:

2 orders:

  • STOP MARKET OPEN SHORT @ 1000
  • STOP LIMIT CLOSE SHORT @ 900, with stop price at 1000 + 1 tick

expected behavior:

  • price goes up, touches 1000
  • open order gets filled
  • price goes up, touches 1000 + 1 tick
  • close order gets activated and sized to position

practical behavior:

  • price goes up, touches 1000
  • price goes up, touches 1000 + 1 tick
  • close order gets activated and sized to no position, gets expired
  • open order gets filled

hypothesis of the problem:

  • price goes up, touches 1000
  • open order does not get filled yet for some internal reason
  • price goes up, touches 1000 + 1 tick
  • close order gets activated and sized to position, it’s 0, it gets expired
  • open order eventually fills

 
I had a similar issue in the past and it looks like my present problem is linked to something like this (I mean the simple version).

Is it possible that orders get filled with a lag where there is no sequential execution based on the price? so the price could move, hit some stops and do the fills later?
That would be dramatically bad as it would screw transactions with extra slippage and fees, but it would explain that specific problem.

I am assuming there is a better explanation, but right now I don’t have any other hypothesis.

Has anyone experience with this problem? or is anyone familiar with the execution engine and could comment?

Thanks for your feedback.

To know your question better, it’s important to get more info about how you made the conclusion of the practical behavior.

So I would suggest to collect more data of 1) the order, 2) the market order/ticker info with timestamp. With these, customer support can review your order and help with your concern.

The hypothesis was formulated on two criteria:

  • I had a similar problem in the past, so it’s not all new
  • I ran of other hypothesis.

I’ve talked with 5 agents:

  • #1 - no clue, sent me to #2
  • #2 - no clue, sent me to #3
  • #3 - offered an explanation to try to wrap this up. It didn’t make sense, sent me to #4
  • #4 - argued that events all happened at the same time and it was challenging to go over the fact timestamps are in seconds and a lot can happen in one second… lost cause. So it went into a circle, but then when I explained to him bit by bit, he sent me to #5
  • #5 - took the time to listen and understand the problem, but doesn’t have an answer at this time; that was yesterday.

The whole ordeal took several hours…

In that specific scenario, there was absolutely no reason for the close order to be expired but having a quantity of 0; I went through all options.

I provided support a list of all the socket messages in order as well, but I’m posting it again here (sorted with latest on top):

and here we can see the sequence:

  • line #6, the order starting with O-0 (the matching close is C-0) received a filled notification. so we should have a position
  • line #5, the stop limit close order was expired as its stop got hit (it was one tick away from the O-0 price), and will transform to:
  • line #4, the limit close order is now active
  • line #3, the limit close order gets immediately expired

it’s a reduce only close, so if there is a position I don’t see any reason for it to be expired.

7 support agents have looked at this so far. The last possible explanation made some sense: Mark vs Last price for the stops, until I realized that everything is using the last price.

It’s incredible that Binance is not able to answer what happened on some trades on their own system.