The anatomy of an order execution

I’m noticing highly variable execution latencies for USDM ranging anywhere from 10ms to 1000ms when placing a limit order for immediate execution. In the spot market, I’m seeing stable execution latencies around 10-12ms. While execution latencies up to 1000ms may be “good enough” for some users, as a large high frequency market taker these latencies prevent me from contributing back to the Binance ecosystem. I’m guessing that the intense variability is coming from some process in USDM futures that my spot requests aren’t running into (i.e. a margin check).

I was wondering if anyone could shed some clarity or resources on what happens when Binance receives my USDM order-

  1. does it get passed through a margin check? If so, are there any programs offered to alleviate the need for a margin check? Is there any way to get clarity on what the margin check entails on the Binance side? Any tips on how to minimize variability induced by this?
  2. How does my taker order get prioritized for matching with a maker order? Is it based on arrival time of my order?
  3. Do Post-Only orders run into a margin check?

we don’t have information we can share on the internal process to answer your question 1 and 3, but for question 2, it’s based on FIFO algorithm, so there’s no prioritisation.