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. On request, Deribit can extend SMP across all Members of the same main account; see SMP across Members. 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.
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.

Orders 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.

SMP across Members

By default, SMP never triggers between Members, even when they belong to the same main account. On request, Deribit can extend SMP across all Members of a main account. This is mainly relevant to accounts with several Members, such as brokers with multi-Member access. The setting applies to the main account and all of its subaccounts. Only Deribit can change it; private/set_self_trading_config leaves it unchanged. When the setting is enabled:
  • Self-match prevention enabled on the account: the SBE gateway sets the SMP token of every order and mass quote to the main portfolio id, ignoring selfMatchPreventionId in the request. Orders submitted via the WebSocket API, FIX API or UI carry the same token. Orders from any Member under the main account do not match each other.
  • Self-matching allowed on the account: SMP stays opt-in. Orders with the same non-null SMP token do not match each other across all Members of the main account.
The SMP mode of the aggressing order still decides which order is cancelled. While self-match prevention is enabled, private/get_account_summary called with extended set to true returns self_trading_extended_across_members: true when the setting is on.

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: