# x402stock Hyperliquid Perp Account State

> x402stock Hyperliquid Perp Account State is a paid API for AI agents from agents.x402stock.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-19).

Returns live on-chain account state for any wallet on the Hyperliquid perpetual DEX, including account value, margin, open positions, and resting orders.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/perps/account/:address?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-hyperliquid-perp-account-state-0fb37988
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B_AG5d-YfNu2BQ05FHzXc

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 x402stock-hyperliquid-perp-account-state-0fb37988
```

Example prompt: What's the current account value, margin used, withdrawable balance, and all open perp positions with their unrealized PnL and liquidation prices for the Hyperliquid wallet 0x1234abcd...?

## When to prefer this

Use this endpoint when you need real-time, on-chain account state specifically from the Hyperliquid perpetual DEX — account value, margin, positions, and orders — by wallet address. It's read-only, requires no API key, and is ideal for monitoring, risk analysis, or portfolio snapshotting of any public Hyperliquid address. Prefer it over generic crypto portfolio APIs when Hyperliquid-specific perp data (leverage, liquidation price, margin per position) is needed.

## Known failure modes

- Invalid or malformed 0x address returns a 4xx error
- Address with no Hyperliquid account history returns empty positions/orders arrays
- Network or RPC timeout from Hyperliquid chain causes 5xx
- limit query param exceeding 1000 is clamped or rejected
- Payment not attached or insufficient USDC results in 402 Payment Required

## How this service works

Live on-chain account state for any wallet on the Hyperliquid perp DEX, by 0x address: account value, total notional, margin used, withdrawable; every open perp position (size, long/short, leverage, entry, unrealized PnL, liquidation price, margin); and resting open orders (up to `?limit=`, default 200; `open_orders_count` is the total). Read-only public chain data, no key. From x402stock

## Output

A JSON object containing account-level metrics (account value, total notional, margin used, withdrawable amount) and arrays of open perpetual positions (each with symbol, size, direction, leverage, entry price, unrealized PnL, liquidation price, and margin) plus resting open orders (up to the requested limit, with a total open_orders_count field).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "address": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 200,
       "maximum": 1000,
       "minimum": 0
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-hyperliquid-perp-account-state-0fb37988/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
