curl --request GET \
--url https://test.deribit.com/api/v2/public/get_contract_sizeimport requests
url = "https://test.deribit.com/api/v2/public/get_contract_size"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://test.deribit.com/api/v2/public/get_contract_size', 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/public/get_contract_size",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_contract_size"
req, _ := http.NewRequest("GET", url, nil)
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/public/get_contract_size")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_contract_size")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"contract_size": 10
},
"id": 123
}public/get_contract_size
Retrieves the contract size (also known as contract multiplier) for a given instrument. The contract size is the value of one contract, expressed in the same unit as the order amount: USD for inverse (reversed) futures and perpetuals, and the base currency coin for options, spots, and linear futures and perpetuals.
This value is essential for calculating position values, margin requirements, and P&L calculations. Different instruments may have different contract sizes.
This is not the quantity increment used to validate order amounts. Use min_trade_amount from public/get_instrument / public/get_instruments. On Starbase the same increment is named qty_tick_size. contract_size and min_trade_amount are not guaranteed to match.
curl --request GET \
--url https://test.deribit.com/api/v2/public/get_contract_sizeimport requests
url = "https://test.deribit.com/api/v2/public/get_contract_size"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://test.deribit.com/api/v2/public/get_contract_size', 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/public/get_contract_size",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_contract_size"
req, _ := http.NewRequest("GET", url, nil)
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/public/get_contract_size")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_contract_size")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"contract_size": 10
},
"id": 123
}Query Parameters
Instrument name Unique instrument identifier
"BTC-PERPETUAL"
Response
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Hide child attributes
Contract size for the instrument, expressed in the same unit as the order amount. For inverse (reversed) futures and perpetuals this is USD — BTC-PERPETUAL has a contract size of 10 USD. For options, spots, and for linear futures and perpetuals it is the base currency coin — BTC_USDC-PERPETUAL has a contract size of 0.0001 BTC. Note that on an inverse instrument base_currency identifies the underlying and settlement coin and does not indicate the unit of contract_size.
Distinct from min_trade_amount. contract_size converts between amount and contracts. Starbase matching uses the quantity increment, which JSON-RPC exposes as min_trade_amount (Starbase REST name: qty_tick_size). The two values may currently coincide on some instruments, but that is not a guarantee.
10
The id that was sent in the request
Was this page helpful?