Skip to main content
cURL
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
        }
      }
    ]
  }
}
'
import requests

url = "https://test.deribit.com/api/v2/private/mass_quote"

payload = {
"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
}
}
]
}
}
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: 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}
}
]
}
})
};

fetch('https://test.deribit.com/api/v2/private/mass_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/mass_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' => 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
]
]
]
]
]),
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/mass_quote"

payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 7859,\n \"method\": \"private/mass_quote\",\n \"params\": {\n \"detailed\": true,\n \"quote_id\": \"1\",\n \"mmp_group\": \"default\",\n \"quotes\": [\n {\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"quote_set_id\": \"futures\",\n \"ask\": {\n \"price\": 43800,\n \"amount\": 10\n },\n \"bid\": {\n \"price\": 43700,\n \"amount\": 10\n }\n },\n {\n \"instrument_name\": \"BTC-22DEC23-41600-C\",\n \"quote_set_id\": \"options\",\n \"ask\": {\n \"price\": 0.05,\n \"amount\": 1\n },\n \"bid\": {\n \"price\": 0.04,\n \"amount\": 1\n }\n }\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://test.deribit.com/api/v2/private/mass_quote")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 7859,\n \"method\": \"private/mass_quote\",\n \"params\": {\n \"detailed\": true,\n \"quote_id\": \"1\",\n \"mmp_group\": \"default\",\n \"quotes\": [\n {\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"quote_set_id\": \"futures\",\n \"ask\": {\n \"price\": 43800,\n \"amount\": 10\n },\n \"bid\": {\n \"price\": 43700,\n \"amount\": 10\n }\n },\n {\n \"instrument_name\": \"BTC-22DEC23-41600-C\",\n \"quote_set_id\": \"options\",\n \"ask\": {\n \"price\": 0.05,\n \"amount\": 1\n },\n \"bid\": {\n \"price\": 0.04,\n \"amount\": 1\n }\n }\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://test.deribit.com/api/v2/private/mass_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\": 7859,\n \"method\": \"private/mass_quote\",\n \"params\": {\n \"detailed\": true,\n \"quote_id\": \"1\",\n \"mmp_group\": \"default\",\n \"quotes\": [\n {\n \"instrument_name\": \"BTC-PERPETUAL\",\n \"quote_set_id\": \"futures\",\n \"ask\": {\n \"price\": 43800,\n \"amount\": 10\n },\n \"bid\": {\n \"price\": 43700,\n \"amount\": 10\n }\n },\n {\n \"instrument_name\": \"BTC-22DEC23-41600-C\",\n \"quote_set_id\": \"options\",\n \"ask\": {\n \"price\": 0.05,\n \"amount\": 1\n },\n \"bid\": {\n \"price\": 0.04,\n \"amount\": 1\n }\n }\n ]\n }\n}"

response = http.request(request)
puts response.read_body
{
  "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": []
  }
}

Query Parameters

wait_for_response
boolean

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.

detailed
boolean

Flag to receive a list of all order changes and a list of errors, or to only receive a list of errors. Default - false.

Example:

true

quote_id
string
required

Identifier of a mass quote message. Can be used to match trades to requests. We recommend using an incrementing counter.

Example:

"1"

mmp_group
string
required

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.

Example:

"default"

valid_until
integer

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.

quotes
object[]
required

List of quotes.

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 }
}
]

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object
required
id
integer

The id that was sent in the request