# Hyperliquid Portfolio State API

> Hyperliquid Portfolio State API is a paid API for AI agents from hl-portfolio.api.klymax402.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Retrieves full clearinghouse state for a Hyperliquid wallet address, including open positions, margin balances, unrealized PnL, leverage, and liquidation prices.

## Facts

- Endpoint: GET https://hl-portfolio.api.klymax402.com/api/account
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hl-portfolio-api-klymax402-com-c61a6e42
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GYRHiHR9abhcjlRKOwxef

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 hl-portfolio-api-klymax402-com-c61a6e42
```

Example prompt: Pull the full Hyperliquid clearinghouse state for wallet 0x1234abcd... — I want to see all open positions, current margin, unrealized PnL, leverage ratios, and liquidation prices.

## When to prefer this

Use this endpoint when you need a comprehensive snapshot of a Hyperliquid perpetuals account — positions, margin, PnL, leverage, and liquidation risk — in a single call. Prefer it over generic blockchain explorers when you specifically need Hyperliquid clearinghouse data rather than raw on-chain transactions.

## Known failure modes

- Invalid or malformed wallet address returns a 400 error
- Wallet address not found on Hyperliquid returns empty positions
- Network or upstream Hyperliquid API unavailability returns 503
- Missing 'address' parameter results in a validation error
- Payment/x402 authorization failure prevents the call from completing

## How this service works

Full clearinghouse state for a Hyperliquid wallet: positions, margin, PnL, leverage, liquidation prices.

## Output

Returns the complete clearinghouse account state for the specified Hyperliquid wallet: a structured object containing all open perpetual positions (symbol, size, entry price, mark price), margin balances, unrealized and realized PnL figures, per-position leverage, and liquidation price thresholds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "description": "Hyperliquid wallet address (0x...) to retrieve account state for"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hl-portfolio-api-klymax402-com-c61a6e42/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hl-portfolio.api.klymax402.com](https://www.zero.xyz/host/hl-portfolio.api.klymax402.com/llms.txt)
