curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_instruments \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "public/get_instruments",
"params": {
"currency": "BTC",
"kind": "future"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_instruments"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "public/get_instruments",
"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: 1,
jsonrpc: '2.0',
method: 'public/get_instruments',
params: {currency: 'BTC', kind: 'future'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_instruments', 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_instruments",
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' => 1,
'jsonrpc' => '2.0',
'method' => 'public/get_instruments',
'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_instruments"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\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_instruments")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\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_instruments")
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\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"base_currency": "BTC",
"block_trade_commission": 0.00025,
"block_trade_min_trade_amount": 200000,
"block_trade_tick_size": 0.01,
"contract_size": 10,
"counter_currency": "USD",
"creation_timestamp": 1664524802000,
"expiration_timestamp": 1695974400000,
"index_id": 1000033,
"instrument_id": 138583,
"instrument_name": "BTC-29SEP23",
"instrument_type": "reversed",
"is_active": true,
"kind": "future",
"lot_size": 1,
"maker_commission": 0,
"max_leverage": 50,
"max_liquidation_commission": 0.0075,
"min_trade_amount": 10,
"price_index": "btc_usd",
"product_group": "BTC",
"qty_tick_size": 10,
"quote_currency": "USD",
"settlement_currency": "BTC",
"settlement_period": "month",
"state": "open",
"taker_commission": 0.0005,
"tick_size": 2.5,
"tick_size_steps": [],
"underlying_type": "crypto"
},
{
"base_currency": "BTC",
"block_trade_commission": 0.00025,
"block_trade_min_trade_amount": 200000,
"block_trade_tick_size": 0.01,
"contract_size": 10,
"counter_currency": "USD",
"creation_timestamp": 1534167754000,
"expiration_timestamp": 32503708800000,
"index_id": 1000033,
"instrument_id": 124972,
"instrument_name": "BTC-PERPETUAL",
"instrument_type": "reversed",
"is_active": true,
"kind": "future",
"lot_size": 1,
"maker_commission": 0,
"max_leverage": 50,
"max_liquidation_commission": 0.0075,
"min_trade_amount": 10,
"price_index": "btc_usd",
"product_group": "BTC",
"qty_tick_size": 10,
"quote_currency": "USD",
"settlement_currency": "BTC",
"settlement_period": "perpetual",
"state": "open",
"taker_commission": 0.0005,
"tick_size": 0.5,
"tick_size_steps": [],
"underlying_type": "crypto"
}
]
}public/get_instruments
Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have recently expired.
Note - This method has distinct API rate limiting requirements: Sustained rate: 1 request/second. To avoid rate limits, we recommend using either the REST requests for server-cached data or the WebSocket subscription to instrument_state.. for real-time updates. For more information, see Rate Limits.
Results can be filtered by currency and instrument kind (future, option, etc.). Set the expired parameter to true to retrieve recently expired instruments instead of active ones. Each instrument includes the underlying_type field indicating the underlying asset class (such as crypto, equity, or commodity).
curl --request GET \
--url https://drb.coinbase.com/api/v2/public/get_instruments \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "public/get_instruments",
"params": {
"currency": "BTC",
"kind": "future"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/public/get_instruments"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "public/get_instruments",
"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: 1,
jsonrpc: '2.0',
method: 'public/get_instruments',
params: {currency: 'BTC', kind: 'future'}
})
};
fetch('https://drb.coinbase.com/api/v2/public/get_instruments', 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_instruments",
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' => 1,
'jsonrpc' => '2.0',
'method' => 'public/get_instruments',
'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_instruments"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\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_instruments")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\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_instruments")
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\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"public/get_instruments\",\n \"params\": {\n \"currency\": \"BTC\",\n \"kind\": \"future\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"base_currency": "BTC",
"block_trade_commission": 0.00025,
"block_trade_min_trade_amount": 200000,
"block_trade_tick_size": 0.01,
"contract_size": 10,
"counter_currency": "USD",
"creation_timestamp": 1664524802000,
"expiration_timestamp": 1695974400000,
"index_id": 1000033,
"instrument_id": 138583,
"instrument_name": "BTC-29SEP23",
"instrument_type": "reversed",
"is_active": true,
"kind": "future",
"lot_size": 1,
"maker_commission": 0,
"max_leverage": 50,
"max_liquidation_commission": 0.0075,
"min_trade_amount": 10,
"price_index": "btc_usd",
"product_group": "BTC",
"qty_tick_size": 10,
"quote_currency": "USD",
"settlement_currency": "BTC",
"settlement_period": "month",
"state": "open",
"taker_commission": 0.0005,
"tick_size": 2.5,
"tick_size_steps": [],
"underlying_type": "crypto"
},
{
"base_currency": "BTC",
"block_trade_commission": 0.00025,
"block_trade_min_trade_amount": 200000,
"block_trade_tick_size": 0.01,
"contract_size": 10,
"counter_currency": "USD",
"creation_timestamp": 1534167754000,
"expiration_timestamp": 32503708800000,
"index_id": 1000033,
"instrument_id": 124972,
"instrument_name": "BTC-PERPETUAL",
"instrument_type": "reversed",
"is_active": true,
"kind": "future",
"lot_size": 1,
"maker_commission": 0,
"max_leverage": 50,
"max_liquidation_commission": 0.0075,
"min_trade_amount": 10,
"price_index": "btc_usd",
"product_group": "BTC",
"qty_tick_size": 10,
"quote_currency": "USD",
"settlement_currency": "BTC",
"settlement_period": "perpetual",
"state": "open",
"taker_commission": 0.0005,
"tick_size": 0.5,
"tick_size_steps": [],
"underlying_type": "crypto"
}
]
}Query Parameters
Was this page helpful?