Binance.US today announced the implementation of Self-Trade Prevention (STP). This feature will be enabled starting on January 31, 2023. This change is designed to prevent trades from being executed when they are unintentionally placed and traded by the same user (ie. instances when an API user is both maker and taker on the trade).
Self-trading can occur in two scenarios: the order is traded against the same account OR the order is traded against another account that belongs to the same user.
API users can set up a preferred expiry mode to decide which order to cancel when self-trading happens. To use this feature, view the “selfTradePreventionMode” field on your order placement endpoints and choose one of the following: EXPIRE_TAKER, EXPIRE_MAKER, or EXPIRE_BOTH.
- If user mode is set to EXPIRE_TAKER, the Taker order is canceled.
- If user mode is set to EXPIRE_MAKER, the Maker order is canceled.
- If user mode is set to EXPIRE_BOTH, both Orders are canceled.
Starting on January 31, 2023, the user mode of EXPIRE_MAKER will become the default for all API accounts unless otherwise changed.
To learn more about our self-trading prevention feature, visit the Binance.US API Documentation portal.