# Hyperliquid Closed Position Stats

> Hyperliquid Closed Position Stats is a paid API for AI agents from hyperliquid-data.v1337.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns aggregated closed-position performance statistics for Hyperliquid perpetual traders, including realized PnL, win rates, and trade lifecycle summaries

## Facts

- Endpoint: POST https://hyperliquid-data.v1337.org/services/hyperliquid-data/v1/traders/closed-stats
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-closed-position-stats-485082da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JpEnd1Vsa_cazhF9DuzBT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hyperliquid-closed-position-stats-485082da -d '<json body>'
```

Example prompt: Pull the closed position stats for Hyperliquid wallet 0xAbC123... — I want to see their realized PnL, win rate, and total trade count across all perp markets.

## When to prefer this

Use this endpoint when you need aggregated historical performance metrics for closed Hyperliquid perp trades (realized PnL, win rate, trade counts) rather than live open positions or real-time fills. Prefer this over leaderboard endpoints when you need per-wallet deep stats rather than cross-wallet rankings, and over fill-streaming endpoints when you want pre-computed summaries rather than raw trade-by-trade data.

## Known failure modes

- Wallet address not found or has no closed positions — returns empty stats or 404
- Malformed wallet address format — returns 400 validation error
- Quota exceeded without payment — returns HTTP 402 requiring USDC micropayment via x402 protocol
- Upstream Hyperliquid node temporarily unavailable — returns 503 or timeout
- Invalid filter parameters (unsupported coin, bad date range) — returns 400 with error detail

## How this service works

Operator-neutral Hyperliquid trading intelligence — perp fills, position lifecycles, all-wallet leaderboards, trader cohorts, liquidation risk and prediction markets. Every endpoint is FIRST-PARTY: computed from our own node_fills ledger and the Hyperliquid public info API (no third-party data source). Free quota, then HTTP 402 (x402: pay-per-call in USDC, no account, no key).

## Output

Aggregated statistics over all closed perpetual positions for the queried wallet(s), including realized PnL, number of winning/losing trades, win rate percentage, average position hold time, total volume, and per-asset breakdowns where applicable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "description": "Operator-defined JSON payload. Probe the upstream or consult the operator's /openapi.json for the concrete shape.",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-closed-position-stats-485082da/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hyperliquid-data.v1337.org](https://www.zero.xyz/host/hyperliquid-data.v1337.org/llms.txt)
