Self Trade Prevention
Defx's self trade prevention mechanism prevents traders from matching their own orders on the order book, thereby ensuring that trading activities reflect genuine market interest rather than manipulated volumes.
There are three possible actions that Defx can take if an order could create a self-trade
EXPIRE_TAKER
- This mode prevents a trade by immediately expiring the taker order's quantity.
EXPIRE_MAKER
- This mode prevents a trade by immediately expiring the potential maker order's quantity.
EXPIRE_BOTH
- This mode prevents a trade by immediately expiring both the taker and the potential maker orders' quantities.
The STP event will occur depending on the STP mode of the taker order.
Please note: These parameters are passed as part of the Create Order API. While making a Create Order request, if you do not explicitly pass a value for stp as part of the request being made, Defx assigns a default stp mode to be EXPIRE_TAKER
Last updated