Self trading prevention and partially filled order

Hello,

I wonder what happens if i place order with selfTradePreventionMode set as EXPIRE_TAKER (BUY 1 ETH) on order book like this:

  • first order: sell 0,5 eth for 2k eur → someone else’s offer
  • first order: sell 0,5 eth for 2.1k eur → my offer

Does it end with EXPIRED_IN_MATCH with filled 0,5 eth or EXPIRED_IN_MATCH with no eth filled? I tried to test it, but it is difficult because usually the first order in order book is quite huge and I would have to buy it :confused:

EXPIRE_TAKER means that if you place an order that matches an existing order in the order book that’s from yourself, it’ll expire the order you’re placing to prevent self trading.
If “Someone else’s offer” matches your existing order in the order book first, then your order in the order book is filled. This is unrelated with selfTradePreventionMode.

There’s a Spot Testnet ( https://testnet.binance.vision/ ) where you can test this scenarios.