curl --request GET \
--url https://drb.coinbase.com/api/v2/private/create_block_rfq \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "private/create_block_rfq",
"params": {
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"amount": 20000,
"direction": "sell",
"instrument_name": "BTC-15NOV24"
}
],
"makers": [
"MAKER1"
]
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/create_block_rfq"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "private/create_block_rfq",
"params": {
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"amount": 20000,
"direction": "sell",
"instrument_name": "BTC-15NOV24"
}
],
"makers": ["MAKER1"]
}
}
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({
id: 1,
jsonrpc: '2.0',
method: 'private/create_block_rfq',
params: {
hedge: {amount: 10, direction: 'buy', instrument_name: 'BTC-PERPETUAL', price: 70000},
label: 'example',
legs: [{amount: 20000, direction: 'sell', instrument_name: 'BTC-15NOV24'}],
makers: ['MAKER1']
}
})
};
fetch('https://drb.coinbase.com/api/v2/private/create_block_rfq', 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://drb.coinbase.com/api/v2/private/create_block_rfq",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'private/create_block_rfq',
'params' => [
'hedge' => [
'amount' => 10,
'direction' => 'buy',
'instrument_name' => 'BTC-PERPETUAL',
'price' => 70000
],
'label' => 'example',
'legs' => [
[
'amount' => 20000,
'direction' => 'sell',
'instrument_name' => 'BTC-15NOV24'
]
],
'makers' => [
'MAKER1'
]
]
]),
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://drb.coinbase.com/api/v2/private/create_block_rfq"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\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://drb.coinbase.com/api/v2/private/create_block_rfq")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/create_block_rfq")
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 \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"amount": 20000,
"asks": [],
"bids": [],
"block_rfq_id": 507,
"combo_id": "BTC-15NOV24",
"creation_timestamp": 1731062187555,
"expiration_timestamp": 1731062487555,
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"direction": "sell",
"instrument_name": "BTC-15NOV24",
"ratio": 1
}
],
"makers": [
"MAKER1"
],
"role": "taker",
"state": "created"
}
}private/create_block_rfq
Taker method
Creates a new Block RFQ. Use private/get_block_rfqs to retrieve Block RFQ information.
Block RFQ pre-allocation: The taker can split the total amount between different (sub)accounts using the trade_allocations parameter. The taker can also allocate to himself. Each allocation must specify either user_id (for direct allocation) or client_info object (for broker allocation), and amount.
📖 Related Article: Deribit Block RFQ API walkthrough
Scope: rat#trade or wallet:buys:create
curl --request GET \
--url https://drb.coinbase.com/api/v2/private/create_block_rfq \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "private/create_block_rfq",
"params": {
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"amount": 20000,
"direction": "sell",
"instrument_name": "BTC-15NOV24"
}
],
"makers": [
"MAKER1"
]
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/create_block_rfq"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "private/create_block_rfq",
"params": {
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"amount": 20000,
"direction": "sell",
"instrument_name": "BTC-15NOV24"
}
],
"makers": ["MAKER1"]
}
}
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({
id: 1,
jsonrpc: '2.0',
method: 'private/create_block_rfq',
params: {
hedge: {amount: 10, direction: 'buy', instrument_name: 'BTC-PERPETUAL', price: 70000},
label: 'example',
legs: [{amount: 20000, direction: 'sell', instrument_name: 'BTC-15NOV24'}],
makers: ['MAKER1']
}
})
};
fetch('https://drb.coinbase.com/api/v2/private/create_block_rfq', 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://drb.coinbase.com/api/v2/private/create_block_rfq",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'private/create_block_rfq',
'params' => [
'hedge' => [
'amount' => 10,
'direction' => 'buy',
'instrument_name' => 'BTC-PERPETUAL',
'price' => 70000
],
'label' => 'example',
'legs' => [
[
'amount' => 20000,
'direction' => 'sell',
'instrument_name' => 'BTC-15NOV24'
]
],
'makers' => [
'MAKER1'
]
]
]),
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://drb.coinbase.com/api/v2/private/create_block_rfq"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\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://drb.coinbase.com/api/v2/private/create_block_rfq")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/create_block_rfq")
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 \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/create_block_rfq\",\n \"params\": {\n \"hedge\": {\n \"amount\": 10,\n \"direction\": \"buy\",\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"price\": 70000\n },\n \"label\": \"example\",\n \"legs\": [\n {\n \"amount\": 20000,\n \"direction\": \"sell\",\n \"instrument_name\": \"BTC-15NOV24\"\n }\n ],\n \"makers\": [\n \"MAKER1\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"amount": 20000,
"asks": [],
"bids": [],
"block_rfq_id": 507,
"combo_id": "BTC-15NOV24",
"creation_timestamp": 1731062187555,
"expiration_timestamp": 1731062487555,
"hedge": {
"amount": 10,
"direction": "buy",
"instrument_name": "BTC-PERPETUAL",
"price": 70000
},
"label": "example",
"legs": [
{
"direction": "sell",
"instrument_name": "BTC-15NOV24",
"ratio": 1
}
],
"makers": [
"MAKER1"
],
"role": "taker",
"state": "created"
}
}Query Parameters
List of legs used to create Block RFQ
Show child attributes
Show child attributes
List of allocations for Block RFQ pre-allocation. Allows to split amount between different (sub)accounts or broker clients. Each allocation must specify either user_id (for direct allocation) or client_info object (for broker allocation), and amount.
Show child attributes
Show child attributes
Hedge leg of the Block RFQ. There is only one hedge leg allowed per Block RFQ JSON string containing: instrument_name, direction, price, amount
User defined label for the Block RFQ (maximum 64 characters)
List of targeted Block RFQ makers. Only those makers will be notified about created Block RFQ. If the list is empty, all available makers will be targeted.
Determines whether the RFQ is non-anonymous, revealing both taker and maker aliases. It can be set to false (anonymous mode) only when at least 5 makers are targeted. Default value is true.
Was this page helpful?