> ## Documentation Index
> Fetch the complete documentation index at: https://v3.docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Set market maker protection config

> Creates or fully replaces the market maker protection settings for a subaccount and currency. Accepts an amount limit and delta limit (as decimals) plus the rolling interval and freeze duration in milliseconds; omitted limits default to zero. Requires a trading-scoped session key and echoes the applied configuration back.



## OpenAPI

````yaml /openapi.json post /private/set_mmp_config
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /private/set_mmp_config:
    post:
      tags:
        - Market Maker Protection
      summary: Set market maker protection config
      description: >-
        Creates or fully replaces the market maker protection settings for a
        subaccount and currency. Accepts an amount limit and delta limit (as
        decimals) plus the rolling interval and freeze duration in milliseconds;
        omitted limits default to zero. Requires a trading-scoped session key
        and echoes the applied configuration back.
      operationId: private_set_mmp_config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetMmpConfigRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetMmpConfigResponse'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    SetMmpConfigRequest:
      description: >-
        `mmp_interval` and `mmp_frozen_time` are specified in milliseconds
        (rounded down to the nearest whole second).
      type: object
      required:
        - currency
        - mmp_frozen_time
        - mmp_interval
        - subaccount_id
      properties:
        currency:
          type: string
        mmp_amount_limit:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          default: '0'
          type: string
          format: decimal
        mmp_delta_limit:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          default: '0'
          type: string
          format: decimal
        mmp_frozen_time:
          type: integer
          format: uint64
          minimum: 0
        mmp_interval:
          type: integer
          format: uint64
          minimum: 0
        subaccount_id:
          type: integer
          format: uint64
          minimum: 0
    SetMmpConfigResponse:
      description: 'Echoes the inbound params back: decimal-string limits, ms intervals.'
      type: object
      required:
        - currency
        - mmp_amount_limit
        - mmp_delta_limit
        - mmp_frozen_time
        - mmp_interval
        - subaccount_id
      properties:
        currency:
          type: string
        mmp_amount_limit:
          type: string
        mmp_delta_limit:
          type: string
        mmp_frozen_time:
          type: integer
          format: uint64
          minimum: 0
        mmp_interval:
          type: integer
          format: uint64
          minimum: 0
        subaccount_id:
          type: integer
          format: uint64
          minimum: 0

````

## Related topics

- [Market Maker Protection](/trading/market-maker-protection.md)
- [Get market maker protection config](/api-reference/market-maker-protection/get-market-maker-protection-config.md)
- [Reset market maker protection freeze](/api-reference/market-maker-protection/reset-market-maker-protection-freeze.md)
