cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument \
--header 'Content-Type: application/json' \
--data '
{
"id": 3659,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_instrument",
"params": {
"instrument_name": "ETH-22FEB19-140-P"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument"
payload = {
"id": 3659,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_instrument",
"params": { "instrument_name": "ETH-22FEB19-140-P" }
}
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: 3659,
jsonrpc: '2.0',
method: 'public/get_book_summary_by_instrument',
params: {instrument_name: 'ETH-22FEB19-140-P'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument', 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_instrument",
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' => 3659,
'jsonrpc' => '2.0',
'method' => 'public/get_book_summary_by_instrument',
'params' => [
'instrument_name' => 'ETH-22FEB19-140-P'
]
]),
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_instrument"
payload := strings.NewReader("{\n \"id\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\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_instrument")
.header("Content-Type", "application/json")
.body("{\n \"id\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument")
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\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\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_instrument
Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, mark price, and other market statistics for a specific instrument.
This method provides a quick overview of current market activity and liquidity for a single instrument.
GET
/
public
/
get_book_summary_by_instrument
cURL
curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument \
--header 'Content-Type: application/json' \
--data '
{
"id": 3659,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_instrument",
"params": {
"instrument_name": "ETH-22FEB19-140-P"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument"
payload = {
"id": 3659,
"jsonrpc": "2.0",
"method": "public/get_book_summary_by_instrument",
"params": { "instrument_name": "ETH-22FEB19-140-P" }
}
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: 3659,
jsonrpc: '2.0',
method: 'public/get_book_summary_by_instrument',
params: {instrument_name: 'ETH-22FEB19-140-P'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument', 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_instrument",
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' => 3659,
'jsonrpc' => '2.0',
'method' => 'public/get_book_summary_by_instrument',
'params' => [
'instrument_name' => 'ETH-22FEB19-140-P'
]
]),
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_instrument"
payload := strings.NewReader("{\n \"id\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\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_instrument")
.header("Content-Type", "application/json")
.body("{\n \"id\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/public/get_book_summary_by_instrument")
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\": 3659,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_book_summary_by_instrument\",\n \"params\": {\n \"instrument_name\": \"ETH-22FEB19-140-P\"\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
Instrument name Unique instrument identifier
Example:
"BTC-PERPETUAL"
Was this page helpful?
⌘I