# activeAssetData

## Subscribe to activeAssetData

> Subscription to active asset data events for a specific user and coin.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - activeAssetData","version":"1.0.0"},"tags":[{"name":"activeAssetData"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["activeAssetData"],"summary":"Subscribe to activeAssetData","description":"Subscription to active asset data events for a specific user and coin.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["activeAssetData"]},"coin":{"type":"string","description":"Asset symbol (e.g., BTC)."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","coin","user"],"description":"Subscription to active asset data events for a specific user and coin."}}},"required":true},"responses":{"200":{"description":"Event of user active asset data.","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"coin":{"type":"string","description":"Asset symbol (e.g., BTC)."},"leverage":{"oneOf":[{"type":"object","properties":{"type":{"description":"Leverage type.","enum":["isolated"]},"value":{"type":"integer","minimum":1,"description":"Leverage value used."},"rawUsd":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount of USD used (1 = $1)."}},"required":["type","value","rawUsd"]},{"type":"object","properties":{"type":{"description":"Leverage type.","enum":["cross"]},"value":{"type":"integer","minimum":1,"description":"Leverage value used."}},"required":["type","value"]}],"description":"Leverage configuration."},"maxTradeSzs":{"type":"array","items":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2,"description":"Maximum trade size range [min, max]."},"availableToTrade":{"type":"array","items":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2,"description":"Available to trade range [min, max]."},"markPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Mark price."}},"required":["user","coin","leverage","maxTradeSzs","availableToTrade","markPx"],"description":"Event of user active asset data."}}}}}}}}}
```
