Closed-position stats for a wallet
curl --request GET \
--url https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats', 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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"avgDurationMs": 123,
"avgPnl": 123,
"losingPositions": 123,
"totalPnl": 123,
"totalPositions": 123,
"winRate": 123,
"winningPositions": 123,
"$schema": "https://api.coinversa.ai/schemas/ClosedPositionStatsBody.json",
"firstClose": "<string>",
"lastClose": "<string>",
"maxDurationMs": 123,
"minDurationMs": 123
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}Pulse
Closed-position stats for a wallet
Aggregate over the wallet's CLOSED position lifecycles: count, average/min/max hold time, total and average realized PnL, win/loss counts, win rate, and the first/last close time (RFC 3339). Source: the latest 10,000 eligible rows for the wallet in position_lifecycles_full — closed perps only, excluding censored lifecycles that opened before the table's start. There is no time cutoff. The 10,000-position cap bounds work for very active wallets; totalPositions is therefore at most 10,000. losingPositions counts realized_pnl <= 0 (flat closes included), so winningPositions + losingPositions = totalPositions. winRate = winningPositions / totalPositions x 100. Coverage: this route previously aggregated the legacy closed_positions table, whose history reaches further back than the lifecycle table (which begins on 2026-08-31) but whose PnL was the unrealized snapshot at close rather than realized PnL, and whose exact per-position resolution could not complete within the request budget for wallets with tens of thousands of closed positions. totalPositions and firstClose can therefore be lower/later than before because lifecycle history is shorter and the newest 10,000-position cap may apply; PnL figures are now realized. Wallets with no eligible closed lifecycle return zero counts and omit firstClose/lastClose.
GET
/
api
/
public
/
v1
/
pulse
/
trader
/
{address}
/
closed-positions
/
stats
Closed-position stats for a wallet
curl --request GET \
--url https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats', 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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinversa.ai/api/public/v1/pulse/trader/{address}/closed-positions/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"avgDurationMs": 123,
"avgPnl": 123,
"losingPositions": 123,
"totalPnl": 123,
"totalPositions": 123,
"winRate": 123,
"winningPositions": 123,
"$schema": "https://api.coinversa.ai/schemas/ClosedPositionStatsBody.json",
"firstClose": "<string>",
"lastClose": "<string>",
"maxDurationMs": 123,
"minDurationMs": 123
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}{
"$schema": "https://api.coinversa.ai/schemas/APIError.json",
"code": "<string>",
"current_tier": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"reason": "<string>",
"required_tier": "<string>",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upgrade_url": "<string>"
}Authorizations
Create an API key at https://developers.coinversa.ai/keys. REST limits are shared across keys by account; access uses the effective tier of the presented key.
Path Parameters
Wallet address to inspect (0x followed by 40 hexadecimal characters). An unindexed address returns 404.
Response
OK
A URL to the JSON Schema for this object.
Example:
"https://api.coinversa.ai/schemas/ClosedPositionStatsBody.json"

