curl --request GET \
--url https://drb.coinbase.com/api/v2/private/get_transaction_log \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 4,
"jsonrpc": "2.0",
"method": "private/get_transaction_log",
"params": {
"count": 5,
"currency": "BTC",
"end_timestamp": "1613660407000",
"start_timestamp": "1613657734000"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/get_transaction_log"
payload = {
"id": 4,
"jsonrpc": "2.0",
"method": "private/get_transaction_log",
"params": {
"count": 5,
"currency": "BTC",
"end_timestamp": "1613660407000",
"start_timestamp": "1613657734000"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 4,
jsonrpc: '2.0',
method: 'private/get_transaction_log',
params: {
count: 5,
currency: 'BTC',
end_timestamp: '1613660407000',
start_timestamp: '1613657734000'
}
})
};
fetch('https://drb.coinbase.com/api/v2/private/get_transaction_log', 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_transaction_log",
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' => 4,
'jsonrpc' => '2.0',
'method' => 'private/get_transaction_log',
'params' => [
'count' => 5,
'currency' => 'BTC',
'end_timestamp' => '1613660407000',
'start_timestamp' => '1613657734000'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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_transaction_log"
payload := strings.NewReader("{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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_transaction_log")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/get_transaction_log")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 4,
"jsonrpc": "2.0",
"result": {
"continuation": 61282,
"logs": [
{
"amount": 5000,
"balance": 2998.82270418,
"cashflow": -2.4,
"change": -2.4,
"commission": 0,
"currency": "BTC",
"equity": 2998.5275869,
"id": 61313,
"instrument_name": "BTC-PERPETUAL",
"interest_pl": 0.00000512,
"order_id": null,
"position": 0,
"price": 63481.75,
"price_currency": "USD",
"role": "source",
"session_rpl": -12.4,
"side": "sell",
"timestamp": 1613659900000,
"total_interest_pl": 0.00000512,
"trade_id": null,
"type": "LSP transfer",
"user_id": 7,
"user_seq": 6010,
"username": "TestUser"
},
{
"balance": 3001.22270418,
"cashflow": -2.5,
"change": -2.5,
"commission": 0,
"currency": "BTC",
"equity": 3000.9275869,
"id": 61312,
"info": {
"other_user": "Subaccount",
"other_user_id": 27,
"transfer_type": "subaccount"
},
"instrument_name": null,
"interest_pl": null,
"order_id": null,
"position": null,
"price": null,
"side": "-",
"timestamp": 1613659830333,
"trade_id": null,
"type": "transfer",
"user_id": 7,
"user_seq": 6009,
"username": "TestUser"
},
{
"amount": 1520,
"balance": 3003.72270418,
"cashflow": 0.00215706,
"change": 0.00215706,
"commission": null,
"currency": "BTC",
"equity": 3003.42821428,
"id": 61311,
"info": {
"floating_pl": 0.00220172,
"settlement_price": 51807
},
"instrument_name": "BTC-PERPETUAL",
"interest_pl": 0.00000993,
"order_id": null,
"position": 1520,
"price": 51807.07,
"price_currency": "USD",
"session_rpl": -0.00004467,
"session_upl": 0.00220172,
"side": "long",
"timestamp": 1613659544153,
"total_interest_pl": 0.00001243,
"trade_id": null,
"type": "settlement",
"user_id": 7,
"user_seq": 6008,
"username": "TestUser"
},
{
"balance": 3003.72054712,
"cashflow": 0.65,
"change": 0.65,
"commission": 0,
"currency": "BTC",
"equity": 3003.4876111,
"id": 61291,
"info": {
"addr": "2N8prMvpZHr8aYqodX3S4yhz5wMxjY8La3p",
"deposit_type": "wallet",
"transaction": "de6eba075855f32c9510f338d3ca0900376cedcb9f7b142caccfbdc292d3237e"
},
"instrument_name": null,
"interest_pl": null,
"order_id": null,
"position": null,
"price": null,
"side": "-",
"timestamp": 1613657828414,
"trade_id": null,
"type": "deposit",
"user_id": 7,
"user_seq": 6007,
"username": "TestUser"
},
{
"amount": 0.7,
"balance": 3003.07054712,
"cashflow": -0.10759,
"change": -0.10759,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61289,
"info": "Source: api",
"instrument_name": "BTC-19FEB21-49200-C",
"interest_pl": 0,
"ip": "11.222.33.44",
"mark_price": 0.04884653215049635,
"order_id": "67546",
"position": 0.7,
"price": 0.1537,
"price_currency": "BTC",
"profit_as_cashflow": false,
"side": "open buy",
"timestamp": 1613657734620,
"trade_id": "28349",
"type": "trade",
"user_id": 7,
"user_role": "maker",
"user_seq": 6006,
"username": "TestUser"
},
{
"amount": 0.3,
"balance": 3003.17813712,
"cashflow": -0.04611,
"change": -0.04611,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61288,
"info": "Source: api",
"instrument_name": "BTC-19FEB21-49200-C",
"interest_pl": 0,
"mark_price": 0.04884653215049635,
"order_id": "67546",
"position": 0,
"price": 0.1537,
"price_currency": "BTC",
"profit_as_cashflow": false,
"side": "close buy",
"timestamp": 1613657734620,
"trade_id": "28349",
"type": "trade",
"user_id": 7,
"user_role": "maker",
"user_seq": 6005,
"username": "TestUser"
},
{
"amount": 0.3,
"balance": 3003.17813712,
"cashflow": 0,
"change": 0,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61287,
"info": null,
"instrument_name": "BTC-19FEB21-52000-C",
"interest_pl": null,
"order_id": null,
"position": 0,
"price": 0,
"price_currency": "BTC",
"side": "close buy",
"timestamp": 1613657734620,
"trade_id": null,
"type": "expiry",
"user_id": 7,
"user_seq": 6004,
"username": "TestUser"
}
]
}
}private/get_transaction_log
Retrieves a detailed transaction log for the authenticated account. The log includes all account activities such as trades, deposits, withdrawals, transfers, fees, and other balance-affecting operations.
Results can be filtered by currency, time range, and transaction type. Use the continuation parameter for pagination when retrieving large transaction histories. To retrieve transactions for a specific subaccount, use the subaccount_id parameter.
Trade entries executed in Starbase include starbase_match_id, starbase_order_id, and starbase_timestamp.
When an option expires out of the money, the transaction log type is expiry. As there is nothing to settle into futures in this case, this remains the only entry in the transaction log for that expiration.
History Limit: This API method has no time limit - users can query transaction history back to account creation. Note that the CSV export feature available on the website is year-limited to 2023.
Note - This method has distinct API rate limiting requirements: Sustained rate: 1 request/second. For more information, see Rate Limits.
📖 Related Support Article: Transaction log
curl --request GET \
--url https://drb.coinbase.com/api/v2/private/get_transaction_log \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 4,
"jsonrpc": "2.0",
"method": "private/get_transaction_log",
"params": {
"count": 5,
"currency": "BTC",
"end_timestamp": "1613660407000",
"start_timestamp": "1613657734000"
}
}
'import requests
url = "https://drb.coinbase.com/api/v2/private/get_transaction_log"
payload = {
"id": 4,
"jsonrpc": "2.0",
"method": "private/get_transaction_log",
"params": {
"count": 5,
"currency": "BTC",
"end_timestamp": "1613660407000",
"start_timestamp": "1613657734000"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 4,
jsonrpc: '2.0',
method: 'private/get_transaction_log',
params: {
count: 5,
currency: 'BTC',
end_timestamp: '1613660407000',
start_timestamp: '1613657734000'
}
})
};
fetch('https://drb.coinbase.com/api/v2/private/get_transaction_log', 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_transaction_log",
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' => 4,
'jsonrpc' => '2.0',
'method' => 'private/get_transaction_log',
'params' => [
'count' => 5,
'currency' => 'BTC',
'end_timestamp' => '1613660407000',
'start_timestamp' => '1613657734000'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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_transaction_log"
payload := strings.NewReader("{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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_transaction_log")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://drb.coinbase.com/api/v2/private/get_transaction_log")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 4,\n \"jsonrpc\": \"2.0\",\n \"method\": \"private/get_transaction_log\",\n \"params\": {\n \"count\": 5,\n \"currency\": \"BTC\",\n \"end_timestamp\": \"1613660407000\",\n \"start_timestamp\": \"1613657734000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 4,
"jsonrpc": "2.0",
"result": {
"continuation": 61282,
"logs": [
{
"amount": 5000,
"balance": 2998.82270418,
"cashflow": -2.4,
"change": -2.4,
"commission": 0,
"currency": "BTC",
"equity": 2998.5275869,
"id": 61313,
"instrument_name": "BTC-PERPETUAL",
"interest_pl": 0.00000512,
"order_id": null,
"position": 0,
"price": 63481.75,
"price_currency": "USD",
"role": "source",
"session_rpl": -12.4,
"side": "sell",
"timestamp": 1613659900000,
"total_interest_pl": 0.00000512,
"trade_id": null,
"type": "LSP transfer",
"user_id": 7,
"user_seq": 6010,
"username": "TestUser"
},
{
"balance": 3001.22270418,
"cashflow": -2.5,
"change": -2.5,
"commission": 0,
"currency": "BTC",
"equity": 3000.9275869,
"id": 61312,
"info": {
"other_user": "Subaccount",
"other_user_id": 27,
"transfer_type": "subaccount"
},
"instrument_name": null,
"interest_pl": null,
"order_id": null,
"position": null,
"price": null,
"side": "-",
"timestamp": 1613659830333,
"trade_id": null,
"type": "transfer",
"user_id": 7,
"user_seq": 6009,
"username": "TestUser"
},
{
"amount": 1520,
"balance": 3003.72270418,
"cashflow": 0.00215706,
"change": 0.00215706,
"commission": null,
"currency": "BTC",
"equity": 3003.42821428,
"id": 61311,
"info": {
"floating_pl": 0.00220172,
"settlement_price": 51807
},
"instrument_name": "BTC-PERPETUAL",
"interest_pl": 0.00000993,
"order_id": null,
"position": 1520,
"price": 51807.07,
"price_currency": "USD",
"session_rpl": -0.00004467,
"session_upl": 0.00220172,
"side": "long",
"timestamp": 1613659544153,
"total_interest_pl": 0.00001243,
"trade_id": null,
"type": "settlement",
"user_id": 7,
"user_seq": 6008,
"username": "TestUser"
},
{
"balance": 3003.72054712,
"cashflow": 0.65,
"change": 0.65,
"commission": 0,
"currency": "BTC",
"equity": 3003.4876111,
"id": 61291,
"info": {
"addr": "2N8prMvpZHr8aYqodX3S4yhz5wMxjY8La3p",
"deposit_type": "wallet",
"transaction": "de6eba075855f32c9510f338d3ca0900376cedcb9f7b142caccfbdc292d3237e"
},
"instrument_name": null,
"interest_pl": null,
"order_id": null,
"position": null,
"price": null,
"side": "-",
"timestamp": 1613657828414,
"trade_id": null,
"type": "deposit",
"user_id": 7,
"user_seq": 6007,
"username": "TestUser"
},
{
"amount": 0.7,
"balance": 3003.07054712,
"cashflow": -0.10759,
"change": -0.10759,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61289,
"info": "Source: api",
"instrument_name": "BTC-19FEB21-49200-C",
"interest_pl": 0,
"ip": "11.222.33.44",
"mark_price": 0.04884653215049635,
"order_id": "67546",
"position": 0.7,
"price": 0.1537,
"price_currency": "BTC",
"profit_as_cashflow": false,
"side": "open buy",
"timestamp": 1613657734620,
"trade_id": "28349",
"type": "trade",
"user_id": 7,
"user_role": "maker",
"user_seq": 6006,
"username": "TestUser"
},
{
"amount": 0.3,
"balance": 3003.17813712,
"cashflow": -0.04611,
"change": -0.04611,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61288,
"info": "Source: api",
"instrument_name": "BTC-19FEB21-49200-C",
"interest_pl": 0,
"mark_price": 0.04884653215049635,
"order_id": "67546",
"position": 0,
"price": 0.1537,
"price_currency": "BTC",
"profit_as_cashflow": false,
"side": "close buy",
"timestamp": 1613657734620,
"trade_id": "28349",
"type": "trade",
"user_id": 7,
"user_role": "maker",
"user_seq": 6005,
"username": "TestUser"
},
{
"amount": 0.3,
"balance": 3003.17813712,
"cashflow": 0,
"change": 0,
"commission": 0,
"currency": "BTC",
"equity": 3002.83270455,
"id": 61287,
"info": null,
"instrument_name": "BTC-19FEB21-52000-C",
"interest_pl": null,
"order_id": null,
"position": 0,
"price": 0,
"price_currency": "BTC",
"side": "close buy",
"timestamp": 1613657734620,
"trade_id": null,
"type": "expiry",
"user_id": 7,
"user_seq": 6004,
"username": "TestUser"
}
]
}
}Authorizations
Query Parameters
Was this page helpful?