Skip to main content

Overview

Self Match Prevention (SMP) is a mechanism that prevents orders from matching with each other when they originate from the same member AND share the same SMP token. SMP helps prevent accidental self-trading and allows for more granular control over order matching behavior. SMP uses three components to control order matching:
SMP mode determines which order is cancelled when a self-match is detected:The SMP mode should be specified for each order. A default SMP mode can be configured via the WebSocket API private/set_self_trading_config method, and users can change their default setting.
Speed-bumped orders always use CANCEL_MAKER on the SBE gateway. When a taker order submitted via the SBE gateway is speed-bumped, the SMP mode is overridden to CANCEL_MAKER regardless of the value in the request. This is consistent with standard market practice for speed-bumped orders.Orders submitted via the WebSocket API may use CANCEL_TAKER regardless of speed-bump state.
Speed-bumped orders always use CANCEL_MAKER on the SBE gateway. When a taker order submitted via the SBE gateway is speed-bumped, the SMP mode is overridden to CANCEL_MAKER regardless of the value in the request. This is consistent with standard market practice for speed-bumped orders.Orders submitted via the WebSocket API may use CANCEL_TAKER regardless of speed-bump state.
SMP Mode Selection: When a self-match is detected, the SMP mode from the aggressing order (the incoming order) will be used to determine which order is cancelled.

Order from different systems

Orders originating from the Websocket API, User Interface or other non-Starbase origin will have the SMP Token set based on the table below. To avoid matching with these orders when utilizing Starbase APIs, the same SMP Tokens should be used.

API Usage

Order Entry Messages

SMP fields are mandatory and must be specified in the following order entry messages:

SMP Cancellation Indicators

When an order is cancelled due to self-match prevention, it will be indicated in the response messages: