做市商保护 API 配置

  • 更新

Deribit 提供了一套用于管理的 API 方法 做市商保护 (MMP) 设置。这些方法允许对MMP参数进行实时配置和监控,从而确保做市商的有效风险管理

[en] Each MMP configuration contains the following key parameters:

  • [en] Quantity Limit – Maximum total traded volume (in base currency) allowed before MMP triggers.

  • [en] Delta Limit – Maximum directional exposure.

  • [en] Vega Limit – (Options only) Maximum change in vega exposure allowed before triggering.

  • [en] Time Interval – Time window (in seconds) over which limits are measured.

  • [en] Frozen Time – Duration (in seconds) for which quoting remains disabled after an MMP trigger.

  • [en] Maximum Quote Quantity (MQQ) – Maximum combined open MMP order size per side, per index.

注意

[en] MMP groups exist but apply only to 批量报价规范. For standard order-based quoting, MMP configuration is defined per index.

[en] All configuration parameters support up to 4 decimal places of precision. Each limit is monitored independently. If any one is breached, all MMP-tagged orders are canceled, and a freeze is applied according configured frozen_time.

有关 MMP 配置和管理的全面详细信息,请参阅 Deribit API 文档

提示

MMP 设置也可以在内部配置 账户设置页面

mmp_settings.png

[en] Understanding Interval vs Frozen Time

[en] These two required parameters serve different roles within the MMP system:

[en] interval – Monitoring Window

[en] The interval defines how long Deribit monitors trading activity after the first trade occurs:

  • [en] It starts after the first trade.

  • [en] If no new trades happen after the interval ends, a new interval begins with the next trade.

  • [en] If trades occur during the interval, it continues uninterrupted.

  • [en] This creates short, rolling windows used to detect potential bursts of exposure or risky trading behavior.

  • [en] All activity inside a single interval is counted toward MMP limits.

  • [en] If set to 0, MMP is removed.

[en] frozen_time – Freeze Duration

[en] The frozen_time defines how long MMP remains triggered and blocking new MMP orders after a limit is breached:

  • [en] During the frozen period, quoting for that index is disabled.

  • [en] After the frozen period ends, MMP resets automatically.

  • [en] Setting frozen_time = 0 disables automatic reset. In this case:

了解最大报价量 (MQQ)

重要

之后将提供最大报价数量 2025 年 11 月 25 日 发布。

最大报价量 (MQQ) 定义每边未平仓MMP报价或订单总量的累积限制, 每种乐器 (订单簿)。它充当曝光上限,即使在交易发生之前也能防止报价量过大

关键概念
  • 每台仪器(订单簿):

    MQQ 已强制执行 对每种乐器都独立,未跨工具或到期日进行汇总。每种工具(订单簿)都有自己单独的 MQQ 限额

  • 累积大小限制,非订单数量:

    MQQ 限制了 总合大小 每边未平仓的 MMP 订单的数量,而不是订单的数量。

    示例:在 MQQ = 3 BTC 的情况下,您可以下三个 1 BTC 的订单,或者一个 2.5 BTC 和一个 0.5 BTC 的订单,只要每边的总和 ≤ 3 BTC。

  • 每个 MMP 群组独立:

    每个 MMP 组(仅用于 批量报价) 有自己的 MQQ 配置。每组的限额分别适用。

  • 与数量限制的关系:

    可以设置 MQQ 大于 quantity_limit

    这允许更大的未平仓报价,同时仍允许MMP在部分成交时触发,并将MMP的预留保证金与数量限制分开。

  • 基础货币执法:

    MQQ 是在中指定和强制执行的 基础货币 乐器的。

  • 尺寸计算:

    • 反向期货: 尺寸 = 金额/价格

    • 反向点差: 规模 = 金额/指数价格

      (切换到 腿部的最低标价 于 2025 年 12 月。)

  • 账户限制:

    期权或期权组合的 MMP 订单和报价是 不支持 适用于 SM 账户。

  • 拒绝和验证:

    • 超过 MMP 的报价或 MMP 订单 max_quote_quantity被拒绝

    • 高于 MQQ 的常规订单仍可能进入市场,但会超过限额的新报价是 未被接受

    • 从2025年12月开始,如果双面报价的一面被拒绝,另一方也将被拒绝。

  • 精度:

    所有 MMP 配置参数,包括 MQQ,最多支持 小数点后四位

  • 利润率计算:

    • 从 2025 年 11 月 18 日发布开始: 预留保证金 = 最大值 (MQQquantity_limit)

    • 从 2025 年 12 月起发布: 预留保证金 = max_quote_quantity (最小起订量的 3%)

    • 此更改将 MMP 保证金逻辑从报价大小限制转移到活跃报价敞口。

  • 延迟:

    MQQ 提供 没有延迟优势 如果你已经在使用 批量报价 功能;它纯粹增加了曝光控制。

[en] Understanding other parameters

[en] index_name

[en] Identifier of the derivative instrument (index) on the Deribit platform, such as btc_usd or eth_usd. All configuration settings will apply specifically to this index.

[en] quantity_limit

[en] The total traded quantity, measured in units of the base currency(e.g., BTC in BTC-PERPETUAL), within the interval.

  • [en] This count is direction-agnostic —a buy followed by a sell counts double.

    [en] Example:Buy 10 BTC and sell 10 BTC = 20 total quantity.

  • [en] Applicable to both options and futures.

    注意

    [en] Once this is set, an initial margin will be reserved even without any open positions. initial_margin = quantity_limit * 0.03

[en] delta_limit

[en] The maximum allowable net transaction delta change during the interval.

  • [en] Expressed in units of base currency.

  • [en] The delta limit is treated as an absolute threshold:

    [en] e.g.,delta_limit: 10 → MMP is triggered if net transaction delta exceeds +10 or drops below -10.

  • [en] Direction matters: buying +5 delta and selling −5 delta cancels out if within the same interval.

    注意

    [en] Note that we use the net transaction delta instead of delta. 

    [en] Net Transaction Delta = Delta - Mark Price. 

    [en] In the rest of this document, "delta" actually refers to net transaction delta

[en] vega_limit

[en] The maximum change in vega exposure allowed within a given interval, measured in absolute terms.

  • [en] Expressed in USD, representing the change in sensitivity to implied volatility across executed trades.

  • [en] This parameter is primarily relevant for options traders managing risk in volatile markets.

  • [en] Similar to delta_limit, the vega_limit is direction-aware and evaluated on a net basis. If the exposure exceeds the set threshold (positively or negatively), MMP will be triggered.

注意

[en] When evaluating Delta and Vega limits for MMP, Deribit uses the greeks at the moment of trade execution. The system does not re-evaluate Delta or Vega using live greeks at the time of MMP checking.

[en] mmp_group

[en] Specifies the MMP group used for Mass Quotes. If omitted, the methods apply to the default MMP settings.

注意

[en] MMP groups are a feature dedicated to Mass Quotes and are not available for regular order flow. For details on how to use MMP groups with Mass Quotes, see 批量报价规范

[en] block_rfq

[en] When set to true, the methods apply to Block RFQ MMP settings. See Deribit Block RFQ API 演练 for more details.

[en] Setting up MMP

[en] To configure Market Maker Protection (MMP) for a specific index, you must define the monitoring window, freeze duration, and at least one exposure limit. MMP configuration is applied using the private/set_mmp_configmethod.

[en] Required parameters 
  • [en] index_name 

    [en] The index for which MMP is being configured (e.g., btc_usd, eth_usd).

  • [en] interval 

    [en] Duration (in seconds) of the monitoring window used to track trading activity.

  • [en] frozen_time 

    [en] Duration (in seconds) that MMP remains active/frozen once triggered.

  • [en] At least one limit parameter 

    [en] You must set at least one of the following:

    • [en] quantity_limit 

    • [en] delta_limit 

    • [en] vega_limit 

    • [en] max_quote_quantity (MQQ)

      小心

      [en] After December 2025 Release, MQQ will be enforced as a required parameter.

[en] Example
[en] {
  "jsonrpc": "2.0",
  "id": 42,
  "method": "private/set_mmp_config",
  "params": {
    "index_name": "btc_usd",
    "interval": 3,
    "frozen_time": 30,
    "quantity_limit": 5.0,
    "delta_limit": 15.0,
    "max_quote_quantity": 2.0
  }
}

