openapi: 3.0.0 info: title: Deribit Account Management Matching Engine API version: 2.1.1 servers: - url: https://test.deribit.com/api/v2 tags: - name: Matching Engine paths: /private/simulate_block_trade: get: parameters: - in: query name: role required: false schema: $ref: '#/components/schemas/role' description: Describes if user wants to be maker or taker of trades - in: query name: trades required: true schema: type: array items: type: object properties: instrument_name: $ref: '#/components/schemas/instrument_name' description: Instrument name price: type: number description: Price for trade amount: $ref: '#/components/schemas/amount' description: It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. direction: $ref: '#/components/schemas/direction' description: Direction of trade from the maker perspective description: List of trades for block trade style: form explode: true responses: '200': $ref: '#/components/responses/PrivateSimulateBlockTradeResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 1 method: private/simulate_block_trade params: role: maker trades: - instrument_name: BTC-PERPETUAL direction: buy price: 11624 amount: 40 - instrument_name: BTC-9AUG19-10250-P direction: buy amount: 1.2 price: 0.0707 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Checks if a block trade can be executed without actually executing it. Use this method to verify that a block trade will succeed before proceeding with the actual execution. **π Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api) **Scope:** `block_trade:read` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fsimulate_block_trade) ' x-mint: metadata: title: private/simulate_block_trade og:title: private/simulate_block_trade keywords: - private/simulate_block_trade - role - trades href: /api-reference/block-trade/private-simulate_block_trade /private/verify_block_trade: get: parameters: - in: query name: timestamp required: true schema: $ref: '#/components/schemas/timestamp' description: Timestamp, shared with other party (milliseconds since the UNIX epoch) - in: query name: nonce required: true schema: $ref: '#/components/schemas/nonce' description: Nonce, shared with other party - in: query name: role required: true schema: $ref: '#/components/schemas/role' description: Describes if user wants to be maker or taker of trades - in: query name: trades required: true schema: type: array items: type: object properties: instrument_name: $ref: '#/components/schemas/instrument_name' description: Instrument name price: type: number description: Price for trade amount: $ref: '#/components/schemas/amount' description: It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. direction: $ref: '#/components/schemas/direction' description: Direction of trade from the maker perspective description: List of trades for block trade style: form explode: true responses: '200': $ref: '#/components/responses/PrivateVerifyBlockTradeResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 1 method: private/verify_block_trade params: nonce: okpdjkdo timestamp: 1565172650935 role: maker trades: - instrument_name: BTC-PERPETUAL direction: buy price: 11624 amount: 40 - instrument_name: BTC-9AUG19-10250-P direction: buy amount: 1.2 price: 0.0707 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Verifies and creates a block trade signature. This is the first step in the block trade workflow - the first party calls this method to generate a signature that must be shared with the second party. **Note:** In the API, the `direction` field is always expressed from the maker''s perspective. This means that when you accept a block trade as a taker, the direction shown in the API represents the opposite side of your trade. For example, if you are buying puts as a taker, the API will show the operation as a "sell put" (maker''s perspective), and you will be verifying and accepting a "sell put" block trade. **π Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api) **Scope:** `block_trade:read` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fverify_block_trade) ' x-mint: metadata: title: private/verify_block_trade og:title: private/verify_block_trade keywords: - private/verify_block_trade - timestamp - nonce - role - trades - signature href: /api-reference/block-trade/private-verify_block_trade /private/execute_block_trade: get: parameters: - in: query name: timestamp required: true schema: $ref: '#/components/schemas/timestamp' description: Timestamp, shared with other party (milliseconds since the UNIX epoch) - in: query name: nonce required: true schema: $ref: '#/components/schemas/nonce' description: Nonce, shared with other party - in: query name: role required: true schema: $ref: '#/components/schemas/role' description: Describes if user wants to be maker or taker of trades - in: query name: trades required: true schema: type: array items: type: object properties: instrument_name: $ref: '#/components/schemas/instrument_name' description: Instrument name price: type: number description: Price for trade amount: $ref: '#/components/schemas/amount' description: It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. direction: $ref: '#/components/schemas/direction' description: Direction of trade from the maker perspective description: List of trades for block trade style: form explode: true - in: query name: counterparty_signature required: true schema: $ref: '#/components/schemas/block_trade_signature' description: Signature of block trade generated by `private/verify_block_trade_method` responses: '200': $ref: '#/components/responses/PrivateGetBlockTradeResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 1 method: private/execute_block_trade params: nonce: bszyprbq timestamp: 1590485535899 role: maker trades: - instrument_name: BTC-PERPETUAL direction: sell price: 8900 amount: 200000 - instrument_name: BTC-28MAY20-9000-C direction: sell amount: 5 price: 0.0133 counterparty_signature: 1590485595899.1Mn52L_Q.lNyNBzXXo-_QBT_wDuMgnhA7uS9tBqdQ5TLN6rxbuoAiQhyaJYGJrm5IV_9enp9niY_x8D60AJLm3yEKPUY1Dv3T0TW0n5-ADPpJF7Fpj0eVDZpZ6QCdX8snBWrSJ0TtqevnO64RCBlN1dIm2T70PP9dlhiqPDAUYI4fpB1vLYI description: JSON-RPC Request Example description: JSON-RPC request body description: 'Executes a block trade. This is the second step in the block trade workflow - the second party calls this method with the signature received from the first party to execute the trade. The whole request must be exactly the same as in [private/verify_block_trade](https://docs.deribit.com/api-reference/block-trade/private-verify_block_trade), only the `role` field should be set appropriately - this means that both sides have to agree on the same `timestamp`, `nonce`, and `trades` fields, and the server will ensure that the `role` field is different between sides (each party accepts their own role). Using the same `timestamp` and `nonce` by both sides in [private/verify_block_trade](https://docs.deribit.com/api-reference/block-trade/private-verify_block_trade) ensures that even if unintentionally both sides execute the given block trade with a valid `counterparty_signature`, the block trade will be executed only once. **Note:** In the API, the `direction` field is always expressed from the maker''s perspective. This means that when you accept a block trade as a taker, the direction shown in the API represents the opposite side of your trade. For example, if you are buying puts as a taker, the API will show the operation as a "sell put" (maker''s perspective), and you will be verifying and accepting a "sell put" block trade. **π Related Article:** [Block Trading](https://docs.deribit.com/articles/block-trading-api) **Scope:** `block_trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fexecute_block_trade) ' x-mint: metadata: title: private/execute_block_trade og:title: private/execute_block_trade keywords: - private/execute_block_trade - timestamp - nonce - role - trades - counterparty_signature - app_name - broker_code - broker_name - trade_id - trade_seq - instrument_name - order_type - advanced - order_id - matching_id - direction - tick_direction - index_price - price - amount - contracts - iv - underlying_price - liquidation - liquidity - fee - fee_currency - label - state - block_trade_id - block_rfq_id - block_rfq_quote_id - reduce_only - post_only - mmp - risk_reducing - api - profit_loss - mark_price - legs - combo_id - combo_trade_id - quote_set_id - quote_id - trade_allocations - user_id - client_info - client_id - client_link_id - name href: /api-reference/block-trade/private-execute_block_trade /private/create_combo: get: parameters: - in: query name: trades required: true schema: type: array items: type: object properties: instrument_name: $ref: '#/components/schemas/instrument_name' amount: $ref: '#/components/schemas/amount' direction: $ref: '#/components/schemas/direction' description: List of trades used to create a combo style: form explode: true responses: '200': $ref: '#/components/responses/PrivateCreateComboResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 6 method: private/create_combo params: trades: - instrument_name: BTC-29APR22-37500-C amount: '1' direction: buy - instrument_name: BTC-29APR22-37500-P amount: '1' direction: sell description: JSON-RPC Request Example description: JSON-RPC request body description: 'Verifies and creates a combo book or returns an existing combo matching the given trades. Combos allow trading on multiple instruments (futures and options) simultaneously as a single strategy. If a combo matching the provided trades already exists, this method returns the existing combo. Otherwise, it creates a new combo book with the specified leg structure. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcreate_combo) ' x-mint: metadata: title: private/create_combo og:title: private/create_combo keywords: - private/create_combo - trades - instrument_id - state - state_timestamp - creation_timestamp - legs - instrument_name - amount href: /api-reference/combo-books/private-create_combo /private/cancel_all: get: parameters: - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 8748 method: private/cancel_all params: {} description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all open orders and trigger orders for the authenticated account across all currencies and instrument kinds. This is a bulk cancellation operation useful for quickly clearing all active orders. Use the `detailed` parameter to receive a list of all cancelled orders. The `freeze_quotes` parameter can be used to freeze quotes instead of cancelling them. **Note:** This operation cannot be undone. All open orders will be permanently cancelled. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all) ' x-mint: metadata: title: private/cancel_all og:title: private/cancel_all keywords: - private/cancel_all - detailed - freeze_quotes href: /api-reference/trading/private-cancel_all /private/cancel_all_by_instrument: get: parameters: - name: instrument_name required: true in: query schema: $ref: '#/components/schemas/instrument_name' description: Instrument name - name: type required: false in: query schema: $ref: '#/components/schemas/simple_order_type' description: Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all` - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: include_combos required: false in: query schema: type: boolean description: 'When set to `true` orders in combo instruments affecting a given position will also be cancelled. Default: `false`' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 4122 method: private/cancel_all_by_instrument params: instrument_name: ETH-22FEB19-120-P type: all description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all open orders for a specific instrument. This is useful for quickly clearing all orders for a single instrument. Orders can be optionally filtered by order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders. The `include_combos` parameter can be used to include combo orders in the cancellation. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_instrument) ' x-mint: metadata: title: private/cancel_all_by_instrument og:title: private/cancel_all_by_instrument keywords: - private/cancel_all_by_instrument - instrument_name - type - detailed - include_combos - freeze_quotes href: /api-reference/trading/private-cancel_all_by_instrument /private/cancel_all_by_currency: get: parameters: - name: currency required: true in: query schema: $ref: '#/components/schemas/currency' description: The currency symbol - name: kind required: false in: query schema: $ref: '#/components/schemas/kind_with_combo_all' description: Instrument kind, `"combo"` for any combo or `"any"` for all. If not provided instruments of all kinds are considered - name: type required: false in: query schema: $ref: '#/components/schemas/simple_order_type' description: Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all` - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 5663 method: private/cancel_all_by_currency params: currency: BTC kind: option description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all open orders for a specific currency. This is useful for quickly clearing all orders across multiple instruments in a currency. Orders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_currency) ' x-mint: metadata: title: private/cancel_all_by_currency og:title: private/cancel_all_by_currency keywords: - private/cancel_all_by_currency - currency - kind - type - detailed - freeze_quotes href: /api-reference/trading/private-cancel_all_by_currency /private/cancel_all_by_currency_pair: get: parameters: - name: currency_pair required: true in: query schema: $ref: '#/components/schemas/index_name' description: The currency pair symbol - name: kind required: false in: query schema: $ref: '#/components/schemas/kind_with_combo_all' description: Instrument kind, `"combo"` for any combo or `"any"` for all. If not provided instruments of all kinds are considered - name: type required: false in: query schema: $ref: '#/components/schemas/simple_order_type' description: Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all` - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 5663 method: private/cancel_all_by_currency_pair params: currency_pair: BTC_USD kind: option description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all open orders for a specific currency pair. This is useful for quickly clearing all orders across instruments in a currency pair. Orders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_currency_pair) ' x-mint: metadata: title: private/cancel_all_by_currency_pair og:title: private/cancel_all_by_currency_pair keywords: - private/cancel_all_by_currency_pair - currency_pair - kind - type - detailed - freeze_quotes href: /api-reference/trading/private-cancel_all_by_currency_pair /private/cancel_all_by_kind_or_type: get: parameters: - name: currency required: true in: query schema: $ref: '#/components/schemas/currency_with_any_and_list' description: The currency symbol, list of currency symbols or `"any"` for all - name: kind required: false in: query schema: $ref: '#/components/schemas/kind_with_combo_all' description: Instrument kind, `"combo"` for any combo or `"any"` for all. If not provided instruments of all kinds are considered - name: type required: false in: query schema: $ref: '#/components/schemas/simple_order_type' description: Order type - `limit`, `stop`, `take`, `trigger_all` or `all`, default - `all` - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 2 method: private/cancel_all_by_kind_or_type params: currency: - BTC - ETH kind: future description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all open orders in one or more currencies, optionally filtered by instrument kind and/or order type. This provides flexible bulk cancellation across multiple currencies. Specify one or more currencies, and optionally filter by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the `detailed` parameter to receive a list of all cancelled orders. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_all_by_kind_or_type) ' x-mint: metadata: title: private/cancel_all_by_kind_or_type og:title: private/cancel_all_by_kind_or_type keywords: - private/cancel_all_by_kind_or_type - currency - kind - type - detailed - freeze_quotes href: /api-reference/trading/private-cancel_all_by_kind_or_type /private/cancel_by_label: get: parameters: - name: label in: query schema: type: string required: true description: user defined label for the order (maximum 64 characters) - in: query name: currency required: false schema: $ref: '#/components/schemas/currency' description: The currency symbol responses: '200': $ref: '#/components/responses/PrivateCancelAllResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 47 method: private/cancel_by_label params: label: label description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels all orders (including trigger orders) that have a specific label. This is useful for managing groups of related orders that share the same label. Orders can be cancelled across all currencies or filtered to a specific currency. When cancelling by currency, the currency queue is used for processing. **Rate Limits:** When called without the `currency` parameter, this method is subject to `cancel_all` rate limits. Different rate limit values may apply for per-currency cancels versus calls without providing the currency parameter. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_by_label) ' x-mint: metadata: title: private/cancel_by_label og:title: private/cancel_by_label keywords: - private/cancel_by_label - label - currency href: /api-reference/trading/private-cancel_by_label /private/cancel_quotes: get: parameters: - name: detailed required: false in: query schema: type: boolean description: 'When `detailed` is set to `true`, the output format is changed to include a list of all cancelled orders. **π Related Article:** [Detailed Response for Cancel Methods](https://docs.deribit.com/articles/json-rpc-overview#detailed-response-for-cancel-methods) Default: `false` ' - name: freeze_quotes required: false in: query schema: type: boolean description: Whether or not to reject incoming quotes for 1 second after cancelling (`false` by default). Related to `private/mass_quote` request. - name: cancel_type in: query schema: enum: - delta - quote_set_id - instrument - instrument_kind - currency - currency_pair - all type: string example: delta required: true description: Type of cancel criteria. - name: min_delta in: query schema: type: number example: 0.4 required: false description: 'Min delta to cancel by delta (for `cancel_type`: `delta`).' - name: max_delta in: query schema: type: number example: 0.6 required: false description: 'Max delta to cancel by delta (for `cancel_type`: `delta`).' - name: quote_set_id in: query schema: type: string required: false description: Unique identifier for the Quote set. - name: instrument_name in: query schema: type: string required: false description: Instrument name. - name: kind required: false in: query schema: $ref: '#/components/schemas/kind_with_combo_all' description: Instrument kind, `"combo"` for any combo or `"any"` for all. If not provided instruments of all kinds are considered - name: currency required: true in: query schema: $ref: '#/components/schemas/currency' description: The currency symbol - name: currency_pair required: true in: query schema: $ref: '#/components/schemas/index_name' description: The currency pair symbol responses: '200': $ref: '#/components/responses/PrivateCancelQuotesResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 5663 method: private/cancel_quotes params: cancel_type: delta min_delta: 0.4 max_delta: 0.6 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels quotes (mass quote orders) based on various criteria. This method provides flexible options for cancelling quotes: - `delta`: Cancels quotes within a delta range defined by `min_delta` and `max_delta` - `quote_set_id`: Cancels quotes by a specific Quote Set identifier - `instrument`: Cancels all quotes associated with a particular instrument - `kind`: Cancels all quotes for a certain instrument kind - `currency`: Cancels all quotes in a specified currency - `currency_pair`: Cancels all quotes in a specified currency pair - `all`: Cancels all quotes Use the `detailed` parameter to receive a list of all cancelled quotes. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel_quotes) ' x-mint: metadata: title: private/cancel_quotes og:title: private/cancel_quotes keywords: - private/cancel_quotes - detailed - freeze_quotes - cancel_type - min_delta - max_delta - quote_set_id - instrument_name - kind - currency - currency_pair href: /api-reference/trading/private-cancel_quotes /private/cancel: get: parameters: - in: query name: order_id required: true schema: $ref: '#/components/schemas/order_id' description: The order id responses: '200': $ref: '#/components/responses/PrivateCancelResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 4214 method: private/cancel params: order_id: ETH-SLIS-12 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Cancels a specific order identified by its order ID. The order must be open (not yet filled or cancelled) to be cancelled successfully. Once cancelled, the order is removed from the order book and cannot be restored. Any unfilled portion of the order will be cancelled. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fcancel) ' x-mint: metadata: title: private/cancel og:title: private/cancel keywords: - private/cancel - order_id - order_state - order_type - original_order_type - time_in_force - is_rebalance - is_liquidation - instrument_name - creation_timestamp - last_update_timestamp - direction - price - label - post_only - reject_post_only - reduce_only - api - web - mobile - refresh_amount - display_amount - amount - contracts - filled_amount - average_price - advanced - implv - usd - triggered - trigger - trigger_price - trigger_offset - trigger_reference_price - block_trade - mmp - risk_reducing - replaced - auto_replaced - quote - mmp_group - quote_set_id - quote_id - trigger_order_id - app_name - mmp_cancelled - cancel_reason - oto_order_ids - trigger_fill_condition - oco_ref - primary_order_id - is_secondary_oto - is_primary_otoco href: /api-reference/trading/private-cancel /private/buy: get: tags: - Matching Engine parameters: - name: instrument_name required: true in: query schema: $ref: '#/components/schemas/instrument_name' description: Instrument name - name: amount in: query schema: type: number required: false description: It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned. - name: contracts in: query schema: type: number required: false description: It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned. - name: type in: query schema: type: string enum: - limit - stop_limit - take_limit - market - stop_market - take_market - market_limit - trailing_stop required: false description: 'The order type, default: `"limit"`' - name: label in: query schema: type: string required: false description: user defined label for the order (maximum 64 characters) - name: price in: query schema: type: number required: false description:
The order price in base currency (Only for limit and stop_limit orders)
When adding an order with advanced=usd, the field price should be the option price value in USD.
When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
- name: time_in_force in: query schema: type: string default: good_til_cancelled enum: - good_til_cancelled - good_til_day - fill_or_kill - immediate_or_cancel required: false description:Specifies how long the order remains in effect. Default `"good_til_cancelled"`
If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread.
Only valid in combination with time_in_force=`"good_til_cancelled"`
- name: reject_post_only in: query schema: type: boolean default: false required: false description:If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.
Only valid in combination with `"post_only"` set to true
- name: reduce_only in: query schema: type: boolean default: false required: false description: If `true`, the order is considered reduce-only which is intended to only reduce a current position - name: trigger_price in: query schema: type: number required: false description: Trigger price, required for trigger orders only (Stop-loss or Take-profit orders) - name: trigger_offset in: query schema: type: number required: false description: The maximum deviation from the price peak beyond which the order will be triggered - name: trigger in: query schema: $ref: '#/components/schemas/trigger' required: false description: Defines the trigger type. Required for `"Stop-Loss"`, `"Take-Profit"` and `"Trailing"` trigger orders - name: advanced in: query schema: $ref: '#/components/schemas/advanced' required: false description: Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.) - name: mmp in: query schema: type: boolean default: false required: false description: Order MMP flag, only for order_type 'limit' - name: valid_until in: query schema: type: integer required: false description: Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time. - name: linked_order_type in: query schema: type: string enum: - one_triggers_other - one_cancels_other - one_triggers_one_cancels_other required: false description:The type of the linked order.
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
The order price in base currency (Only for limit and stop_limit orders)
When adding an order with advanced=usd, the field price should be the option price value in USD.
When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
- name: time_in_force in: query schema: type: string default: good_til_cancelled enum: - good_til_cancelled - good_til_day - fill_or_kill - immediate_or_cancel required: false description:Specifies how long the order remains in effect. Default `"good_til_cancelled"`
If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just above the spread.
Only valid in combination with time_in_force=`"good_til_cancelled"`
- name: reject_post_only in: query schema: type: boolean default: false required: false description:If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.
Only valid in combination with `"post_only"` set to true
- name: reduce_only in: query schema: type: boolean default: false required: false description: If `true`, the order is considered reduce-only which is intended to only reduce a current position - name: trigger_price in: query schema: type: number required: false description: Trigger price, required for trigger orders only (Stop-loss or Take-profit orders) - name: trigger_offset in: query schema: type: number required: false description: The maximum deviation from the price peak beyond which the order will be triggered - name: trigger in: query schema: $ref: '#/components/schemas/trigger' required: false description: Defines the trigger type. Required for `"Stop-Loss"`, `"Take-Profit"` and `"Trailing"` trigger orders - name: advanced in: query schema: $ref: '#/components/schemas/advanced' required: false description: Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.) - name: mmp in: query schema: type: boolean default: false required: false description: Order MMP flag, only for order_type 'limit' - name: valid_until in: query schema: type: integer required: false description: Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time. - name: linked_order_type in: query schema: type: string enum: - one_triggers_other - one_cancels_other - one_triggers_one_cancels_other required: false description:The type of the linked order.
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
The order price in base currency.
When editing an option order with advanced=usd, the field price should be the option price value in USD.
When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
- name: post_only in: query schema: type: boolean default: true required: false description:If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).
Only valid in combination with time_in_force=`"good_til_cancelled"`
- name: reduce_only in: query schema: type: boolean default: false required: false description: If `true`, the order is considered reduce-only which is intended to only reduce a current position - name: reject_post_only in: query schema: type: boolean default: false required: false description:If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.
Only valid in combination with `"post_only"` set to true
- name: advanced in: query schema: $ref: '#/components/schemas/advanced' required: false description: Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options) - name: trigger_price in: query schema: type: number required: false description: Trigger price, required for trigger orders only (Stop-loss or Take-profit orders) - name: trigger_offset in: query schema: type: number required: false description: The maximum deviation from the price peak beyond which the order will be triggered - name: mmp in: query schema: type: boolean default: false required: false description: Order MMP flag, only for order_type 'limit' - name: valid_until in: query schema: type: integer required: false description: Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time. - name: display_amount in: query schema: type: number default: 1 required: false description: Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well. responses: '200': $ref: '#/components/responses/PrivateEditResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 3725 method: private/edit params: order_id: '438994' amount: 4 price: 222 advanced: implv description: JSON-RPC Request Example description: JSON-RPC request body description: 'Modifies an existing order by changing its price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type. The order is identified by its order ID. Only open orders can be edited. Changes take effect immediately and may result in the order being filled if the new price matches the market. **π Related Article:** [Order Management Best Practices](https://docs.deribit.com/articles/order-management-best-practices) **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit) ' x-mint: metadata: title: private/edit og:title: private/edit keywords: - private/edit - order_id - amount - contracts - price - post_only - reduce_only - reject_post_only - advanced - trigger_price - trigger_offset - mmp - valid_until - display_amount - order - trades - order_state - order_type - original_order_type - time_in_force - is_rebalance - is_liquidation - instrument_name - creation_timestamp - last_update_timestamp - direction - label - api - web - mobile - refresh_amount - filled_amount - average_price - implv - usd - triggered - trigger - trigger_reference_price - block_trade - risk_reducing - replaced - auto_replaced - quote - mmp_group - quote_set_id - quote_id - trigger_order_id - app_name - mmp_cancelled - cancel_reason - oto_order_ids - trigger_fill_condition - oco_ref - primary_order_id - is_secondary_oto - is_primary_otoco - trade_id - trade_seq - timestamp - matching_id - tick_direction - index_price - iv - underlying_price - liquidation - liquidity - fee - fee_currency - state - block_trade_id - block_rfq_id - block_rfq_quote_id - profit_loss - mark_price - legs - combo_id - combo_trade_id - trade_allocations - user_id - client_info - client_id - client_link_id - name href: /api-reference/trading/private-edit /private/edit_by_label: get: parameters: - name: label in: query schema: type: string required: false description: user defined label for the order (maximum 64 characters) - name: instrument_name required: true in: query schema: $ref: '#/components/schemas/instrument_name' description: Instrument name - name: amount in: query schema: type: number required: false description: It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The `amount` is a mandatory parameter if `contracts` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned. - name: contracts in: query schema: type: number required: false description: It represents the requested order size in contract units and can be passed instead of `amount`. The `contracts` is a mandatory parameter if `amount` parameter is missing. If both `contracts` and `amount` parameter are passed they must match each other otherwise error is returned. - name: price in: query schema: type: number required: false description:The order price in base currency.
When editing an option order with advanced=usd, the field price should be the option price value in USD.
When editing an option order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
- name: post_only in: query schema: type: boolean default: true required: false description:If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below or above the spread (accordingly to the original order type).
Only valid in combination with time_in_force=`"good_til_cancelled"`
- name: reduce_only in: query schema: type: boolean default: false required: false description: If `true`, the order is considered reduce-only which is intended to only reduce a current position - name: reject_post_only in: query schema: type: boolean default: false required: false description:If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.
Only valid in combination with `"post_only"` set to true
- name: advanced in: query schema: $ref: '#/components/schemas/advanced' required: false description: Advanced option order type. If you have posted an advanced option order, it is necessary to re-supply this parameter when editing it (Only for options) - name: trigger_price in: query schema: type: number required: false description: Trigger price, required for trigger orders only (Stop-loss or Take-profit orders) - name: mmp in: query schema: type: boolean default: false required: false description: Order MMP flag, only for order_type 'limit' - name: valid_until in: query schema: type: integer required: false description: Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time. responses: '200': $ref: '#/components/responses/PrivateEditResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 9 method: private/edit_by_label params: instrument_name: BTC-PERPETUAL label: i_love_deribit amount: 150 price: 50111 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Modifies an order identified by its label. This method works only when there is exactly one open order with the specified label. You can change the order''s price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type. Changes take effect immediately. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fedit_by_label) ' x-mint: metadata: title: private/edit_by_label og:title: private/edit_by_label keywords: - private/edit_by_label - label - instrument_name - amount - contracts - price - post_only - reduce_only - reject_post_only - advanced - trigger_price - mmp - valid_until - order - trades - order_id - order_state - order_type - original_order_type - time_in_force - is_rebalance - is_liquidation - creation_timestamp - last_update_timestamp - direction - api - web - mobile - refresh_amount - display_amount - filled_amount - average_price - implv - usd - triggered - trigger - trigger_offset - trigger_reference_price - block_trade - risk_reducing - replaced - auto_replaced - quote - mmp_group - quote_set_id - quote_id - trigger_order_id - app_name - mmp_cancelled - cancel_reason - oto_order_ids - trigger_fill_condition - oco_ref - primary_order_id - is_secondary_oto - is_primary_otoco - trade_id - trade_seq - timestamp - matching_id - tick_direction - index_price - iv - underlying_price - liquidation - liquidity - fee - fee_currency - state - block_trade_id - block_rfq_id - block_rfq_quote_id - profit_loss - mark_price - legs - combo_id - combo_trade_id - trade_allocations - user_id - client_info - client_id - client_link_id - name href: /api-reference/trading/private-edit_by_label /private/close_position: get: tags: - Matching Engine parameters: - name: instrument_name required: true in: query schema: $ref: '#/components/schemas/instrument_name' description: Instrument name - name: type in: query schema: type: string enum: - limit - market required: true description: The order type - name: price in: query schema: type: number required: false description: Optional price for limit order. responses: '200': $ref: '#/components/responses/PrivateBuyAndSellResponse' requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 6130 method: private/close_position params: instrument_name: ETH-PERPETUAL type: limit price: 145.17 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position. **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fclose_position) ' x-mint: metadata: title: private/close_position og:title: private/close_position keywords: - private/close_position - instrument_name - type - price - order - trades - order_id - order_state - order_type - original_order_type - time_in_force - is_rebalance - is_liquidation - creation_timestamp - last_update_timestamp - direction - label - post_only - reject_post_only - reduce_only - api - web - mobile - refresh_amount - display_amount - amount - contracts - filled_amount - average_price - advanced - implv - usd - triggered - trigger - trigger_price - trigger_offset - trigger_reference_price - block_trade - mmp - risk_reducing - replaced - auto_replaced - quote - mmp_group - quote_set_id - quote_id - trigger_order_id - app_name - mmp_cancelled - cancel_reason - oto_order_ids - trigger_fill_condition - oco_ref - primary_order_id - is_secondary_oto - is_primary_otoco - trade_id - trade_seq - timestamp - matching_id - tick_direction - index_price - iv - underlying_price - liquidation - liquidity - fee - fee_currency - state - block_trade_id - block_rfq_id - block_rfq_quote_id - profit_loss - mark_price - legs - combo_id - combo_trade_id - trade_allocations - user_id - client_info - client_id - client_link_id - name href: /api-reference/trading/private-close_position /private/get_mmp_config: get: tags: - Matching Engine parameters: - name: index_name required: false in: query schema: $ref: '#/components/schemas/index_name_derivative' description: Index identifier of derivative instrument on the platform; skipping this parameter will return all configurations - name: mmp_group required: false in: query schema: type: string example: MassQuoteBot7 description: 'Specifies the MMP group for which the configuration is being retrieved. MMP groups are used for Mass Quotes. If MMP group is not provided, the method returns the configuration for the MMP settings for regular orders. The `index_name` must be specified before using this parameter. **Note:** Leaving `mmp_group` empty is explicitly allowed and is the correct way to retrieve configuration for the orders MMP group. It is not an error or an incomplete request β omitting this field intentionally targets the default orders MMP group rather than any named mass quote group. **π Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications) ' - name: block_rfq required: false in: query schema: type: boolean default: false description: 'If true, retrieves MMP configuration for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings. ' responses: '200': $ref: '#/components/responses/PrivateGetMmpConfigResponse' requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 7859 method: private/get_mmp_config params: index_name: btc_usd mmp_group: MassQuoteBot7 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Retrieves Market Maker Protection (MMP) configuration for an index. Returns all currently active MMP parameters for the selected index, including the interval, `frozen_time`, quantity/delta/vega limits, and `max_quote_quantity`. If the `index_name` parameter is not provided, a list of all MMP configurations is returned. An empty list means no MMP configuration exists. This method is useful for verifying your configuration or confirming applied updates. For Mass Quotes, specify the `mmp_group` parameter to retrieve configuration for a specific MMP group. If no group is provided, returns configuration for regular orders. Set `block_rfq` to `true` to retrieve MMP configuration for Block RFQ (requires `block_rfq:read` scope). Each entry in the response includes an `id` field (integer) that uniquely identifies the MMP group. This integer ID is the programmatic identifier for the group and can be used to reference it in contexts where the string `mmp_group` name is not accepted. Entries that have no `mmp_group` name in the response correspond to the orders MMP group (the default group). **π Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection) **Scope:** `trade:read` or `block_rfq:read` (when `block_rfq` = `true`) [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_mmp_config) ' x-mint: metadata: title: private/get_mmp_config og:title: private/get_mmp_config keywords: - private/get_mmp_config - index_name - mmp_group - block_rfq - interval - frozen_time - quantity_limit - delta_limit - vega_limit - max_quote_quantity - trade_count_limit href: /api-reference/trading/private-get_mmp_config /private/get_mmp_status: get: tags: - Matching Engine parameters: - name: index_name required: false in: query schema: $ref: '#/components/schemas/index_name_derivative' description: Index identifier of derivative instrument on the platform; skipping this parameter will return all configurations - name: mmp_group required: false in: query schema: type: string example: MassQuoteBot7 description: 'Specifies the MMP group for which the status is being retrieved. The `index_name` must be specified before using this parameter. **π Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications) ' - name: block_rfq required: false in: query schema: type: boolean default: false description: 'If true, retrieves MMP status for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP status is completely separate from normal order/quote MMP status. ' responses: '200': $ref: '#/components/responses/PrivateGetMmpStatusResponse' requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 7851 method: private/get_mmp_status params: index_name: btc_usd mmp_group: MassQuoteBot7 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Retrieves Market Maker Protection (MMP) status for a triggered index or MMP group. Returns the live MMP state including whether MMP is enabled or triggered, remaining frozen time (if triggered), whether quoting is currently allowed, and any active freeze conditions. If the `index_name` parameter is not provided, a list of all triggered MMP statuses is returned. This method lets you track whether protection is active and when quoting will resume. For Mass Quotes, specify the `mmp_group` parameter to check status for a specific MMP group. Set `block_rfq` to `true` to retrieve MMP status for Block RFQ (requires `block_rfq:read` scope). **π Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection) **Scope:** `trade:read` or `block_rfq:read` (when `block_rfq` = `true`) [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_mmp_status) ' x-mint: metadata: title: private/get_mmp_status og:title: private/get_mmp_status keywords: - private/get_mmp_status - index_name - mmp_group - block_rfq - frozen_until href: /api-reference/trading/private-get_mmp_status /private/set_mmp_config: get: tags: - Matching Engine parameters: - name: index_name required: true in: query schema: $ref: '#/components/schemas/index_name_derivative' description: Index identifier of derivative instrument on the platform - name: interval required: true in: query schema: type: integer minimum: 0 maximum: 3600 example: 60 description: 'The duration of the monitoring window in seconds. For example, an `interval` of `3` implies a 3-second window. The `interval` begins after the first trade. If a new trade is executed after the `interval` has ended, a new `interval` is started, and counters reset. If a trade occurs during an already running `interval`, that `interval` continues unaffected. This mechanism allows the platform to track activity in short, rolling windows to identify potentially risky trading behavior. If set to `0`, MMP is removed. Maximum value: `3600` seconds (1 hour). ' - name: frozen_time required: true in: query schema: type: integer minimum: 0 maximum: 3600 example: 0 description: 'Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted. If you want to disable automatic reset, set `frozen_time` to `0`. In that case, a manual reset is required using the `private/reset_mmp` method. Manual reset is also possible during the frozen time period. Maximum value: `3600` seconds (1 hour). ' - name: mmp_group required: false in: query schema: type: string example: MassQuoteBot7 description: 'Designates the MMP group for which the configuration is being set. If the specified group is already associated with a different `index_name`, an error is returned. This parameter enables distinct configurations for each MMP group, linked to particular `index_name`. Maximum 64 characters. Case sensitive. Cannot be empty string. **π Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications) ' - name: quantity_limit required: false in: query schema: type: number example: 3 description: 'The total traded quantity, measured in units of the base currency (e.g., BTC in `BTC-PERPETUAL`), within the `interval`. This count is direction-agnosticβa buy followed by a sell counts double. Example: Buy `10` BTC and sell `10` BTC = `20` total quantity. Applicable to both options and futures. Positive value with maximum 4 decimal places. ' - name: delta_limit required: false in: query schema: type: number description: 'The maximum allowable net transaction delta change during the `interval`. Expressed in units of base currency. The `delta_limit` is treated as an absolute threshold: e.g., `delta_limit: 10` β MMP is triggered if net transaction delta exceeds `+10` or drops below `-10`. Direction matters: buying `+5` delta and selling `β5` delta cancels out if within the same `interval`. **Note:** Note that we use the net transaction delta instead of delta. Net Transaction Delta = `Delta - Mark Price`. In the rest of this document, "delta" actually refers to net transaction delta. Positive value with maximum 4 decimal places. ' - name: vega_limit required: false in: query schema: type: number description: 'The maximum change in vega exposure allowed within a given `interval`, measured in absolute terms. Expressed in USD, representing the change in sensitivity to implied volatility across executed trades. This parameter is primarily relevant for options traders managing risk in volatile markets. 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. **Notice:** 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. Positive value with maximum 4 decimal places. ' - name: max_quote_quantity required: true in: query schema: type: number example: 2.5 description: Maximum Quote Quantity (MQQ) in base currency. MQQ is configured per index but enforced per side, per order book (instrument) β the total combined size of open MMP orders per side per instrument cannot exceed MQQ. **See response description for detailed information about MQQ behavior and limitations.** Maximum 4 decimal places. - name: block_rfq required: false in: query schema: type: boolean default: false description: 'If true, configures MMP for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings. ' - name: trade_count_limit required: false in: query schema: type: integer maximum: 1000 minimum: 1 description: For Block RFQ only (`block_rfq` = `true`). Sets the maximum number of Block RFQ trades allowed in the lookback window. Each RFQ trade counts as `+1` towards the limit (not individual legs). Works across all currency pairs. When using this parameter, `index_name` must be set to `"all"`. Maximum - `1000`. responses: '200': $ref: '#/components/responses/PrivateSetMmpConfigResponse' requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 7859 method: private/set_mmp_config params: index_name: btc_usd mmp_group: MassQuoteBot7 interval: 60 frozen_time: 0 quantity_limit: 3 max_quote_quantity: 2.5 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Configures Market Maker Protection (MMP) for a specific index. This method sets the monitoring window, freeze duration, and exposure limits (quantity, delta, vega, and Maximum Quote Quantity). At least one limit parameter must be set. Maximum Quote Quantity (MQQ) is a required parameter that limits the total combined size of open MMP orders. MQQ is configured per index but enforced per side, per order book (instrument). The `interval` parameter defines the monitoring window duration in seconds. The `frozen_time` parameter sets how long MMP remains active after being triggered. Set `frozen_time` to `0` to disable automatic reset (manual reset required). For Mass Quotes, use the `mmp_group` parameter to configure MMP for a specific group. Set `block_rfq` to `true` to configure MMP for Block RFQ (requires `block_rfq:read_write` scope). Set `interval` to `0` to remove MMP configuration. **π Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection) **Scope:** `trade:read_write` or `block_rfq:read_write` (when `block_rfq` = `true`) [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fset_mmp_config) ' x-mint: metadata: title: private/set_mmp_config og:title: private/set_mmp_config keywords: - private/set_mmp_config - index_name - interval - frozen_time - mmp_group - quantity_limit - delta_limit - vega_limit - max_quote_quantity - block_rfq - trade_count_limit href: /api-reference/trading/private-set_mmp_config /private/reset_mmp: get: tags: - Matching Engine parameters: - name: index_name required: true in: query schema: type: string example: btc_usd description: 'Currency pair for which to reset MMP limits. **For regular MMP (`block_rfq = false`):** Must be a specific currency pair (e.g., "btc_usd", "eth_usd"). The value `"all"` is not allowed. **For Block RFQ MMP (`block_rfq = true`):** Can be either a specific currency pair or `"all"` to reset MMP limits across all currency pairs. ' - name: mmp_group required: false in: query schema: type: string example: MassQuoteBot7 description: 'Specifies the MMP group for which limits are being reset. If this parameter is omitted, the method resets the traditional (no group) MMP limits. **π Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications) ' - name: block_rfq required: false in: query schema: type: boolean default: false description: 'If true, resets MMP for Block RFQ. When set, requires `block_rfq` scope instead of `trade` scope. Block RFQ MMP settings are completely separate from normal order/quote MMP settings. When `block_rfq = true`, the `index_name` parameter can be set to `"all"` to reset limits across all currency pairs. ' responses: '200': $ref: '#/components/responses/OkResponse' requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 7859 method: private/reset_mmp params: index_name: btc_usd mmp_group: MassQuoteBot7 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Resets Market Maker Protection (MMP) limits for the specified currency pair or MMP group. If MMP protection has been triggered and quoting is frozen, this method allows you to manually resume quoting. If the configured `frozen_time` has expired, the system will automatically reset MMP. If `frozen_time` is set to `0` (automatic reset disabled), you must call this method to re-enable quoting. You can also perform a manual reset during the frozen period if you want to resume quoting early. For regular MMP (`block_rfq = false`), the `index_name` must be a specific currency pair (e.g., "btc_usd", "eth_usd"). For Block RFQ MMP (`block_rfq = true`), you can set `index_name` to `"all"` to reset limits across all currency pairs. Use the `mmp_group` parameter to reset limits for a specific MMP group. **π Related Article:** [Market Maker Protection API Configuration](https://docs.deribit.com/articles/market-maker-protection) **Scope:** `trade:read_write` or `block_rfq:read_write` (when `block_rfq` = `true`) [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Freset_mmp) ' x-mint: metadata: title: private/reset_mmp og:title: private/reset_mmp keywords: - private/reset_mmp - index_name - mmp_group - block_rfq href: /api-reference/trading/private-reset_mmp /private/mass_quote: get: parameters: - name: wait_for_response in: query schema: type: boolean required: false description: If false, the response is sent immediately after the risk check. If true, the response is sent after the orders all go through the matching engine. Default - `true`. - name: detailed in: query schema: type: boolean example: true required: false description: Flag to receive a list of all order changes and a list of errors, or to only receive a list of errors. Default - `false`. - name: quote_id in: query schema: type: string example: '1' required: true description: Identifier of a mass quote message. Can be used to match trades to requests. We recommend using an incrementing counter. - name: mmp_group in: query schema: type: string example: default required: true description: Name of the MMP group. An MMP group has to be used and only one quote can exist per instrument per side per MMP group. - name: valid_until in: query schema: type: integer required: false description: Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases `timed_out` error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time. - name: quotes in: query required: true schema: type: array items: type: object properties: instrument_name: type: string description: The name of the instrument. quote_set_id: type: string description: User-defined label that can be used for targeted cancels using private/cancel_quotes. ask: type: object properties: price: type: number description: The price of this side of the quote. If no price is supplied, only the amount is amended. amount: type: number description: The amount of this side of the quote. If no quantity is supplied, only the price is amended. post_only: type: boolean default: false description: If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread. Default - `false` reject_post_only: type: boolean default: false description: If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected. Only valid in combination with "post_only" set to `true`. Default value - `false` description: Order details for the ask. If not provided, `bid` must be present. bid: type: object properties: price: type: number description: The price of this side of the quote. If no price is supplied, only the amount is amended. amount: type: number description: The amount of this side of the quote. If no quantity is supplied, only the price is amended. post_only: type: boolean default: false description: If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread. Default - `false` reject_post_only: type: boolean default: false description: If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected. Only valid in combination with "post_only" set to `true`. Default value - `false` description: Order details for the bid. If not provided, `ask` must be present. example: - instrument_name: BTC-PERPETUAL quote_set_id: futures ask: price: 43800 amount: 10 bid: price: 43700 amount: 10 - instrument_name: BTC-22DEC23-41600-C quote_set_id: options ask: price: 0.05 amount: 1 bid: price: 0.04 amount: 1 description: List of quotes. style: form explode: true responses: '200': $ref: '#/components/responses/PrivateMassQuoteResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 7859 method: private/mass_quote params: detailed: true quote_id: '1' mmp_group: default quotes: - instrument_name: BTC-PERPETUAL quote_set_id: futures ask: price: 43800 amount: 10 bid: price: 43700 amount: 10 - instrument_name: BTC-22DEC23-41600-C quote_set_id: options ask: price: 0.05 amount: 1 bid: price: 0.04 amount: 1 description: JSON-RPC Request Example description: JSON-RPC request body description: 'Places buy and/or sell orders (quotes) on one or more instruments simultaneously. This method is designed for market makers who need to quote on multiple instruments efficiently. **Requirements:** - Cancel-on-Disconnect must be enabled (see [private/enable_cancel_on_disconnect](https://docs.deribit.com/api-reference/session-management/private-enable_cancel_on_disconnect)), otherwise the request will return an error. - This endpoint can only be used after approval from the administrators. Each quote can include both bid and ask sides, or just one side. Quotes are identified by `quote_set_id` for targeted cancellation. Use the `wait_for_response` parameter to control whether to wait for all orders to be processed before returning. **π Related Article:** [Mass Quotes Specifications](https://docs.deribit.com/articles/mass-quotes-specifications) **Scope:** `trade:read_write` [Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fmass_quote) ' x-mint: metadata: title: private/mass_quote og:title: private/mass_quote keywords: - private/mass_quote - wait_for_response - detailed - quote_id - mmp_group - valid_until - quotes - orders - trades - errors_count - pending_requests_count - pending_requests - errors - order_id - order_state - order_type - original_order_type - time_in_force - is_rebalance - is_liquidation - instrument_name - creation_timestamp - last_update_timestamp - direction - price - label - post_only - reject_post_only - reduce_only - api - web - mobile - refresh_amount - display_amount - amount - contracts - filled_amount - average_price - advanced - implv - usd - triggered - trigger - trigger_price - trigger_offset - trigger_reference_price - block_trade - mmp - risk_reducing - replaced - auto_replaced - quote - quote_set_id - trigger_order_id - app_name - mmp_cancelled - cancel_reason - oto_order_ids - trigger_fill_condition - oco_ref - primary_order_id - is_secondary_oto - is_primary_otoco - trade_id - trade_seq - timestamp - matching_id - tick_direction - index_price - iv - underlying_price - liquidation - liquidity - fee - fee_currency - state - block_trade_id - block_rfq_id - block_rfq_quote_id - profit_loss - mark_price - legs - combo_id - combo_trade_id - trade_allocations - user_id - client_info - client_id - client_link_id - name - side - code - message href: /api-reference/trading/private-mass_quote /private/move_positions: get: parameters: - in: query name: currency required: false schema: $ref: '#/components/schemas/currency' description: The currency symbol - name: source_uid in: query schema: type: integer example: 1 required: true description: Id of source subaccount. Can be found in `My Account >> Subaccounts` tab - name: target_uid in: query schema: type: integer example: 1 required: true description: Id of target subaccount. Can be found in `My Account >> Subaccounts` tab - in: query name: trades required: true schema: type: array items: type: object properties: instrument_name: $ref: '#/components/schemas/instrument_name' description: Instrument name price: type: number description: Price for trade - if not provided average price of the position is used amount: type: number description: It represents the requested trade size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. Amount can't exceed position size. description: List of trades for position move style: form explode: true responses: '200': $ref: '#/components/responses/PrivatePositionMoveResponse' tags: - Matching Engine requestBody: content: application/json: examples: request: value: jsonrpc: '2.0' id: 3 method: private/move_positions params: currency: BTC source_uid: 3 target_uid: 23 trades: - instrument_name: BTC-PERPETUAL price: '35800' amount: '110' - instrument_name: BTC-28JAN22-32500-C amount: '0.1' description: JSON-RPC Request Example description: JSON-RPC request body description: "Moves positions from a source subaccount to a target subaccount. This operation transfers open positions between subaccounts, which is useful for rebalancing or reorganizing trading activities.\n\nPositions can be filtered by currency. The operation creates trades to transfer positions, which may affect P&L and margin calculations.\n\n**Note - This method has distinct API rate limiting requirements:** \n- Sustained rate: 6 requests/minute\n- Weekly limit: 100 move_position uses per week (168 hours)\n\nFor more information, see [Rate Limits](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).\n\n**Important:** In rare cases, the request may return an `internal_server_error`. This does not necessarily mean the operation failed entirely. Part or all of the position transfer might have still been processed successfully. Check the positions in both accounts to verify the transfer status.\n\n**\U0001F4D6 Related Article:** [Moving Positions](https://docs.deribit.com/articles/moving-positions-api)\n\n**Scope:** `trade:read_write`\n\n[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fmove_positions)\n\n" x-mint: metadata: title: private/move_positions og:title: private/move_positions keywords: - private/move_positions - currency - source_uid - target_uid - trades - instrument_name - direction - price - amount href: /api-reference/trading/private-move_positions components: schemas: order_state_in_user_trade: enum: - open - filled - rejected - cancelled - untriggered - archive type: string description: 'Order state: `"open"`, `"filled"`, `"rejected"`, `"cancelled"`, `"untriggered"` or `"archive"` (if order was archived)' trigger_offset: type: number description: The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders) api: type: boolean description: '`true` if created with API' trigger: enum: - index_price - mark_price - last_price type: string description: 'Trigger type (only for trigger orders). Allowed values: `"index_price"`, `"mark_price"`, `"last_price"`.' combo_id: example: BTC-FS-31DEC21-PERP type: string description: Unique combo identifier block_trade_id: example: '154' type: string description: Block trade id contracts: type: number description: It represents the order size in contract units. (Optional, may be absent in historical data). kind_with_combo_all: enum: - future - option - spot - future_combo - option_combo - combo - any type: string description: 'Instrument kind: `"future"`, `"option"`, `"spot"`, `"future_combo"`, `"option_combo"`, `"combo"` for any combo or `"any"` for all' order_type: enum: - market - limit - stop_market - stop_limit - take_market - take_limit - trailing_stop type: string description: 'Order type: `"limit"`, `"market"`, `"stop_limit"`, `"stop_market"`, `"take_limit"`, `"take_market"`, `"trailing_stop"`' reduce_only: type: boolean description: Optional (not added for spot). '`true` for reduce-only orders only' position_move: properties: trades: type: array items: $ref: '#/components/schemas/position_move_trade' required: - trades type: object combo_state: enum: - active - inactive type: string description: 'Combo state: `"active"`, "`inactive`"' price: type: number description: Price in base currency trigger_reference_price: type: number description: The price of the given trigger at the time when the order was placed (Only for trailing trigger orders) display_amount: type: number description: The actual display amount of iceberg order. Absent for other types of orders. PrivateGetBlockTradeResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: $ref: '#/components/schemas/block_trade' required: - jsonrpc - result type: object filled_amount: type: number description: Filled amount of the order. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH. block_trade_id_in_result: example: '154' type: string description: Block trade id - when trade was part of a block trade PrivatePositionMoveResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: $ref: '#/components/schemas/position_move' required: - jsonrpc - result type: object PrivateBuyAndSellResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: type: object properties: order: $ref: '#/components/schemas/order' trades: type: array items: $ref: '#/components/schemas/user_trade' required: - order - trades required: - jsonrpc - result type: object is_secondary_oto: type: boolean description: '`true` if the order is an order that can be triggered by another order, otherwise not present.' PrivateCancelAllResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: type: number example: 7 description: Total number of successfully cancelled orders required: - jsonrpc - result type: object trade_id: type: string description: Unique (per currency) trade identifier cancel_reason: enum: - user_request - autoliquidation - cancel_on_disconnect - risk_mitigation - pme_risk_reduction - pme_account_locked - position_locked - mmp_trigger - mmp_config_curtailment - edit_post_only_reject - oco_other_closed - oto_primary_closed - settlement type: string description: Enumerated reason behind cancel `"user_request"`, `"autoliquidation"`, `"cancel_on_disconnect"`, `"risk_mitigation"`, `"pme_risk_reduction"` (portfolio margining risk reduction), `"pme_account_locked"` (portfolio margining account locked per currency), `"position_locked"`, `"mmp_trigger"` (market maker protection), `"mmp_config_curtailment"` (market maker configured quantity decreased), `"edit_post_only_reject"` (cancelled on edit because of `reject_post_only` setting), `"oco_other_closed"` (the oco order linked to this order was closed), `"oto_primary_closed"` (the oto primary order that was going to trigger this order was cancelled), `"settlement"` (closed because of a settlement) PrivateCancelQuotesResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: type: number example: 3 description: Total number of successfully cancelled quotes required: - jsonrpc - result type: object timestamp: example: 1536569522277 type: integer description: The timestamp (milliseconds since the Unix epoch) instrument_id: type: integer description: Instrument ID currency: enum: - BTC - ETH - USDC - USDT - EURR type: string description: Currency, i.e `"BTC"`, `"ETH"`, `"USDC"` order: properties: order_id: $ref: '#/components/schemas/order_id' order_state: $ref: '#/components/schemas/order_state' order_type: $ref: '#/components/schemas/order_type' original_order_type: $ref: '#/components/schemas/original_order_type' time_in_force: $ref: '#/components/schemas/time_in_force' is_rebalance: type: boolean description: Optional (only for spot). `true` if order was automatically created during cross-collateral balance restoration is_liquidation: type: boolean description: Optional (not added for spot). `true` if order was automatically created during liquidation instrument_name: $ref: '#/components/schemas/instrument_name' creation_timestamp: $ref: '#/components/schemas/timestamp' last_update_timestamp: $ref: '#/components/schemas/timestamp' direction: $ref: '#/components/schemas/direction' price: $ref: '#/components/schemas/open_order_price' label: $ref: '#/components/schemas/label' post_only: $ref: '#/components/schemas/post_only' reject_post_only: $ref: '#/components/schemas/reject_post_only' reduce_only: $ref: '#/components/schemas/reduce_only' api: $ref: '#/components/schemas/api' web: $ref: '#/components/schemas/web' mobile: $ref: '#/components/schemas/mobile' refresh_amount: $ref: '#/components/schemas/refresh_amount' display_amount: $ref: '#/components/schemas/display_amount' amount: $ref: '#/components/schemas/amount' contracts: $ref: '#/components/schemas/contracts' filled_amount: $ref: '#/components/schemas/filled_amount' average_price: $ref: '#/components/schemas/average_price' advanced: $ref: '#/components/schemas/advanced' implv: $ref: '#/components/schemas/implv' usd: $ref: '#/components/schemas/usd' triggered: $ref: '#/components/schemas/triggered' trigger: $ref: '#/components/schemas/trigger' trigger_price: $ref: '#/components/schemas/trigger_price' trigger_offset: $ref: '#/components/schemas/trigger_offset' trigger_reference_price: $ref: '#/components/schemas/trigger_reference_price' block_trade: $ref: '#/components/schemas/block_trade_order' mmp: type: boolean description: '`true` if the order is a MMP order, otherwise `false`.' risk_reducing: type: boolean description: '`true` if the order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users), otherwise `false`.' replaced: type: boolean description: '`true` if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise `false`.' auto_replaced: type: boolean description: Options, advanced orders only - `true` if last modification of the order was performed by the pricing engine, otherwise `false`. quote: type: boolean description: If order is a quote. Present only if true. mmp_group: type: string description: Name of the MMP group supplied in the `private/mass_quote` request. Only present for quote orders. quote_set_id: type: string description: Identifier of the QuoteSet supplied in the `private/mass_quote` request. Only present for quote orders. quote_id: type: string description: The same QuoteID as supplied in the `private/mass_quote` request. Only present for quote orders. trigger_order_id: type: string example: SLIB-370 description: Id of the trigger order that created the order (Only for orders that were created by triggered orders). app_name: type: string example: Example Application description: The name of the application that placed the order on behalf of the user (optional). mmp_cancelled: type: boolean example: true description: '`true` if order was cancelled by mmp trigger (optional)' cancel_reason: $ref: '#/components/schemas/cancel_reason' oto_order_ids: type: array items: $ref: '#/components/schemas/order_id' description: Order Id description: The Ids of the orders that will be triggered if the order is filled trigger_fill_condition: $ref: '#/components/schemas/trigger_fill_condition' oco_ref: $ref: '#/components/schemas/oco_ref' primary_order_id: $ref: '#/components/schemas/order_id' description: ID of the order that triggered this order. is_secondary_oto: $ref: '#/components/schemas/is_secondary_oto' is_primary_otoco: type: boolean description: '`true` if the order is an order that can trigger an OCO pair, otherwise not present.' required: - order_id - order_state - order_type - time_in_force - instrument_name - creation_timestamp - last_update_timestamp - direction - price - label - post_only - api type: object amount: type: number description: It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. PrivateMassQuoteResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: type: object properties: orders: type: array items: $ref: '#/components/schemas/order' trades: type: array items: $ref: '#/components/schemas/user_trade' errors_count: type: integer description: 'Number of errors (present when `detailed` : `false`).' pending_requests_count: type: integer description: 'Number of pending quotes (present when `wait_for_response`: `false` and `detailed` : `false`).' pending_requests: type: array items: type: object properties: instrument_name: type: string description: Instrument name. side: type: string description: Quote side - `bid` or `ask`. description: 'List of pending quotes (present when `wait_for_response`: `false` and `detailed` : `true`).' errors: type: array items: type: object properties: instrument_name: type: string description: Instrument name. side: type: string description: Quote side - `bid` or `ask`. error: type: object description: Error data. code: type: integer description: Error code message: type: string description: Error message. description: 'List of errors (present when `detailed` : `true`).' required: - jsonrpc - result type: object index_name_derivative: enum: - btc_usd - eth_usd - btc_usdc - eth_usdc - ada_usdc - algo_usdc - avax_usdc - bch_usdc - bnb_usdc - doge_usdc - dot_usdc - link_usdc - ltc_usdc - near_usdc - paxg_usdc - shib_usdc - sol_usdc - ton_usdc - trx_usdc - trump_usdc - uni_usdc - xrp_usdc - usde_usdc - buidl_usdc - btcdvol_usdc - ethdvol_usdc - btc_usdt - eth_usdt - all type: string description: Index identifier of derivative instrument on the platform direction: enum: - buy - sell type: string description: 'Direction: `buy`, or `sell`' block_trade: properties: id: $ref: '#/components/schemas/block_trade_id' timestamp: $ref: '#/components/schemas/timestamp' trades: type: array items: $ref: '#/components/schemas/user_trade' app_name: type: string example: Example Application description: The name of the application that executed the block trade on behalf of the user (optional). broker_code: type: string example: 2krM7sJsx description: Broker code associated with the broker block trade. broker_name: type: string example: Test Broker description: Name of the broker associated with the block trade. required: - id - timestamp - trades type: object PrivateCancelResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: $ref: '#/components/schemas/order' required: - jsonrpc - result type: object advanced: enum: - usd - implv type: string description: 'advanced type: `"usd"` or `"implv"` (Only for options; field is omitted if not applicable). ' web: type: boolean description: '`true` if created via Deribit frontend (optional)' PrivateGetMmpStatusResponse: properties: jsonrpc: type: string enum: - '2.0' description: The JSON-RPC version (2.0) id: type: integer description: The id that was sent in the request result: type: array items: type: object properties: index_name: $ref: '#/components/schemas/index_name' frozen_until: type: integer description: Timestamp (milliseconds since the UNIX epoch) until the user will be frozen - 0 means that the user is frozen until manual reset. mmp_group: type: string example: MassQuoteBot7 description: Triggered mmp group, this parameter is optional (appears only for Mass Quote orders trigger) block_rfq: type: boolean example: false description: If true, indicates that the MMP status is for Block RFQ. Block RFQ MMP status is completely separate from normal order/quote MMP status. required: - index_name - frozen_until - mmp_group required: - jsonrpc - result type: object position_move_trade: properties: source_uid: type: integer description: Trade source uid target_uid: type: integer description: Trade target uid instrument_name: $ref: '#/components/schemas/instrument_name' direction: $ref: '#/components/schemas/direction' description: Trade direction from source perspective price: $ref: '#/components/schemas/price' description: The price of the trade amount: type: number description: Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. required: - instrument_name - direction - price - amount type: object block_trade_signature: example: 1565173369982.1M9tO0Q-.z9n9WyZUU5op9pEz6Jtd2CI71QxQMMsCZAexnIfK9HQRT1pKH3clxeIbY7Bqm-yMcWIoE3IfCDPW5VEdiN-6oS0YkKUyXPD500MUf3ULKhfkmH81EZs type: string description: Signature of block tradeThe fill condition of the linked order (Only for linked order types), default: `first_hit`.
interval of 3 implies a 3-second window. interval begins after the first trade. interval has ended, a new interval is started, and counters reset. interval, that interval continues unaffected. 0, MMP is disabled. 3600 seconds (1 hour).'
frozen_time:
type: integer
minimum: 0
maximum: 3600
description: 'Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted. frozen_time to 0. In that case, a manual reset is required using the private/reset_mmp method. 3600 seconds (1 hour).'
id:
type: integer
format: int64
description: Integer identifier for the MMP group (int64). This is the programmatic identifier for the group. Entries without an `mmp_group` name correspond to the orders MMP group (the default group).
mmp_group:
type: string
description: Name of the MMP group. Absent for the orders MMP group (the default group), which has no string name β its entry is identified by the `id` field alone.
quantity_limit:
type: number
description: 'The total traded quantity, measured in units of the base currency (e.g., BTC in BTC-PERPETUAL), within the interval. 10 BTC and sell 10 BTC = 20 total quantity. quantity_limit = quantity_limit * 0.03 interval. delta_limit is treated as an absolute threshold: e.g., delta_limit: 10 β MMP is triggered if net transaction delta exceeds +10 or drops below -10. +5 delta and selling β5 delta cancels out if within the same interval. Delta - Mark Price. In the rest of this document, "delta" actually refers to net transaction delta. interval, measured in absolute terms. 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. interval of 3 implies a 3-second window. interval begins after the first trade. interval has ended, a new interval is started, and counters reset. interval, that interval continues unaffected. 0, MMP is disabled. 3600 seconds (1 hour).'
frozen_time:
type: integer
minimum: 0
maximum: 3600
description: 'Time in seconds that MMP remains active after being triggered. Once this frozen period has passed, MMP will automatically reset, allowing new orders to be submitted. frozen_time to 0. In that case, a manual reset is required using the private/reset_mmp method. 3600 seconds (1 hour).'
id:
type: integer
format: int64
description: Integer identifier for the MMP group (int64). This is the programmatic identifier for the group. Entries without an `mmp_group` name correspond to the orders MMP group (the default group).
mmp_group:
type: string
description: Name of the MMP group. Absent for the orders MMP group (the default group), which has no string name β its entry is identified by the `id` field alone.
quantity_limit:
type: number
description: 'The total traded quantity, measured in units of the base currency (e.g., BTC in BTC-PERPETUAL), within the interval. 10 BTC and sell 10 BTC = 20 total quantity. quantity_limit = quantity_limit * 0.03 interval. delta_limit is treated as an absolute threshold: e.g., delta_limit: 10 β MMP is triggered if net transaction delta exceeds +10 or drops below -10. +5 delta and selling β5 delta cancels out if within the same interval. Delta - Mark Price. In the rest of this document, "delta" actually refers to net transaction delta. interval, measured in absolute terms. 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.