List Interest Accruals
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/accrualsimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals', 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://api.prime.coinbase.com/v1/entities/{entity_id}/accruals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"total_notional_accrual": "<string>",
"accruals": [
{
"accrual_id": "9227410b-d2d2-4646-950d-df126601bf2a",
"date": "2023-05-01T12:00:00.000Z",
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"interest_rate": "0.05",
"nominal_accrual": 0.00013699,
"notional_accrual": "4.07",
"conversion_rate": "29687.94",
"loan_amount": "1.05",
"benchmark_rate": 0.0005,
"spread": 0.0001,
"loan_amount_notional": "1.05",
"nominal_open_borrow_sod": "1.05",
"notional_open_borrow_sod": "1.05"
}
]
}Financing
List Interest Accruals
Lists interest accruals for an entity between the specified date range given
GET
/
v1
/
entities
/
{entity_id}
/
accruals
List Interest Accruals
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/accrualsimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals', 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://api.prime.coinbase.com/v1/entities/{entity_id}/accruals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/accruals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"total_notional_accrual": "<string>",
"accruals": [
{
"accrual_id": "9227410b-d2d2-4646-950d-df126601bf2a",
"date": "2023-05-01T12:00:00.000Z",
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"interest_rate": "0.05",
"nominal_accrual": 0.00013699,
"notional_accrual": "4.07",
"conversion_rate": "29687.94",
"loan_amount": "1.05",
"benchmark_rate": 0.0005,
"spread": 0.0001,
"loan_amount_notional": "1.05",
"nominal_open_borrow_sod": "1.05",
"notional_open_borrow_sod": "1.05"
}
]
}Supported Products
- Portfolio Margin
- Trade Finance
- Bilateral Lending
Path Parameters
The unique ID of the entity
Query Parameters
The unique ID of the portfolio
The start date of the range to query for in RFC3339 format
The end date of the range to query for in RFC3339 format
Was this page helpful?
⌘I