cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/private/get_account_summaries \
--header 'Content-Type: application/json' \
--data '
{
"id": 2515,
"jsonrpc": "2.0",
"method": "private/get_account_summaries",
"params": {
"extended": true
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/get_account_summaries"
payload = {
"id": 2515,
"jsonrpc": "2.0",
"method": "private/get_account_summaries",
"params": { "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({
id: 2515,
jsonrpc: '2.0',
method: 'private/get_account_summaries',
params: {extended: true}
})
};
fetch('https://drb.coinbase.com/api/v2/private/get_account_summaries', 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/get_account_summaries",
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' => 2515,
'jsonrpc' => '2.0',
'method' => 'private/get_account_summaries',
'params' => [
'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://drb.coinbase.com/api/v2/private/get_account_summaries"
payload := strings.NewReader("{\n \"id\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\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://drb.coinbase.com/api/v2/private/get_account_summaries")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\n \"extended\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/get_account_summaries")
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\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\n \"extended\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 2515,
"jsonrpc": "2.0",
"result": {
"block_rfq_self_match_prevention": true,
"creation_timestamp": 1687352432143,
"email": "user@example.com",
"id": 10,
"interuser_transfers_enabled": false,
"login_enabled": false,
"mmp_enabled": false,
"referrer_id": null,
"security_keys_enabled": false,
"self_trading_extended_to_subaccounts": false,
"self_trading_reject_mode": "cancel_maker",
"summaries": [
{
"available_funds": 301.38059622,
"available_withdrawal_funds": 301.35396172,
"balance": 302.60065765,
"cross_collateral_enabled": false,
"currency": "BTC",
"delta_total": 31.602958,
"delta_total_map": {
"btc_usd": 31.594357699
},
"equity": 302.61869214,
"estimated_liquidation_ratio": 0.10098722,
"estimated_liquidation_ratio_map": {
"btc_usd": 0.1009872222854525
},
"fee_balance": 0,
"fees": {
"btc_usd": {
"future": {
"block_trade": 0.3,
"default": {
"maker": -0.0001,
"taker": 0.00035000000000000005,
"type": "fixed"
}
},
"option": {
"block_trade": 0.625,
"default": {
"maker": 0.625,
"taker": 0.625,
"type": "relative"
}
},
"perpetual": {
"block_trade": 0.3,
"default": {
"maker": -0.0001,
"taker": 0.00035000000000000005,
"type": "fixed"
}
}
}
},
"futures_pl": -0.32434225,
"futures_session_rpl": -0.03258105,
"futures_session_upl": 0.05921555,
"initial_margin": 1.24669592,
"limits": {
"limits_per_currency": false,
"matching_engine": {
"cancel_all": {
"burst": 250,
"rate": 200
},
"guaranteed_quotes": {
"burst": 2,
"rate": 2
},
"max_quotes": {
"burst": 10,
"rate": 10
},
"quotes": {
"burst": 500,
"rate": 500
},
"spot": {
"burst": 250,
"rate": 200
},
"trading": {
"total": {
"burst": 250,
"rate": 200
}
}
},
"non_matching_engine": {
"burst": 1500,
"rate": 1000
}
},
"maintenance_margin": 0.8857841,
"margin_balance": 302.62729214,
"margin_model": "segregated_sm",
"options_delta": -1.01962,
"options_gamma": 0.00001,
"options_gamma_map": {
"btc_usd": 0.00001
},
"options_pl": -0.0065,
"options_session_rpl": 0,
"options_session_upl": -0.0065,
"options_theta": 15.97071,
"options_value": -0.0086,
"options_vega": 0.0858,
"options_vega_map": {
"btc_usd": 0.0858
},
"portfolio_margining_enabled": false,
"projected_delta_total": 32.613978,
"projected_initial_margin": 1.01529592,
"projected_maintenance_margin": 0.7543841,
"session_rpl": -0.03258105,
"session_upl": 0.05271555,
"spot_reserve": 0,
"total_pl": -0.33084225
},
{
"additional_reserve": 0,
"available_funds": 99.999598,
"available_withdrawal_funds": 99.999597,
"balance": 100,
"cross_collateral_enabled": false,
"currency": "ETH",
"delta_total": 0,
"delta_total_map": {
"eth_usd": 0
},
"equity": 100,
"estimated_liquidation_ratio": 0,
"estimated_liquidation_ratio_map": {
"eth_usd": 0
},
"fee_balance": 0,
"fees": {
"eth_usd": {
"future": {
"block_trade": 0.2,
"default": {
"maker": -0.00005,
"taker": 0.00025,
"type": "fixed"
}
},
"option": {
"block_trade": 0.5,
"default": {
"maker": 0.5,
"taker": 0.5,
"type": "relative"
}
},
"perpetual": {
"block_trade": 0.2,
"default": {
"maker": -0.00005,
"taker": 0.00025,
"type": "fixed"
}
}
}
},
"futures_pl": 0,
"futures_session_rpl": 0,
"futures_session_upl": 0,
"initial_margin": 0.000402,
"limits": {
"limits_per_currency": false,
"matching_engine": {
"cancel_all": {
"burst": 250,
"rate": 200
},
"guaranteed_quotes": {
"burst": 2,
"rate": 2
},
"max_quotes": {
"burst": 10,
"rate": 10
},
"quotes": {
"burst": 500,
"rate": 500
},
"spot": {
"burst": 250,
"rate": 200
},
"trading": {
"total": {
"burst": 250,
"rate": 200
}
}
},
"non_matching_engine": {
"burst": 1500,
"rate": 1000
}
},
"maintenance_margin": 0,
"margin_balance": 100,
"margin_model": "segregated_sm",
"options_delta": 0,
"options_gamma": 0,
"options_gamma_map": {},
"options_pl": 0,
"options_session_rpl": 0,
"options_session_upl": 0,
"options_theta": 0,
"options_theta_map": {},
"options_value": 0,
"options_vega": 0,
"options_vega_map": {},
"portfolio_margining_enabled": false,
"projected_delta_total": 0,
"projected_initial_margin": 0.0002,
"projected_maintenance_margin": 0,
"session_rpl": 0,
"session_upl": 0,
"spot_reserve": 0.0002,
"total_pl": 0
}
],
"system_name": "user",
"type": "main",
"username": "user"
}
}Account Management
private/get_account_summaries
Retrieves a per-currency list of account summaries for the authenticated user. Each summary includes balance, equity, available funds, and margin information for each currency.
To retrieve summaries for a specific subaccount, use the subaccount_id parameter. When the extended parameter is set to true, additional account details such as account ID, username, email, and account type are included.
Scope: rat#view or wallet:accounts:read
GET
/
private
/
get_account_summaries
cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/private/get_account_summaries \
--header 'Content-Type: application/json' \
--data '
{
"id": 2515,
"jsonrpc": "2.0",
"method": "private/get_account_summaries",
"params": {
"extended": true
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/get_account_summaries"
payload = {
"id": 2515,
"jsonrpc": "2.0",
"method": "private/get_account_summaries",
"params": { "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({
id: 2515,
jsonrpc: '2.0',
method: 'private/get_account_summaries',
params: {extended: true}
})
};
fetch('https://drb.coinbase.com/api/v2/private/get_account_summaries', 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/get_account_summaries",
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' => 2515,
'jsonrpc' => '2.0',
'method' => 'private/get_account_summaries',
'params' => [
'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://drb.coinbase.com/api/v2/private/get_account_summaries"
payload := strings.NewReader("{\n \"id\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\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://drb.coinbase.com/api/v2/private/get_account_summaries")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\n \"extended\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/get_account_summaries")
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\": 2515,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_account_summaries\",\n \"params\": {\n \"extended\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 2515,
"jsonrpc": "2.0",
"result": {
"block_rfq_self_match_prevention": true,
"creation_timestamp": 1687352432143,
"email": "user@example.com",
"id": 10,
"interuser_transfers_enabled": false,
"login_enabled": false,
"mmp_enabled": false,
"referrer_id": null,
"security_keys_enabled": false,
"self_trading_extended_to_subaccounts": false,
"self_trading_reject_mode": "cancel_maker",
"summaries": [
{
"available_funds": 301.38059622,
"available_withdrawal_funds": 301.35396172,
"balance": 302.60065765,
"cross_collateral_enabled": false,
"currency": "BTC",
"delta_total": 31.602958,
"delta_total_map": {
"btc_usd": 31.594357699
},
"equity": 302.61869214,
"estimated_liquidation_ratio": 0.10098722,
"estimated_liquidation_ratio_map": {
"btc_usd": 0.1009872222854525
},
"fee_balance": 0,
"fees": {
"btc_usd": {
"future": {
"block_trade": 0.3,
"default": {
"maker": -0.0001,
"taker": 0.00035000000000000005,
"type": "fixed"
}
},
"option": {
"block_trade": 0.625,
"default": {
"maker": 0.625,
"taker": 0.625,
"type": "relative"
}
},
"perpetual": {
"block_trade": 0.3,
"default": {
"maker": -0.0001,
"taker": 0.00035000000000000005,
"type": "fixed"
}
}
}
},
"futures_pl": -0.32434225,
"futures_session_rpl": -0.03258105,
"futures_session_upl": 0.05921555,
"initial_margin": 1.24669592,
"limits": {
"limits_per_currency": false,
"matching_engine": {
"cancel_all": {
"burst": 250,
"rate": 200
},
"guaranteed_quotes": {
"burst": 2,
"rate": 2
},
"max_quotes": {
"burst": 10,
"rate": 10
},
"quotes": {
"burst": 500,
"rate": 500
},
"spot": {
"burst": 250,
"rate": 200
},
"trading": {
"total": {
"burst": 250,
"rate": 200
}
}
},
"non_matching_engine": {
"burst": 1500,
"rate": 1000
}
},
"maintenance_margin": 0.8857841,
"margin_balance": 302.62729214,
"margin_model": "segregated_sm",
"options_delta": -1.01962,
"options_gamma": 0.00001,
"options_gamma_map": {
"btc_usd": 0.00001
},
"options_pl": -0.0065,
"options_session_rpl": 0,
"options_session_upl": -0.0065,
"options_theta": 15.97071,
"options_value": -0.0086,
"options_vega": 0.0858,
"options_vega_map": {
"btc_usd": 0.0858
},
"portfolio_margining_enabled": false,
"projected_delta_total": 32.613978,
"projected_initial_margin": 1.01529592,
"projected_maintenance_margin": 0.7543841,
"session_rpl": -0.03258105,
"session_upl": 0.05271555,
"spot_reserve": 0,
"total_pl": -0.33084225
},
{
"additional_reserve": 0,
"available_funds": 99.999598,
"available_withdrawal_funds": 99.999597,
"balance": 100,
"cross_collateral_enabled": false,
"currency": "ETH",
"delta_total": 0,
"delta_total_map": {
"eth_usd": 0
},
"equity": 100,
"estimated_liquidation_ratio": 0,
"estimated_liquidation_ratio_map": {
"eth_usd": 0
},
"fee_balance": 0,
"fees": {
"eth_usd": {
"future": {
"block_trade": 0.2,
"default": {
"maker": -0.00005,
"taker": 0.00025,
"type": "fixed"
}
},
"option": {
"block_trade": 0.5,
"default": {
"maker": 0.5,
"taker": 0.5,
"type": "relative"
}
},
"perpetual": {
"block_trade": 0.2,
"default": {
"maker": -0.00005,
"taker": 0.00025,
"type": "fixed"
}
}
}
},
"futures_pl": 0,
"futures_session_rpl": 0,
"futures_session_upl": 0,
"initial_margin": 0.000402,
"limits": {
"limits_per_currency": false,
"matching_engine": {
"cancel_all": {
"burst": 250,
"rate": 200
},
"guaranteed_quotes": {
"burst": 2,
"rate": 2
},
"max_quotes": {
"burst": 10,
"rate": 10
},
"quotes": {
"burst": 500,
"rate": 500
},
"spot": {
"burst": 250,
"rate": 200
},
"trading": {
"total": {
"burst": 250,
"rate": 200
}
}
},
"non_matching_engine": {
"burst": 1500,
"rate": 1000
}
},
"maintenance_margin": 0,
"margin_balance": 100,
"margin_model": "segregated_sm",
"options_delta": 0,
"options_gamma": 0,
"options_gamma_map": {},
"options_pl": 0,
"options_session_rpl": 0,
"options_session_upl": 0,
"options_theta": 0,
"options_theta_map": {},
"options_value": 0,
"options_vega": 0,
"options_vega_map": {},
"portfolio_margining_enabled": false,
"projected_delta_total": 0,
"projected_initial_margin": 0.0002,
"projected_maintenance_margin": 0,
"session_rpl": 0,
"session_upl": 0,
"spot_reserve": 0.0002,
"total_pl": 0
}
],
"system_name": "user",
"type": "main",
"username": "user"
}
}Query Parameters
The user id for the subaccount
Include additional fields
Example:
true
Was this page helpful?
⌘I