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
- SMP Token
- Member
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.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, ignoringselfMatchPreventionIdin 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.
private/get_account_summary called with extended set to true returns self_trading_extended_across_members: true when the setting is on.