API requests related to Block RFQ require a different scope than block trades. This was done because block trades can have an optional “block trade approval” where a different authenticated connection has to approve any block trade done with an API key with this optional feature. As Block RFQ is not a third party platform this is not needed and lengthy approval times can lead to adverse selection, especially in an anonymous market.
To listen for new Block RFQ or to retrieve all open Block RFQs, only block_rfq:read is needed. To also create RFQs or respond to RFQs, block_rfq_id:read_write is needed.These scopes can be added to new keys or existing keys.
With the private/create_block_rfq call the taker initiates a Block RFQ by specifying the instruments and entering amounts in base currency (for inverse futures in quote currency). The taker should also input the direction of the individual legs to specify the structure. By not specifying the makers variable all makers are automatically targeted.
{ "method": "private/create_block_rfq", "params": { "legs": [ { "instrument_name": "BTC-14FEB25-100000-C", "amount": 100, "direction": "buy" }, { "instrument_name": "BTC-14FEB25-110000-C", "amount": 100, "direction": "sell" } ] }, "jsonrpc": "2.0", "id": 1 }
The creation response will always contain empty bid and ask lists as these will populate only after makers respond. An empty list next to the makers variable means that all makers on the platform were targeted. The leg structure is broken down into ratios and a total amount as described in the “Pricing unit” section. Deribit also returns the combo_id which is the theoretical instrument name of the strategy’s order book. For custom strategies this field is empty. The member also gets information on timestamps and the block_rfq_id which is the unique identifier of the Block RFQ.
{ "jsonrpc": "2.0", "id": 1, "result": { "state": "created", "bids": [], "asks": [], "role": "taker", "amount": 100, "legs": [ { "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "expiration_timestamp": 1738250740801, "block_rfq_id": 1, "combo_id": "BTC-CS-14FEB25-100000_110000", "makers": [], "min_trade_amount": 0.1, "creation_timestamp": 1738250440801 } }
Below is an example of how to create a Block RFQ structure containing a hedge leg.
{ "method": "private/create_block_rfq", "params": { "legs": [ { "instrument_name": "BTC-14FEB25-100000-C", "amount": 100, "direction": "buy" }, { "instrument_name": "BTC-14FEB25-110000-C", "amount": 100, "direction": "sell" } ], "hedge": { "instrument_name": "BTC-PERPETUAL", "amount": 50000, "direction": "sell", "price": 100000 } }, "jsonrpc": "2.0", "id": 1 }
The Block RFQ creation method takes in an optional parameter disclosed. By default it is set to False but at least 5 makers need to be targeted for a valid anonymous Block RFQ. In non-anonymous RFQs we then pass the taker alias in a parameter called taker and add the maker aliases to the bid, ask and trade arrays. This information is stored historically. Makers cannot see the aliases of other makers in these arrays. Below is an example of a non-anonymous Block RFQ creation.
{ "method": "private/create_block_rfq", "params": { "legs": [ { "instrument_name": "BTC-14FEB25-100000-C", "amount": 100, "direction": "buy" }, { "instrument_name": "BTC-14FEB25-110000-C", "amount": 100, "direction": "sell" } ], "disclosed": true }, "jsonrpc": "2.0", "id": 1 }
The taker notification channel provides updates about the status of the member’s created Block RFQ. The channel sends an update every time a field changes. This typically involves the state or new quotes coming in as bids or asks. An example response can be seen below.
channel: block_rfq.taker.{currency}
{ "jsonrpc": "2.0", "method": "subscription", "params": { "channel": "block_rfq.taker.btc", "data": { "jsonrpc": "2.0", "id": 1, "result": { "continuation": null, "block_rfqs": [ { "timestamp": 1738252420844, "state": "filled", "bids": [ { "price": 0.03, "amount": 100, "last_update_timestamp": 1738252318903, "execution_instruction": "all_or_none", "makers": ["MAKER1"] } ], "asks": [], "role": "taker", "mark_price": 0.005396142, "amount": 100, "trades": [ { "price": 0.01, "direction": "buy", "amount": 100, "maker": "MAKER1" } ], "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "expiration_timestamp": 1738252585438, "block_rfq_id": 1, "combo_id": "BTC-CS-14FEB25-110000_100000", "disclosed": false, "makers": [], "min_trade_amount": 0.1, "creation_timestamp": 1738252285438 } ] } } } }
The maker channels returns information about all new Block RFQs a member is tagged in as a maker and any updates to the state. Below is an example of a maker being tagged in an RFQ.
channel: block_rfq.maker.{currency}
{ "jsonrpc": "2.0", "method": "subscription", "params": { "channel": "block_rfq.maker.btc", "data": { "state": "open", "role": "maker", "combo_id": "BTC-CS-14FEB25-100000_110000", "legs": [ { "direction": "buy", "instrument_name": "BTC-14MAR25-80000-C", "ratio": 1 }, { "direction": "sell", "instrument_name": "BTC-14MAR25-80000-P", "ratio": 1 } ], "amount": 100, "min_trade_amount": 0.1, "expiration_timestamp": 1740742981931, "taker": "BenTrades", "creation_timestamp": 1740742681931, "block_rfq_id": 1, "taker_rating": 5-20, "disclosed": true } } }
Below is an example of the above RFQ being filled. The trade originated from two any_part_of quotes with two makers. In this example both makers are sub-accounts under the same main account. The subscription was opened for the sub-account which has the maker field in the trade tape. The maker was conveniently named ‘You’. This means that makers will receive trade information from this subscription for other makers as well. They will only receive the publicly visible information and private fields such as maker name will only be visible on their subscription.
{ "jsonrpc": "2.0", "method": "subscription", "params": { "channel": "block_rfq.maker.btc", "data": { "timestamp": 1740742710983, "state": "filled", "role": "maker", "combo_id": "BTC-CS-14FEB25-100000_110000", "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "amount": 100, "min_trade_amount": 0.1, "mark_price": 0.005396142, "trades": [ { "price": 0.01, "direction": "buy", "amount": 50 }, { "price": 0.01, "maker": "YOU", "direction": "buy", "amount": 50 } ], "expiration_timestamp": 1740742981931, "taker": "BenTrades", "creation_timestamp": 1740742681931, "block_rfq_id": 1, "disclosed": true } } }
Makers respond to Block RFQs with quotes. Makers specify the Block RFQ by passing in the block_rfq_id and then echoing the legs in the ratio structure with a price next to each leg. Makers then specify whether this is their buy (bid) or sell price (ask). They also input an amount and an execution instruction which can either be an all_or_none order or an any_part_of order. In the case of all_or_none the amount must always match the amount requested by the taker. In the case of any_part_of order makers can add multiple partial orders.
{ "method": "private/add_block_rfq_quote", "params": { "label": "test", "block_rfq_id": 1, "direction": "sell", "legs": [ { "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1, "direction": "buy", "price": "0.03" }, { "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1, "direction": "sell", "price": "0.02" } ], "amount": 100, "execution_instruction": "all_or_none" }, "jsonrpc": "2.0", "id": 1 }
In the quote response, makers receive information about the status of their quote. This includes the quote_state and the unique block_rfq_quote_id. Deribit also calculates the aggregate price that was offered for the direction. If the Block RFQ is already traded, makers can also see the amount on this quote that was used to fill the trade.
{ "jsonrpc": "2.0", "id": 1, "result": { "label": "test", "price": 0.01, "direction": "sell", "amount": 100, "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "block_rfq_id": 1, "replaced": false, "filled_amount": 0, "last_update_timestamp": 1738251666989, "execution_instruction": "all_or_none", "block_rfq_quote_id": 1, "creation_timestamp": 1738251666989, "quote_state": "open" } }
Provides notifications on quotes submitted, edited or cancelled. This method is only available to makers and only displays their quotes.
channel: block_rfq.maker.quotes.any
{ "jsonrpc": "2.0", "method": "subscription", "params": { "channel": "block_rfq.maker.quotes.any", "data": [ { "label": "test", "price": 0.01, "direction": "sell", "amount": 100, "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "block_rfq_id": 1, "replaced": false, "filled_amount": 0, "last_update_timestamp": 1738251666989, "execution_instruction": "all_or_none", "block_rfq_quote_id": 1, "creation_timestamp": 1738251666989, "quote_state": "open" } ] } }
To trade against active quotes, takers can submit a crossing order. In this order they specify the direction and price for which they are willing to trade. If the price in their order is at least as good as a price offered by a maker’s quote the trade happens at the best price.
{ "method": "private/trade_block_rfq", "params": { "block_rfq_id": 1, "legs": [ { "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1, "direction": "buy" }, { "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1, "direction": "sell" } ], "price": 0.01, "direction": "buy", "amount": 100 }, "jsonrpc": "2.0", "id": 1 }
Block RFQ trades are normal Deribit Block trades and are also reported as such. The only difference is the block_rfq_id field which can link multiple block trades together (in case the trade was executed as part of the multi-maker model).
{ "jsonrpc": "2.0", "id": 1, "result": [ { "id": "BLOCK-701428", "timestamp": 1738252420847, "trades": [ { "timestamp": 1738252420846, "state": "filled", "iv": 56.37, "price": 0.0088, "direction": "buy", "index_price": 105782.69, "profit_loss": 0, "instrument_name": "BTC-14FEB25-100000-C", "trade_seq": 4, "api": true, "mark_price": 0.00824031, "amount": 100, "order_id": "32032913453", "matching_id": null, "tick_direction": 0, "fee": 0.00225, "mmp": false, "block_trade_id": "BLOCK-701428", "block_rfq_id": 1, "combo_id": "BTC-CS-14FEB25-100000_110000", "post_only": false, "reduce_only": false, "self_trade": false, "underlying_price": 106384.42, "contracts": 100, "trade_id": "193437641", "fee_currency": "BTC", "order_type": "limit", "risk_reducing": false, "block_trade_leg_count": 2, "liquidity": "T" }, { "timestamp": 1738252420846, "state": "filled", "iv": 60.3, "price": 0.0027, "direction": "sell", "index_price": 105782.69, "profit_loss": 0, "instrument_name": "BTC-14FEB25-110000-C", "trade_seq": 5, "api": true, "mark_price": 0.00284417, "amount": 100, "order_id": "32032913451", "matching_id": null, "tick_direction": 0, "fee": 0, "mmp": false, "block_trade_id": "BLOCK-701428", "block_rfq_id": 1, "combo_id": "BTC-CS-14FEB25-100000_110000", "post_only": false, "reduce_only": false, "self_trade": false, "underlying_price": 106384.42, "contracts": 100, "trade_id": "193437640", "fee_currency": "BTC", "order_type": "limit", "risk_reducing": false, "block_trade_leg_count": 2, "liquidity": "T" } ] } ] }
Makers can edit their quotes. This can be done either through a combination of the label and the block_rfq_id or by passing in the block_rfq_quote_id. In the example below the quote price is being updated using a block_rfq_id and a label.
{ "method" : "private/edit_block_rfq_quote", "params" : { "label" : "test", "block_rfq_id" : 1, "amount" : 100, "direction" : "sell", "legs" : [ { "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1, "direction": "buy", "price": 0.04 }, { "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1, "direction": "sell", "price": 0.02 } ], "execution_instruction" : "all_or_none" }, "jsonrpc" : "2.0", "id" : 1 }
Makers can cancel their quotes by passing in either a combination of the block_rfq_id and label or the block_rfq_quote_id.
{ "jsonrpc" : "2.0", "id" : 1, "method" : "private/cancel_block_rfq_quote", "params" : { "block_rfq_quote_id" : 1 } }
Makers can also cancel all of their outstanding quotes using one call. This call optionally takes the parameter block_rfq_id which either cancels all quotes on a specific Block RFQ or, if not provided, cancels quotes on all Block RFQs the maker responded to.
{ "jsonrpc" : "2.0", "id" : 24, "method" : "private/cancel_all_block_rfq_quotes", "params" : { "block_rfq_id" : 1 } }
Members can retrieve information about both active and historical Block RFQs by using the private/get_block_rfqs call where the number of RFQs is specified by the count variable. The Block RFQs can optionally be filtered on state and role. To retrieve information for a single Block RFQ members can fill in the block_rfq_id variable. Active RFQs return the same response as newly created RFQs but with up to date information such as bids and asks. Historical RFQs record the best bid and ask offered at the time the Block RFQ was closed and any trades that occurred as a result of the Block RFQ.
{ "method" : "private/get_block_rfqs", "params" : { "block_rfq_id" : 1 }, "jsonrpc" : "2.0", "id" : 2 }
If the Block RFQ is no longer open the response is structured as follows. To closed Block RFQs we also add an additional parameter included_in_taker_rating for takers which determines whether or not this Block RFQ will count towards their OTV ratio.
{ "jsonrpc": "2.0", "id": 2, "result": { "continuation": null, "block_rfqs": [ { "timestamp": 1738252420844, "state": "filled", "bids": [ { "price": 0.01, "amount": 100, "last_update_timestamp": 1738252318903, "execution_instruction": "all_or_none", "makers": [ "ANONYMOUS" ] } ], "asks": [ { "price": 0.02, "amount": 100, "last_update_timestamp": 1738252285527, "execution_instruction": "all_or_none", "makers": [ "ANONYMOUS" ] } ], "role": "taker", "mark_price": 0.005396142, "amount": 100, "trades": [ { "price": 0.01, "direction": "buy", "amount": 100, "maker": "ANONYMOUS" } ], "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "expiration_timestamp": 1738252585438, "block_rfq_id": 1, "combo_id": "BTC-CS-14FEB25-100000_110000", "disclosed": false, "included_in_taker_rating": true, "makers": [], "min_trade_amount": 0.1, "creation_timestamp": 1738252285438 } ] } }
Only active quote information can be retrieved. Cancelled quotes and quotes on closed Block RFQs are not stored. Also past versions of edited quotes cannot be retrieved. Active quotes can be filtered by block_rfq_id. This parameter is optional and calling the endpoint without it will return all active quotes. Information for a specific quote can also be retrieved using a combination of block_rfq_id and label or block_rfq_quote_id.
{ "jsonrpc" : "2.0", "id" : 1, "method" : "private/get_block_rfq_quotes", "params" : { "block_rfq_id" : 1 } }
{ "jsonrpc": "2.0", "id": 1, "result": [ { "label": "test", "price": 0.01, "direction": "sell", "amount": 100, "legs": [ { "price": 0.03, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "price": 0.02, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "block_rfq_id": 1, "replaced": false, "filled_amount": 0, "last_update_timestamp": 1738254302855, "execution_instruction": "all_or_none", "block_rfq_quote_id": 1, "creation_timestamp": 1738254302855, "quote_state": "open" } ] }
Below public method contains information on trades that resulted from Block RFQs.
{ "method" : "public/get_block_rfq_trades", "params" : { "currency" : "BTC" }, "jsonrpc" : "2.0", "id" : 1 }
Below is an example response of trades coming from this endpoint.
{ "continuation": "1737538194561:4695", "block_rfqs": [ { "id": 1, "timestamp": 1737726042985, "direction": "buy", "bid_price": 0.01, "ask_price": 0.02, "amount": 100, "mark_price": 0.01, "legs": [ { "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 }, { "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 } ], "combo_id": “BTC-CS-14FEB25-100000_110000”, "hedge": "undefined" }, { "id": 4951, "timestamp": 1737724733876, "direction": "sell", "bid_price": -500, "ask_price": null, "amount": 100000, "mark_price": -308.4, "legs": [ { "direction": "buy", "instrument_name": "BTC-31JAN25", "ratio": 1 }, { "direction": "sell", "instrument_name": "BTC-7FEB25", "ratio": 1 } ], "combo_id": null, "hedge": "undefined" } ] }
The call to retrieve a list of all available makers takes no parameters.
{ "method" : "private/get_block_rfq_makers", "params" : { }, "jsonrpc" : "2.0", "id" : 1 }
For members who wish to price the whole structure as opposed to each leg separately we offer a leg pricing endpoint. This endpoint takes in a Block RFQ structure with amounts (as if it is being submitted for the first time) and an aggregate price and returns the legs in the ratio structure and calculated valid prices for each which can be used to quote. Please note this call only works for conventional strategies and returns an error for custom ones.
{ "method": "private/get_leg_prices", "params": { "price": 0.01, "legs": [ { "instrument_name": "BTC-8NOV24-70000-C", "amount": 100, "direction": "buy" }, { "instrument_name": "BTC-8NOV24-72000-C", "amount": 100, "direction": "sell" } ] }, "jsonrpc": "2.0", "id": 1 }
Returned is the ratio structure with a price for each leg. Please note that the returned prices will be valid for Block RFQ tick size not necessarily Deribit’s order book tick sizes in the given instruments.
{ "jsonrpc": "2.0", "id": 1, "result": { "amount": 100, "legs": [ { "price": 0.0475, "direction": "sell", "instrument_name": "BTC-14FEB25-110000-C", "ratio": 1 }, { "price": 0.0575, "direction": "buy", "instrument_name": "BTC-14FEB25-100000-C", "ratio": 1 } ] } }
Block RFQ trades are executed as block trades and appear as such in Deribit’s trade history such as public/get_last_trades_by_currency. Block trades that were executed as part of a Block RFQ also have a block_rfq_id field.
{ "jsonrpc": "2.0", "id": 10, "result": { "trades": [ { "timestamp": 1731580311926, "price": 91314.5, "direction": "buy", "index_price": 91225.89, "instrument_name": "BTC-PERPETUAL", "amount": 18260, "trade_seq": 114040640, "mark_price": 91226, "tick_direction": 1, "contracts": 1826, "trade_id": "192235370" }, { "timestamp": 1731580302276, "iv": 106.47, "price": 0.2, "direction": "sell", "index_price": 91227.09, "instrument_name": "BTC-8NOV24-72000-C", "combo_id": "BTC-CS-8NOV24-70000_72000", "amount": 100, "trade_seq": 231, "mark_price": 0.21684268, "tick_direction": 2, "block_trade_id": "BLOCK-423", "block_rfq_id": 1, "contracts": 100, "trade_id": "192235369", "block_trade_leg_count": 2 }, { "timestamp": 1731580302276, "iv": 107.37, "price": 0.3, "direction": "buy", "index_price": 91227.09, "instrument_name": "BTC-8NOV24-70000-C", "combo_id": "BTC-CS-8NOV24-70000_72000", "amount": 100, "trade_seq": 213, "mark_price": 0.23542917, "tick_direction": 0, "block_trade_id": "BLOCK-423", "block_rfq_id": 1, "contracts": 100, "trade_id": "192235368", "block_trade_leg_count": 2 }, { "timestamp": 1731580301165, "price": 91314.5, "direction": "buy", "index_price": 91227.09, "instrument_name": "BTC-PERPETUAL", "amount": 18260, "trade_seq": 114040639, "mark_price": 91227.32, "tick_direction": 0, "contracts": 1826, "trade_id": "192235367" } ], "has_more": true }, }
Block RFQ supports Market Maker Protection (MMP) with settings and triggers that are managed separately from order book trading. MMP can be configured either via the web interface or using the API. To configure Block RFQ MMP settings and monitor it status, you can use the following WebSocket methods, which support the optional block_rfq
flag:
When the block_rfq
flag is set to true, the methods apply to Block RFQ MMP. When the flag is omitted or set to false
, the methods apply to order book MMP.
To configure the Trade Count trigger for Block RFQ, use index_name=all
in the private/set_mmp_config request.
Example request:
{ "method": "private/set_mmp_config", "params": { "block_rfq": true, "trade_count_limit": 2, "frozen_time": 0, "index_name": "all", "interval": 5 }, "jsonrpc": "2.0", "id": 1 }
In order to receive real-time trigger notifications, subscribe to the user.mmp_trigger.{index_name} channel
-
Use
index_name=any
to receive notifications for all trigger types across currency pairs. -
Use
index_name=all
to receive notifications only for the Trade Count trigger.