cURL
curl -X GET "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day" \
-H "Authorization: Bearer <YOUR_API_KEY>"fetch("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day", { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
.then(response => response.json())
.then(data => console.log(data))require('axios')
.get("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
.then(response => console.log(response))require 'net/http'
uri = URI("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.bodyimport requests
headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}
url = "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day"
print(requests.get(url, headers=headers).json())<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin")
.header("Authorization", "Bearer <token>")
.asString();{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "<string>",
"data": [
{
"datetime": "2026-06-14 00:00:00",
"nupl_1m_3m": -14.60751236
}
]
}
}Community-built Indicators
On-chain Trader Unrealized Profit/Loss Margin
The unrealized profit/loss margin (%) of Bitcoin between 1 to 3 months old.
GET
/
community
/
bitcoin-trader-unrealized-profit-margin
cURL
curl -X GET "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day" \
-H "Authorization: Bearer <YOUR_API_KEY>"fetch("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day", { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
.then(response => response.json())
.then(data => console.log(data))require('axios')
.get("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
.then(response => console.log(response))require 'net/http'
uri = URI("https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.bodyimport requests
headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}
url = "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin?window=day"
print(requests.get(url, headers=headers).json())<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.cryptoquant.com/v2/community/bitcoin-trader-unrealized-profit-margin")
.header("Authorization", "Bearer <token>")
.asString();{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "<string>",
"data": [
{
"datetime": "2026-06-14 00:00:00",
"nupl_1m_3m": -14.60751236
}
]
}
}What it measures
Percentage difference between current price and the Trader Realized Price — the unrealized profit or loss of active traders expressed as a %How to interpret it
Extremely high margins = traders likely to start selling (overheating). Deeply negative margins = traders underwater, capitulation may be near. Crossing above/below 30-day MA = confirms positive/negative price momentum.Key thresholds
40% = elevated, correction risk; ~7–8% = STH local top signal; 0% = breakeven (strong support in bull); –5% to –18% = distressed; –17% to –18% = extreme (seen at Aug 2024 crash and July 2024 correction, both price bottoms)
How to use it
Best as a contrarian indicator at extremes. Deeply negative = capitulation approaching. Extremely positive = overheating. Also watch vs. 30-day MA — crossing below confirms negative momentum.Run this metric in CryptoQuant Analytics
Authorizations
For each API request, include the Authorization HTTP header with Bearer <YOUR_API_KEY>.
Query Parameters
Time interval for aggregation.
Starting time, formatted as YYYYMMDDTHHMMSS (UTC). If window=day, YYYYMMDD is also accepted.
Ending time, formatted as YYYYMMDDTHHMMSS (UTC). If window=day, YYYYMMDD is also accepted.
Maximum number of data rows to return. Ranges from 1 to 10,000.
Required range:
1 <= x <= 10000