# webData3

## Subscribe to webData3

> Subscription to comprehensive user and market data events.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - webData3","version":"1.0.0"},"tags":[{"name":"webData3"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["webData3"],"summary":"Subscribe to webData3","description":"Subscription to comprehensive user and market data events.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["webData3"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","user"],"description":"Subscription to comprehensive user and market data events."}}},"required":true},"responses":{"200":{"description":"Comprehensive user and market data.","content":{"application/json":{"schema":{"type":"object","properties":{"userState":{"type":"object","properties":{"agentAddress":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"nullable":true}],"description":"Agent address if one exists."},"agentValidUntil":{"anyOf":[{"type":"integer","minimum":0,"nullable":true}],"description":"Timestamp until which the agent is valid."},"cumLedger":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Cumulative ledger value."},"serverTime":{"type":"integer","minimum":0,"description":"Server timestamp (in ms since epoch)."},"isVault":{"type":"boolean","description":"Whether this account is a vault."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"optOutOfSpotDusting":{"description":"Whether the user has opted out of spot dusting.","enum":[true]},"dexAbstractionEnabled":{"type":"boolean","description":"Whether DEX abstraction is enabled."}},"required":["agentAddress","agentValidUntil","cumLedger","serverTime","isVault","user"],"description":"User state information."},"perpDexStates":{"type":"array","items":{"type":"object","properties":{"totalVaultEquity":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total equity in vaults."},"perpsAtOpenInterestCap":{"type":"array","items":{"type":"string"},"description":"Assets currently at their open interest cap."},"leadingVaults":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Vault address."},"name":{"type":"string","description":"Vault name."}},"required":["address","name"],"description":"Vault that a user is leading."},"description":"Array of leading vaults."}},"required":["totalVaultEquity"]},"description":"Array of perpetual DEX states."}},"required":["userState","perpDexStates"],"description":"Comprehensive user and market data."}}}}}}}}}
```
