> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/rest-api/user-position-data/webdata3.md).

# webData3

Get a lightweight Hyperliquid account summary for a user: agent wallet, account mode, cumulative ledger and per-DEX vault equity.

{% hint style="info" %}
webData3 replaces webData2. It returns a compact account summary with one entry per perp DEX. It does not include positions, open orders, market metadata or asset contexts. Fetch those from the dedicated endpoints listed in Migrating from webData2.
{% endhint %}

#### POST Request

| Field  | Type   | Description                                        |
| ------ | ------ | -------------------------------------------------- |
| `type` | string | Must be `"webData3"`                               |
| `user` | string | User Ethereum address (0x-prefixed, 42 characters) |

The response always covers every perp DEX. There is no `dex` filter.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "webData3",
    "user": "0x0000000000000000000000000000000000000000"
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'webData3',
        'user': '0x0000000000000000000000000000000000000000'
    },
    headers={
        'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
        'Content-Type': 'application/json'
    }
)

print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
import axios from 'axios';

try {
    const response = await axios.post('https://api.hydromancer.xyz/info', {
        type: 'webData3',
        user: '0x0000000000000000000000000000000000000000'
    }, {
        headers: {
            'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
            'Content-Type': 'application/json'
        }
    });

    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
```

{% endtab %}
{% endtabs %}

### Response Fields <a href="#response-fields" id="response-fields"></a>

| Field                                    | Type    | Description                                                                                              |
| ---------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| `userState`                              | object  | Account-level summary                                                                                    |
| `userState.agentAddress`                 | string? | Approved agent (API) wallet address (null if none)                                                       |
| `userState.agentValidUntil`              | int?    | Agent validity timestamp in ms (null if none)                                                            |
| `userState.cumLedger`                    | string  | Cumulative ledger value                                                                                  |
| `userState.serverTime`                   | int     | Server timestamp (ms)                                                                                    |
| `userState.isVault`                      | boolean | Whether the user is a vault                                                                              |
| `userState.user`                         | string  | User address                                                                                             |
| `userState.dexAbstractionEnabled`        | boolean | Whether per-DEX abstraction is enabled. Omitted for some accounts                                        |
| `userState.abstraction`                  | string  | Account abstraction mode, e.g. `unifiedAccount` or `portfolioMargin`. Omitted for some accounts          |
| `perpDexStates`                          | array   | One entry per perp DEX. Index 0 is the native Hyperliquid DEX, followed by HIP-3 DEXes in perpDexs order |
| `perpDexStates[].totalVaultEquity`       | string  | User's total vault equity on that DEX                                                                    |
| `perpDexStates[].perpsAtOpenInterestCap` | array   | Perp symbols on that DEX currently at their open interest cap. Omitted when there are none               |

#### Response

<details>

<summary>Response (truncated)</summary>

```json
{
    "userState": {
        "agentAddress": null,
        "agentValidUntil": null,
        "cumLedger": "0.0",
        "serverTime": 1791361435566,
        "isVault": false,
        "user": "0x0000000000000000000000000000000000000000"
    },
    "perpDexStates": [
        {
            "totalVaultEquity": "0.0",
            "perpsAtOpenInterestCap": [
                "CANTO",
                "FTM",
                "JELLY",
                "LOOM",
                "RLB",
                "VINE",
                "ZEREBRO"
            ]
        },
        {
            "totalVaultEquity": "0.0"
        },
        {
            "totalVaultEquity": "0.0"
        }
    ]
}
```

</details>

### Migrating from webData2 <a href="#migrating-from-webdata2" id="migrating-from-webdata2"></a>

webData2 returned positions, orders and market data in one response. webData3 returns only the account summary, so fetch the rest from these endpoints:

| webData2 field                                                                  | Use now                                                                                      |
| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `agentAddress`, `agentValidUntil`, `cumLedger`, `isVault`, `serverTime`, `user` | webData3 → `userState`                                                                       |
| `totalVaultEquity`                                                              | webData3 → `perpDexStates[].totalVaultEquity` (now per DEX)                                  |
| `perpsAtOpenInterestCap`                                                        | webData3 → `perpDexStates[].perpsAtOpenInterestCap` (now per DEX), or perpsAtOpenInterestCap |
| `clearinghouseState`                                                            | clearinghouseState, or portfolioState for perp + spot together                               |
| `openOrders`                                                                    | openOrders or frontendOpenOrders                                                             |
| `meta`, `assetCtxs`                                                             | metaAndAssetCtxs                                                                             |
| `leadingVaults`                                                                 | leadingVaults                                                                                |
| `twapStates`                                                                    | userTwapSummaries                                                                            |
