cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency \
--header 'Content-Type: application/json' \
--data '
{
"id": 9344,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_currency",
"params": {
"currency": "BTC",
"kind": "future"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency"
payload = {
"id": 9344,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_currency",
"params": {
"currency": "BTC",
"kind": "future"
}
}
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: 9344,
jsonrpc: '2.0',
method: 'public/get_book_summary_by_currency',
params: {currency: 'BTC', kind: 'future'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency', 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/public/get_book_summary_by_currency",
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' => 9344,
'jsonrpc' => '2.0',
'method' => 'public/get_book_summary_by_currency',
'params' => [
'currency' => 'BTC',
'kind' => 'future'
]
]),
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/public/get_book_summary_by_currency"
payload := strings.NewReader("{\n \"id\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\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/public/get_book_summary_by_currency")
.header("Content-Type", "application/json")
.body("{\n \"id\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency")
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\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 3659,
"jsonrpc": "2.0",
"result": [
{
"ask_price": 0.34,
"base_currency": "ETH",
"bid_price": 0.1488,
"creation_timestamp": 1550227952163,
"high": 0.34,
"instrument_name": "ETH-22FEB19-140-P",
"interest_rate": 0.207,
"last": 0.34,
"low": 0.34,
"mark_price": 80,
"mid_price": 0.2444,
"open_interest": 0.55,
"price_change": -26.7793594,
"quote_currency": "USD",
"underlying_index": "index_price",
"underlying_price": 121.38,
"volume": 0.55
}
]
}Market Data
public/get_book_summary_by_currency
Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, and other market statistics for all instruments in a given currency.
Results can be filtered by instrument kind (future, option, etc.). This method provides a quick overview of market activity across all instruments for a currency.
Note: For real-time updates, we recommend using the WebSocket subscription to ticker.{instrument_name}.{interval} instead of polling this endpoint.
GET
/
public
/
get_book_summary_by_currency
cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency \
--header 'Content-Type: application/json' \
--data '
{
"id": 9344,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_currency",
"params": {
"currency": "BTC",
"kind": "future"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency"
payload = {
"id": 9344,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_currency",
"params": {
"currency": "BTC",
"kind": "future"
}
}
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: 9344,
jsonrpc: '2.0',
method: 'public/get_book_summary_by_currency',
params: {currency: 'BTC', kind: 'future'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency', 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/public/get_book_summary_by_currency",
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' => 9344,
'jsonrpc' => '2.0',
'method' => 'public/get_book_summary_by_currency',
'params' => [
'currency' => 'BTC',
'kind' => 'future'
]
]),
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/public/get_book_summary_by_currency"
payload := strings.NewReader("{\n \"id\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\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/public/get_book_summary_by_currency")
.header("Content-Type", "application/json")
.body("{\n \"id\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/public/get_book_summary_by_currency")
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\": 9344,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_currency\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 3659,
"jsonrpc": "2.0",
"result": [
{
"ask_price": 0.34,
"base_currency": "ETH",
"bid_price": 0.1488,
"creation_timestamp": 1550227952163,
"high": 0.34,
"instrument_name": "ETH-22FEB19-140-P",
"interest_rate": 0.207,
"last": 0.34,
"low": 0.34,
"mark_price": 80,
"mid_price": 0.2444,
"open_interest": 0.55,
"price_change": -26.7793594,
"quote_currency": "USD",
"underlying_index": "index_price",
"underlying_price": 121.38,
"volume": 0.55
}
]
}Query Parameters
The currency symbol
Currency, i.e "BTC", "ETH", "USDC"
Available options:
BTC, ETH, USDC, USDT, EURR Instrument kind, if not provided instruments of all kinds are considered
Instrument kind: "future", "option", "spot", "future_combo", "option_combo"
Available options:
future, option, spot, future_combo, option_combo Was this page helpful?
⌘I