Account Value

GET/gateway/v1/hyperliquid/account

Returns a wallet's full portfolio across perps, spot, vaults, and staking in one call, with a perp+vault equity roll-up (`total_value_usd` is the total-equity figure a dashboard header should show, vs the perp-only equity on `/performance` and `/positions`). This is the source for spot balances.

This is a point-in-time snapshot, not a time series; its perp block duplicates the margin summary from `/hyperliquid/positions` (this endpoint adds spot/vault/staking so it stands alone as a full-portfolio call). Sections are fetched independently: if one fails, that section is omitted (not null) and the failure is named in `errors[]`. The call returns 200 when at least one section succeeds, and 502 only if all four fail. Spot balances are token-denominated and staking is in HYPE.

Query Parameters

addressstringrequired

Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.

Account Value
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/hyperliquid/account', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataObjectResponseHyperliquidAccount.json",
  "data": {
    "address": "<string>",
    "as_of": 123,
    "errors": [
      {
        "reason": "<string>",
        "section": "<string>"
      }
    ],
    "perp": {
      "account_value": 123,
      "open_position_count": 123,
      "total_margin_used": 123,
      "withdrawable": 123
    },
    "spot": {
      "balances": [
        {
          "available": 123,
          "entry_notional": 123,
          "hold": 123,
          "symbol": "<string>",
          "token_id": 123,
          "total": 123,
          "withdrawable": 123
        }
      ]
    },
    "staking": {
      "delegated_hype": 123,
      "pending_withdrawal_count": 123,
      "total_pending_withdrawal_hype": 123,
      "undelegated_hype": 123
    },
    "total_value_usd": 123,
    "unpriced_token_count": 123,
    "vaults": {
      "positions": [
        {
          "equity": 123,
          "locked_until": 123,
          "vault_address": "<string>"
        }
      ],
      "total_equity": 123
    }
  },
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>"
  }
}