Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/private/get_account_summary \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 2515,
  "method": "private/get_account_summary",
  "params": {
    "currency": "BTC",
    "extended": true
  }
}
'
import requests

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

payload = {
"jsonrpc": "2.0",
"id": 2515,
"method": "private/get_account_summary",
"params": {
"currency": "BTC",
"extended": True
}
}
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: 2515,
method: 'private/get_account_summary',
params: {currency: 'BTC', extended: true}
})
};

fetch('https://test.deribit.com/api/v2/private/get_account_summary', 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/get_account_summary",
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' => 2515,
'method' => 'private/get_account_summary',
'params' => [
'currency' => 'BTC',
'extended' => true
]
]),
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/get_account_summary"

payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 2515,\n \"method\": \"private/get_account_summary\",\n \"params\": {\n \"currency\": \"BTC\",\n \"extended\": true\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/get_account_summary")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 2515,\n \"method\": \"private/get_account_summary\",\n \"params\": {\n \"currency\": \"BTC\",\n \"extended\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://test.deribit.com/api/v2/private/get_account_summary")

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\": 2515,\n \"method\": \"private/get_account_summary\",\n \"params\": {\n \"currency\": \"BTC\",\n \"extended\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "jsonrpc": "2.0",
  "id": 2515,
  "result": {
    "delta_total_map": {
      "btc_usd": 31.594357699
    },
    "margin_balance": 302.62729214,
    "futures_session_rpl": -0.03258105,
    "options_session_rpl": 0,
    "estimated_liquidation_ratio_map": {
      "btc_usd": 0.1009872222854525
    },
    "session_upl": 0.05271555,
    "email": "user@example.com",
    "system_name": "user",
    "username": "user",
    "interuser_transfers_enabled": false,
    "id": 10,
    "estimated_liquidation_ratio": 0.10098722,
    "options_gamma_map": {
      "btc_usd": 0.00001
    },
    "options_vega": 0.0858,
    "options_value": -0.0086,
    "available_withdrawal_funds": 301.35396172,
    "projected_delta_total": 32.613978,
    "maintenance_margin": 0.8857841,
    "total_pl": -0.33084225,
    "limits": {
      "limits_per_currency": false,
      "non_matching_engine": {
        "burst": 1500,
        "rate": 1000
      },
      "matching_engine": {
        "trading": {
          "total": {
            "burst": 250,
            "rate": 200
          }
        },
        "spot": {
          "burst": 250,
          "rate": 200
        },
        "quotes": {
          "burst": 500,
          "rate": 500
        },
        "max_quotes": {
          "burst": 10,
          "rate": 10
        },
        "guaranteed_quotes": {
          "burst": 2,
          "rate": 2
        },
        "cancel_all": {
          "burst": 250,
          "rate": 200
        }
      }
    },
    "options_theta_map": {
      "btc_usd": 15.97071
    },
    "projected_maintenance_margin": 0.7543841,
    "available_funds": 301.38059622,
    "login_enabled": false,
    "options_delta": -1.01962,
    "balance": 302.60065765,
    "security_keys_enabled": false,
    "referrer_id": null,
    "mmp_enabled": false,
    "equity": 302.61869214,
    "block_rfq_self_match_prevention": true,
    "futures_session_upl": 0.05921555,
    "fee_balance": 0,
    "currency": "BTC",
    "options_session_upl": -0.0065,
    "projected_initial_margin": 1.01529592,
    "options_theta": 15.97071,
    "creation_timestamp": 1687352432143,
    "self_trading_extended_to_subaccounts": false,
    "portfolio_margining_enabled": false,
    "cross_collateral_enabled": false,
    "margin_model": "segregated_sm",
    "options_vega_map": {
      "btc_usd": 0.0858
    },
    "futures_pl": -0.32434225,
    "options_pl": -0.0065,
    "type": "main",
    "self_trading_reject_mode": "cancel_maker",
    "initial_margin": 1.24669592,
    "spot_reserve": 0,
    "delta_total": 31.602958,
    "options_gamma": 0.00001,
    "session_rpl": -0.03258105,
    "fees": {
      "btc_usd": {
        "option": {
          "default": {
            "type": "relative",
            "taker": 0.625,
            "maker": 0.625
          },
          "block_trade": 0.625
        },
        "perpetual": {
          "default": {
            "type": "fixed",
            "taker": 0.00035000000000000005,
            "maker": -0.0001
          },
          "block_trade": 0.3
        },
        "future": {
          "default": {
            "type": "fixed",
            "taker": 0.00035000000000000005,
            "maker": -0.0001
          },
          "block_trade": 0.3
        }
      }
    }
  }
}

Query Parameters

currency
enum<string>
required

The currency symbol Currency, i.e "BTC", "ETH", "USDC"

Available options:
BTC,
ETH,
STETH,
ETHW,
USDC,
USDT,
EURR,
SOL,
XRP,
USYC,
PAXG,
BNB,
USDE
subaccount_id
integer

The user id for the subaccount

extended
boolean

Include additional fields

Example:

true

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