curl --request GET \
--url https://test.deribit.com/api/v2/private/edit_block_rfq_quote \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "private/edit_block_rfq_quote",
"params": {
"label": "example_quote",
"block_rfq_id": 3,
"amount": 20000,
"direction": "buy",
"legs": [
{
"instrument_name": "BTC-15NOV24",
"price": 74600,
"ratio": "1",
"direction": "buy"
}
],
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"execution_instruction": "any_part_of"
}
}
'import requests
url = "https://test.deribit.com/api/v2/private/edit_block_rfq_quote"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "private/edit_block_rfq_quote",
"params": {
"label": "example_quote",
"block_rfq_id": 3,
"amount": 20000,
"direction": "buy",
"legs": [
{
"instrument_name": "BTC-15NOV24",
"price": 74600,
"ratio": "1",
"direction": "buy"
}
],
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"execution_instruction": "any_part_of"
}
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'private/edit_block_rfq_quote',
params: {
label: 'example_quote',
block_rfq_id: 3,
amount: 20000,
direction: 'buy',
legs: [{instrument_name: 'BTC-15NOV24', price: 74600, ratio: '1', direction: 'buy'}],
hedge: {amount: 10, direction: 'buy', price: 70000, instrument_name: 'BTC-PERPETUAL'},
execution_instruction: 'any_part_of'
}
})
};
fetch('https://test.deribit.com/api/v2/private/edit_block_rfq_quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/private/edit_block_rfq_quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'private/edit_block_rfq_quote',
'params' => [
'label' => 'example_quote',
'block_rfq_id' => 3,
'amount' => 20000,
'direction' => 'buy',
'legs' => [
[
'instrument_name' => 'BTC-15NOV24',
'price' => 74600,
'ratio' => '1',
'direction' => 'buy'
]
],
'hedge' => [
'amount' => 10,
'direction' => 'buy',
'price' => 70000,
'instrument_name' => 'BTC-PERPETUAL'
],
'execution_instruction' => 'any_part_of'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/private/edit_block_rfq_quote"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/private/edit_block_rfq_quote")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/private/edit_block_rfq_quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"label": "example_quote",
"amount": 20000,
"direction": "buy",
"price": 74600,
"legs": [
{
"direction": "buy",
"price": 74600,
"instrument_name": "BTC-15NOV24",
"ratio": 1
}
],
"creation_timestamp": 1731076586371,
"block_rfq_id": 3,
"replaced": true,
"filled_amount": 0,
"last_update_timestamp": 1731076638591,
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"block_rfq_quote_id": 8,
"quote_state": "open"
}
}private/edit_block_rfq_quote
Maker method
Edits a Block RFQ quote using the specified block_rfq_quote_id. Alternatively, you can use a combination of block_rfq_id and label to edit the quote.
Use private/add_block_rfq_quote to add new quotes, or private/cancel_block_rfq_quote to cancel quotes.
๐ Related Article: Deribit Block RFQ API walkthrough
Scope: block_rfq:read_write
curl --request GET \
--url https://test.deribit.com/api/v2/private/edit_block_rfq_quote \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "private/edit_block_rfq_quote",
"params": {
"label": "example_quote",
"block_rfq_id": 3,
"amount": 20000,
"direction": "buy",
"legs": [
{
"instrument_name": "BTC-15NOV24",
"price": 74600,
"ratio": "1",
"direction": "buy"
}
],
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"execution_instruction": "any_part_of"
}
}
'import requests
url = "https://test.deribit.com/api/v2/private/edit_block_rfq_quote"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "private/edit_block_rfq_quote",
"params": {
"label": "example_quote",
"block_rfq_id": 3,
"amount": 20000,
"direction": "buy",
"legs": [
{
"instrument_name": "BTC-15NOV24",
"price": 74600,
"ratio": "1",
"direction": "buy"
}
],
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"execution_instruction": "any_part_of"
}
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'private/edit_block_rfq_quote',
params: {
label: 'example_quote',
block_rfq_id: 3,
amount: 20000,
direction: 'buy',
legs: [{instrument_name: 'BTC-15NOV24', price: 74600, ratio: '1', direction: 'buy'}],
hedge: {amount: 10, direction: 'buy', price: 70000, instrument_name: 'BTC-PERPETUAL'},
execution_instruction: 'any_part_of'
}
})
};
fetch('https://test.deribit.com/api/v2/private/edit_block_rfq_quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/private/edit_block_rfq_quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'private/edit_block_rfq_quote',
'params' => [
'label' => 'example_quote',
'block_rfq_id' => 3,
'amount' => 20000,
'direction' => 'buy',
'legs' => [
[
'instrument_name' => 'BTC-15NOV24',
'price' => 74600,
'ratio' => '1',
'direction' => 'buy'
]
],
'hedge' => [
'amount' => 10,
'direction' => 'buy',
'price' => 70000,
'instrument_name' => 'BTC-PERPETUAL'
],
'execution_instruction' => 'any_part_of'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/private/edit_block_rfq_quote"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/private/edit_block_rfq_quote")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/private/edit_block_rfq_quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"private/edit_block_rfq_quote\",\n \"params\": {\n \"label\": \"example_quote\",\n \"block_rfq_id\": 3,\n \"amount\": 20000,\n \"direction\": \"buy\",\n \"legs\": [\n {\n \"instrument_name\": \"BTC-15NOV24\",\n \"price\": 74600,\n \"ratio\": \"1\",\n \"direction\": \"buy\"\n }\n ],\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"price\": 70000,\n \"instrument_name\": \"BTC-PERPETUAL\"\n },\n \"execution_instruction\": \"any_part_of\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"label": "example_quote",
"amount": 20000,
"direction": "buy",
"price": 74600,
"legs": [
{
"direction": "buy",
"price": 74600,
"instrument_name": "BTC-15NOV24",
"ratio": 1
}
],
"creation_timestamp": 1731076586371,
"block_rfq_id": 3,
"replaced": true,
"filled_amount": 0,
"last_update_timestamp": 1731076638591,
"hedge": {
"amount": 10,
"direction": "buy",
"price": 70000,
"instrument_name": "BTC-PERPETUAL"
},
"block_rfq_quote_id": 8,
"quote_state": "open"
}
}Query Parameters
List of legs used for Block RFQ quote
Hide child attributes
Hide child attributes
This value multiplied by the ratio of a leg gives trade size on that leg. 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.
ID of the Block RFQ quote
User defined label for the Block RFQ quote (maximum 64 characters). Used to identify quotes of a selected Block RFQ
Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ JSON string containing: instrument_name, direction, price, amount
ID of the Block RFQ
Aggregated price used for quoting future spreads.
Response
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Hide child attributes
The timestamp when quote was created (milliseconds since the Unix epoch)
1536569522277
Timestamp of the last update of the quote (milliseconds since the UNIX epoch)
1536569522277
ID of the Block RFQ
ID of the Block RFQ quote
State of the quote
Execution instruction of the quote. Default - any_part_of
"all_or_none (AON)"- The quote can only be filled entirely or not at all, ensuring that its amount matches the amount specified in the Block RFQ. Additionally, 'all_or_none' quotes have priority over 'any_part_of' quotes at the same price level."any_part_of (APO)"- The quote can be filled either partially or fully, with the filled amount potentially being less than the Block RFQ amount.
any_part_of, all_or_none Price of a quote
This value multiplied by the ratio of a leg gives trade size on that leg.
Direction of trade from the maker perspective
buy, sell Filled amount of the quote. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH.
Hide child attributes
Hide child attributes
It represents the requested hedge leg size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
Unique instrument identifier
"BTC-PERPETUAL"
Direction: buy, or sell
buy, sell Price for a hedge leg
true if the quote was edited, otherwise false.
User defined label for the quote (maximum 64 characters)
The name of the application that placed the quote on behalf of the user (optional).
"Example Application"
Reason of quote cancellation
The id that was sent in the request
Was this page helpful?