[en] Once this configuration is submitted, the system enforces MMP for the selected index based on the configured parameters.

注意

[en] Block RFQ MMP 

[en] MMP can also be configured for Block RFQ quoting. The configuration process for Block RFQ MMP is described in the Deribit Block RFQ API 演练 article.

[en] Resetting MMP

[en] If your MMP protection has been triggered and quoting is frozen for a given index, you can resume quoting either automatically after the configured freeze time or manually via the API using private/reset_mmp.

[en] Behaviour
  • [en] If the configured frozen_time has expired, the system will automatically reset MMP and quoting resumes for that index.

  • [en] If frozen_time is set to 0 (automatic reset disabled), you must call private/reset_mmp to re-enable quoting.

  • [en] You can also perform a manual reset during the frozen period if you want to resume quoting early.

  • [en] After reset, the previous MMP configuration remains unchanged (the limits, interval, etc. stay in effect).

[en] Placing orders with MMP flag

[en] Clients can control whether individual limit orders are subject to Market Maker Protection by setting the mmp flag in buy, sell, or edit requests.

  • [en] To enable or disable MMP for a specific order, include "mmp": true or "mmp": false in the request.

  • [en] If you’re only updating price or size and wish to retain the current MMP setting, you can simply omit the mmp parameter—its state will remain unchanged.

  • [en] The edit method supports toggling the MMP flag, allowing you to apply or remove protection without canceling and resubmitting the order.

[en] Monitoring MMP

[en] You can monitor both the current configuration and the live MMP state for any index using two API methods.

[en] 1. Checking the Current MMP Configuration 

[en] Calling private/get_mmp_config returns all currently active MMP parameters for the selected index, including the interval, frozen_time, quantity/delta/vega limits, and max_quote_quantity. This is useful for verifying your configuration or confirming applied updates.

[en] 2. Checking the Current MMP Status 

[en] Calling private/get_mmp_status returns the live MMP state for the index, including:

  • [en] Whether MMP is enabled or triggered

  • [en] Remaining frozen time (if triggered)

  • [en] Whether quoting is currently allowed

  • [en] Any active freeze conditions

[en] This method lets you track whether protection is active and when quoting will resume.

MMP 事件和通知

Deribit 通过以下方式提供有关 MMP(做市商保护)活动的实时反馈 user.mmp_trigger。{索引_名称 订阅 和事件标志,使客户端能够在触发保护时迅速做出反应。

客户可以 订阅 到频道:

user.mmp_trigger。{索引_名称

将 {index_name} 替换为所需的乐器索引,例如:

user.mmp_trigger.btc

为给定索引触发 MMP 后,客户端将收到 触发通知 采用以下格式:

{“frozen_until”:1594390902986}
  • 该值是 Unix 时间戳(以毫秒为单位) 表示直到 MMP 处于活动状态(即订单仍处于封锁状态)。

  • 如果 frozen_until: 0,这意味着 MMP 将保持活跃状态 直到手动重置 使用 private/reset_mmp 方法。

此通知允许客户跟踪 每个索引的 MMP 状态 并避免提交因持续冻结小批量生产商而被拒绝的新订单。

WebSocket 响应中的 MMP 标志

除了事件频道外,Deribit 还使用中的特殊字段传达与 MMP 触发器相关的操作 订购事件消息

如果订单被取消 作为 MMP 触发器的直接结果,订单活动将包括:

{“mmp_cancelled”:真的}

该字段将是 缺席 在所有其他情况下,允许客户明确区分与 MMP 相关的取消和其他原因(例如手动、超时、用户 API)。

最佳实践
  • 同时监视两者 user.mmp_trigger 活动和 mmp_cancelled 标记,以全面了解您的报价活动和保护状态。

  • 在收到一封信时 frozen_until 时间戳,你应该 暂停报价提交 在冻结期结束或手动重置 MMP 之前,对受影响的索引进行保存。

  • 务必处理 mmp_cancelled 在订单管理逻辑中明确标记,以防止重新提交可能立即再次取消的订单。

修复配置

请在此处查看 FIX 规格: https://docs.deribit.com/#mmprotection-limits-mm