curl --request GET \
--url https://test.deribit.com/api/v2/private/mass_quote \
--header 'Content-Type: application/json' \
--data '
{
"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
}
}
]
}
}
'{
"jsonrpc": "2.0",
"id": 7859,
"result": {
"errors": [
{
"instrument_name": "BTC-PERPETUAL",
"side": "bid",
"error": {
"message": "price_too_high 43666.4288",
"code": 10007
}
}
],
"orders": [
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "options",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-22DEC23-41600-C",
"order_id": "6653852",
"max_show": 1,
"time_in_force": "good_til_cancelled",
"price": 0.04,
"direction": "buy",
"amount": 1,
"label": ""
},
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "options",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-22DEC23-41600-C",
"order_id": "6653853",
"max_show": 1,
"time_in_force": "good_til_cancelled",
"price": 0.05,
"direction": "sell",
"amount": 1,
"label": ""
},
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "futures",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-PERPETUAL",
"order_id": "6653855",
"max_show": 10,
"time_in_force": "good_til_cancelled",
"price": 43800,
"direction": "sell",
"amount": 10,
"label": ""
}
],
"trades": []
}
}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:
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
Scope: trade:read_write
curl --request GET \
--url https://test.deribit.com/api/v2/private/mass_quote \
--header 'Content-Type: application/json' \
--data '
{
"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
}
}
]
}
}
'{
"jsonrpc": "2.0",
"id": 7859,
"result": {
"errors": [
{
"instrument_name": "BTC-PERPETUAL",
"side": "bid",
"error": {
"message": "price_too_high 43666.4288",
"code": 10007
}
}
],
"orders": [
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "options",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-22DEC23-41600-C",
"order_id": "6653852",
"max_show": 1,
"time_in_force": "good_til_cancelled",
"price": 0.04,
"direction": "buy",
"amount": 1,
"label": ""
},
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "options",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-22DEC23-41600-C",
"order_id": "6653853",
"max_show": 1,
"time_in_force": "good_til_cancelled",
"price": 0.05,
"direction": "sell",
"amount": 1,
"label": ""
},
{
"is_liquidation": false,
"reduce_only": false,
"risk_reducing": false,
"last_update_timestamp": 1703162550180,
"creation_timestamp": 1703162478689,
"filled_amount": 0,
"average_price": 0,
"order_type": "limit",
"order_state": "open",
"quote": true,
"quote_set_id": "futures",
"quote_id": "1",
"post_only": false,
"replaced": false,
"mmp_group": "default",
"web": false,
"mmp": true,
"api": false,
"instrument_name": "BTC-PERPETUAL",
"order_id": "6653855",
"max_show": 10,
"time_in_force": "good_til_cancelled",
"price": 43800,
"direction": "sell",
"amount": 10,
"label": ""
}
],
"trades": []
}
}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.
Flag to receive a list of all order changes and a list of errors, or to only receive a list of errors. Default - false.
true
Identifier of a mass quote message. Can be used to match trades to requests. We recommend using an incrementing counter.
"1"
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.
"default"
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.
List of quotes.
Hide child attributes
The name of the instrument.
User-defined label that can be used for targeted cancels using private/cancel_quotes.
Order details for the ask. If not provided, bid must be present.
Hide child attributes
The price of this side of the quote. If no price is supplied, only the amount is amended.
The amount of this side of the quote. If no quantity is supplied, only the price is amended.
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
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
Order details for the bid. If not provided, ask must be present.
Hide child attributes
The price of this side of the quote. If no price is supplied, only the amount is amended.
The amount of this side of the quote. If no quantity is supplied, only the price is amended.
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
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
[
{
"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 }
}
]Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Hide child attributes
Unique order identifier
"ETH-100234"
Order state: "open", "filled", "rejected", "cancelled", "untriggered"
open, filled, rejected, cancelled, untriggered, triggered Order type: "limit", "market", "stop_limit", "stop_market"
market, limit, stop_market, stop_limit Order time in force: "good_til_cancelled", "good_til_day", "fill_or_kill" or "immediate_or_cancel"
good_til_cancelled, good_til_day, fill_or_kill, immediate_or_cancel Unique instrument identifier
"BTC-PERPETUAL"
The timestamp (milliseconds since the Unix epoch)
1536569522277
The timestamp (milliseconds since the Unix epoch)
1536569522277
Direction: buy, or sell
buy, sell Price in base currency or "market_price" in case of open trigger market orders
User defined label (up to 64 characters)
true for post-only orders only
true if created with API
Original order type. Optional field
market, market_limit Optional (only for spot). true if order was automatically created during cross-collateral balance restoration
Optional (not added for spot). true if order was automatically created during liquidation
true if order has reject_post_only flag (field is present only when post_only is true)
Optional (not added for spot). 'true for reduce-only orders only'
true if created via Deribit frontend (optional)
Optional field with value true added only when created with Mobile Application
The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders
The actual display amount of iceberg order. Absent for other types of orders.
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.
It represents the order size in contract units. (Optional, may be absent in historical data).
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.
Average fill price of the order
advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).
usd, implv Implied volatility in percent. (Only if advanced="implv")
Option price in USD (Only if advanced="usd")
Whether the trigger order has been triggered
Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".
index_price, mark_price, last_price Trigger price (Only for future trigger orders)
The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)
The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)
true if order made from block_trade trade, added only in that case.
true
true if the order is a MMP order, otherwise false.
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.
true if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise false.
Options, advanced orders only - true if last modification of the order was performed by the pricing engine, otherwise false.
If order is a quote. Present only if true.
Name of the MMP group supplied in the private/mass_quote request. Only present for quote orders.
Identifier of the QuoteSet supplied in the private/mass_quote request. Only present for quote orders.
The same QuoteID as supplied in the private/mass_quote request. Only present for quote orders.
Id of the trigger order that created the order (Only for orders that were created by triggered orders).
"SLIB-370"
The name of the application that placed the order on behalf of the user (optional).
"Example Application"
true if order was cancelled by mmp trigger (optional)
true
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)
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 The Ids of the orders that will be triggered if the order is filled
Order Id
The fill condition of the linked order (Only for linked order types), default: `first_hit`.
first_hit, complete_fill, incremental Unique reference that identifies a one_cancels_others (OCO) pair.
ID of the order that triggered this order.
"ETH-100234"
true if the order is an order that can be triggered by another order, otherwise not present.
true if the order is an order that can trigger an OCO pair, otherwise not present.
Hide child attributes
Unique (per currency) trade identifier
The sequence number of the trade within instrument
Unique instrument identifier
"BTC-PERPETUAL"
The timestamp of the trade (milliseconds since the UNIX epoch)
1517329113791
Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
Always null
Trade direction of the taker
buy, sell Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick).
0, 1, 2, 3 Index Price at the moment of trade
The price of the trade
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.
User's fee in units of the specified fee_currency
Currency, i.e "BTC", "ETH", "USDC"
BTC, ETH, USDC, USDT, EURR Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived)
open, filled, rejected, cancelled, untriggered, archive Mark Price at the moment of trade
Order type: "limit, "market", or "liquidation"
limit, market, liquidation Advanced type of user order: "usd" or "implv" (only for options; omitted if not applicable)
usd, implv Trade size in contract units (optional, may be absent in historical trades)
Option implied volatility for the price (Option only)
Underlying price for implied volatility calculations (Options only)
Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation
M, T, MT Describes what was role of users order: "M" when it was maker order, "T" when it was taker order
M, T User defined label (presented only when previously set for order by user)
Block trade id - when trade was part of a block trade
"154"
ID of the Block RFQ - when trade was part of the Block RFQ
ID of the Block RFQ quote - when trade was part of the Block RFQ
true if user order is reduce-only
true if user order is post-only
true if user order is MMP
true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)
true if user order was created with API
Profit and loss in base currency.
Optional field containing leg trades if trade is a combo trade (present when querying for only combo trades and in combo_trades events)
Optional field containing combo instrument name if the trade is a combo trade
Optional field containing combo trade identifier if the trade is a combo trade
QuoteSet of the user order (optional, present only for orders placed with private/mass_quote)
QuoteID of the user order (optional, present only for orders placed with private/mass_quote)
List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included.
Hide child attributes
Amount allocated to this user.
Fee for the allocated part of the trade.
User ID to which part of the trade is allocated. For brokers the User ID is obstructed.
Optional client allocation info for brokers.
Hide child attributes
ID of a client; available to broker. Represents a group of users under a common name.
ID assigned to a single user in a client; available to broker.
Name of the linked user within the client; available to broker.
Number of errors (present when detailed : false).
Number of pending quotes (present when wait_for_response: false and detailed : false).
The id that was sent in the request
Was this page helpful?