List Margin Call Summaries
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summariesimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries', 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}/margin_summaries",
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}/margin_summaries"
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}/margin_summaries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries")
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{
"margin_summaries": [
{
"conversion_datetime": "2023-05-01T12:00:00.000Z",
"conversion_date": "2023-05-01T00:00:00.000Z",
"margin_summary": {
"entity_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"margin_equity": "2539231.5903575355",
"margin_requirement": "15131.725279884091",
"excess_deficit": "2524099.865077651",
"pm_credit_consumed": "10000",
"tf_credit_limit": "2000000",
"tf_credit_consumed": "20000",
"tf_adjusted_asset_value": "40000",
"tf_adjusted_liability_value": "40000",
"tf_adjusted_credit_consumed": "30000",
"tf_adjusted_equity": "30000",
"frozen": false,
"frozen_reason": "<string>",
"tf_enabled": true,
"pm_enabled": true,
"market_rates": [
{
"symbol": "BTC",
"rate": "27,123"
}
],
"asset_balances": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "4000",
"notional_amount": "4000",
"conversion_rate": "1000"
}
],
"tf_loans": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"pm_loans": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"short_collateral": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"gross_market_value": "<string>",
"net_market_value": "<string>",
"long_market_value": "<string>",
"non_marginable_long_market_value": "<string>",
"short_market_value": "<string>",
"gross_leverage": "<string>",
"net_exposure": "<string>",
"portfolio_stress_triggered": {
"amount": "<string>"
},
"pm_asset_info": [
{
"symbol": "<string>",
"amount": "<string>",
"price": "<string>",
"notional_amount": "<string>",
"asset_tier": "<string>",
"margin_eligible": true,
"base_margin_requirement": "<string>",
"base_margin_requirement_notional": "<string>",
"adv_30d": "<string>",
"hist_5d_vol": "<string>",
"hist_30d_vol": "<string>",
"hist_90d_vol": "<string>",
"volatility_addon": "<string>",
"liquidity_addon": "<string>",
"total_position_margin": "<string>",
"short_nominal": "<string>",
"long_nominal": "<string>"
}
],
"pm_credit_limit": "1000000",
"pm_margin_limit": "200000",
"pm_margin_consumed": "5000"
}
}
]
}Financing
List Margin Call Summaries
Lists the margin call history for a given entity ID.
GET
/
v1
/
entities
/
{entity_id}
/
margin_summaries
List Margin Call Summaries
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summariesimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries', 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}/margin_summaries",
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}/margin_summaries"
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}/margin_summaries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/margin_summaries")
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{
"margin_summaries": [
{
"conversion_datetime": "2023-05-01T12:00:00.000Z",
"conversion_date": "2023-05-01T00:00:00.000Z",
"margin_summary": {
"entity_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"margin_equity": "2539231.5903575355",
"margin_requirement": "15131.725279884091",
"excess_deficit": "2524099.865077651",
"pm_credit_consumed": "10000",
"tf_credit_limit": "2000000",
"tf_credit_consumed": "20000",
"tf_adjusted_asset_value": "40000",
"tf_adjusted_liability_value": "40000",
"tf_adjusted_credit_consumed": "30000",
"tf_adjusted_equity": "30000",
"frozen": false,
"frozen_reason": "<string>",
"tf_enabled": true,
"pm_enabled": true,
"market_rates": [
{
"symbol": "BTC",
"rate": "27,123"
}
],
"asset_balances": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "4000",
"notional_amount": "4000",
"conversion_rate": "1000"
}
],
"tf_loans": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"pm_loans": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"short_collateral": [
{
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"amount": "150000",
"notional_amount": "250000",
"due_date": "1000"
}
],
"gross_market_value": "<string>",
"net_market_value": "<string>",
"long_market_value": "<string>",
"non_marginable_long_market_value": "<string>",
"short_market_value": "<string>",
"gross_leverage": "<string>",
"net_exposure": "<string>",
"portfolio_stress_triggered": {
"amount": "<string>"
},
"pm_asset_info": [
{
"symbol": "<string>",
"amount": "<string>",
"price": "<string>",
"notional_amount": "<string>",
"asset_tier": "<string>",
"margin_eligible": true,
"base_margin_requirement": "<string>",
"base_margin_requirement_notional": "<string>",
"adv_30d": "<string>",
"hist_5d_vol": "<string>",
"hist_30d_vol": "<string>",
"hist_90d_vol": "<string>",
"volatility_addon": "<string>",
"liquidity_addon": "<string>",
"total_position_margin": "<string>",
"short_nominal": "<string>",
"long_nominal": "<string>"
}
],
"pm_credit_limit": "1000000",
"pm_margin_limit": "200000",
"pm_margin_consumed": "5000"
}
}
]
}Supported Products
- Portfolio Margin
Path Parameters
The unique ID of the entity
Query Parameters
The start date of the range to query for in RFC3339 format. Must be within the last 3 months
The end date of the range to query for in RFC3339 format
Response
200 - application/json
A successful response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I