> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hypedexer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account state and leverage

> Latest known account state: equity, cash, open notional, unrealized PnL, **account leverage** (open notional ÷ account value) and every open position with its own leverage, entry price, mark price and accrued funding. `as_of` is the snapshot time — snapshots are hourly, so this is not real time.

`leverage_type` is `cross`, `isolated`, or `default` when the trader never set leverage for that asset — Hyperliquid then applies `min(20, maxLeverage)`, which is the value returned in `leverage`.

When the account holds no position and no perp balance at the latest snapshot, the response is an explicit empty state: `account_value: 0`, `perp_account_empty: true` and `last_nonempty_snapshot`. `404` is returned only for addresses never seen with a balance or a position.



## OpenAPI

````yaml /api-reference/openapi.json get /users/{user}/account
openapi: 3.0.3
info:
  title: HL Indexer API — Indexed Data
  version: 1.0.0
  description: >-
    API to query indexed Hyperliquid trading data.


    This API provides access to stored/indexed trading data:

    - **Fills**: Executed orders and fills (Spot-only or All = Spot + Perp)

    - **Analytics**: Aggregations and statistics based on indexed data

    - **Completed Trades**: Trade objects and their related fills

    - **Users**: User overviews, performance and activity

    - **Social Trading**: Per-trader equity curve, PnL calendar, account
    leverage and top trades

    - **Funding**: Funding rate history, user funding payments, predicted rates

    - **Liquidations**: Liquidation events with filters

    - **Overview**: Market dashboard metrics (volume, fees, traders, PnL)

    - **Spot**: Spot token metadata, pairs, and auctions

    - **TWAPs**: TWAP orders, execution stats and fills

    - **Vaults**: Vault details, summaries, equity, ledger


    > Note: No live streaming. Responses are computed from indexed data.
servers:
  - url: https://api.hypedexer.com
    description: EU production
security: []
tags:
  - name: Fills
    description: Fills endpoints.
  - name: Analytics
    description: Aggregations and stats.
  - name: Completed Trades
    description: Trades and fills.
  - name: Users
    description: User profiles.
  - name: Funding
    description: Funding rates and payments (HL-compatible).
  - name: Liquidations
    description: Liquidation events.
  - name: Overview
    description: Market dashboard metrics.
  - name: Spot
    description: Spot token metadata, pairs and auctions.
  - name: TWAPs
    description: TWAP orders, stats and fills.
  - name: Vaults
    description: Vault details, summaries, equity and ledger.
  - name: Social Trading
    description: >-
      Per-trader equity, PnL calendar, performance, account leverage and top
      trades.
paths:
  /users/{user}/account:
    get:
      tags:
        - Social Trading
      summary: Account state and leverage
      description: >-
        Latest known account state: equity, cash, open notional, unrealized PnL,
        **account leverage** (open notional ÷ account value) and every open
        position with its own leverage, entry price, mark price and accrued
        funding. `as_of` is the snapshot time — snapshots are hourly, so this is
        not real time.


        `leverage_type` is `cross`, `isolated`, or `default` when the trader
        never set leverage for that asset — Hyperliquid then applies `min(20,
        maxLeverage)`, which is the value returned in `leverage`.


        When the account holds no position and no perp balance at the latest
        snapshot, the response is an explicit empty state: `account_value: 0`,
        `perp_account_empty: true` and `last_nonempty_snapshot`. `404` is
        returned only for addresses never seen with a balance or a position.
      parameters:
        - name: user
          in: path
          required: true
          description: Trader address (0x + 40 hex, any case).
          schema:
            type: string
            example: '0x0000000000bdc2fd416def2d8688069052eb0f87'
        - name: X-API-Key
          in: header
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    default: true
                  message:
                    type: string
                    default: OK
                  data:
                    type: object
                  execution_time_ms:
                    type: number
        '400':
          description: Invalid user address (expected 0x + 40 hex)
        '404':
          description: No account snapshot for this address

````