# x402stock Perpetuals Account Lookup

> x402stock Perpetuals Account Lookup is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-08).

Returns the full on-chain perpetuals account snapshot for a given wallet address on Hyperliquid, including positions, margin, PnL, and open orders

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/perps/account/%7Baddress%7D
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-perpetuals-account-lookup-85b71ce5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0wo0cbfQSlFENx4LKgF1l

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-perpetuals-account-lookup-85b71ce5
```

Example prompt: Pull up my Hyperliquid perpetuals account snapshot for wallet 0x31ca8395cf837de08b24da3f660e77761dfb974b — I want to see my open positions, unrealized PnL, margin used, liquidation prices, and any open orders.

## When to prefer this

Use this endpoint when you need a real-time snapshot of a specific wallet's on-chain perpetuals account on Hyperliquid — including positions, margin, PnL, and open orders — without needing an API key or account. Prefer this over exchange-specific APIs when you want pay-per-call pricing in USDC and no authentication overhead.

## Known failure modes

- Invalid or malformed wallet address returns an error or empty positions array
- Address with no perps activity returns empty positions and orders arrays
- Hyperliquid data source temporarily unavailable causing upstream timeout
- limit parameter out of range (>1000 or <0) returns validation error
- Missing address path parameter causes 404 or 400 response

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

A JSON snapshot of the wallet's perpetuals account on Hyperliquid, including: account value, withdrawable balance, total margin used, maintenance margin, total notional position, an array of open positions (coin, side, size, leverage, entry price, position value, unrealized PnL, ROE, liquidation price, margin used, max leverage, funding since open), and an array of open orders (coin, side, size, order ID, timestamp, limit price).

## 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"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "limit"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "default": 200,
       "maximum": 1000,
       "minimum": 0
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "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": [
          
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-06-06T00:00:00.000Z",
  "venue": "hyperliquid",
  "market": "perp",
  "source": "x402stock",
  "address": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
  "positions": [
   {
    "coin": "BTC",
    "side": "short",
    "size": -0.59864,
    "leverage": 20,
    "entry_price": 61691.7,
    "margin_used": 1851.62,
    "max_leverage": 50,
    "leverage_type": "cross",
    "position_value": 37032.47,
    "unrealized_pnl": -101.3,
    "return_on_equity": -0.0548573051,
    "liquidation_price": 5078920.58,
    "funding_since_open": -54.32
   }
  ],
  "open_orders": [
   {
    "coin": "WLD",
    "side": "buy",
    "size": 555,
    "order_id": 461295382727,
    "orig_size": 555,
    "timestamp": "2026-06-06T00:00:00.000Z",
    "limit_price": 0.45186
   }
  ],
  "withdrawable": 2739294.87,
  "account_value": 3066130.2,
  "total_raw_usd": 2840711.89,
  "open_orders_count": 1,
  "total_margin_used": 163417.67,
  "maintenance_margin_used": 32683.53,
  "total_notional_position": 3268353.3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-perpetuals-account-lookup-85b71ce5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
