# Hyperliquid Perp DEX Live Account State

> Hyperliquid Perp DEX Live Account State is a paid API for AI agents from agents.x402stock.xyz, paid per call via MPP, $0.02/call, status unknown (last checked 2026-09-11).

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

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/perps/account/{address}
- Price: $0.02/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-11
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-perp-dex-live-account-state-63d7d092
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QMFhie7hMJpNc76Es36iO

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 agents-x402stock-xyz-hyperliquid-perp-dex-live-account-state-63d7d092
```

Example prompt: Pull the live Hyperliquid perp account state for wallet 0x1234abcd... — I want to see the account value, all open positions with their unrealized PnL and liquidation prices, and any resting open orders.

## When to prefer this

Use this endpoint when you need live, on-chain perpetuals account data from the Hyperliquid DEX for any public wallet address without requiring an API key. Prefer this over generic crypto portfolio endpoints when the specific need is Hyperliquid perp positions, margin state, or resting limit orders. It is the right choice for risk monitoring, copy-trading research, or liquidation analysis on Hyperliquid.

## Known failure modes

- Invalid or malformed 0x address returns an error or empty positions array
- Address with no Hyperliquid activity returns zeroed account fields and empty arrays
- limit parameter exceeds maximum of 1000, returning a validation error
- Network or on-chain data unavailability causes a timeout or upstream error
- Non-existent address may return a valid schema with all-zero balances

## 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 a timestamp, venue and market identifiers, the wallet address, account-level financials (account value, total notional, raw USD, margin used, maintenance margin, withdrawable), an array of open perpetual positions (coin, side, size, leverage, leverage type, entry price, position value, unrealized PnL, return on equity, liquidation price, margin used, max leverage, funding since open), a count of total open orders, and an array of resting open orders (coin, side, limit price, size, original size, order ID, timestamp).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "address"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "default": 200,
   "maximum": 1000,
   "minimum": 0
  },
  "address": {
   "type": "string",
   "description": "Solana account address (base58)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "source",
  "as_of",
  "venue",
  "market",
  "address",
  "account_value",
  "total_notional_position",
  "total_raw_usd",
  "total_margin_used",
  "maintenance_margin_used",
  "withdrawable",
  "positions",
  "open_orders_count",
  "open_orders"
 ],
 "properties": {
  "as_of": {
   "type": "string"
  },
  "venue": {
   "type": "string"
  },
  "market": {
   "type": "string",
   "const": "perp"
  },
  "source": {
   "type": "string",
   "const": "x402stock"
  },
  "address": {
   "type": "string"
  },
  "positions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "coin",
     "size",
     "side",
     "leverage",
     "leverage_type",
     "entry_price",
     "position_value",
     "unrealized_pnl",
     "return_on_equity",
     "liquidation_price",
     "margin_used",
     "max_leverage",
     "funding_since_open"
    ],
    "properties": {
     "coin": {
      "type": "string"
     },
     "side": {
      "anyOf": [
       {
        "enum": [
         "long",
         "short"
        ],
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "size": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "leverage": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "entry_price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "margin_used": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "max_leverage": {
      "type": "number"
     },
     "leverage_type": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "position_value": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "unrealized_pnl": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "return_on_equity": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "liquidation_price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "fun
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-perp-dex-live-account-state-63d7d092/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)
