# activeAssetCtx

## Subscribe to activeAssetCtx

> Subscription to context events for a specific perpetual asset.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - activeAssetCtx","version":"1.0.0"},"tags":[{"name":"activeAssetCtx"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["activeAssetCtx"],"summary":"Subscribe to activeAssetCtx","description":"Subscription to context events for a specific perpetual asset.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["activeAssetCtx"]},"coin":{"type":"string","description":"Asset symbol (e.g., BTC)."}},"required":["type","coin"],"description":"Subscription to context events for a specific perpetual asset."}}},"required":true},"responses":{"200":{"description":"Event of active perpetual asset context.","content":{"application/json":{"schema":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol (e.g., BTC)."},"ctx":{"type":"object","properties":{"prevDayPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Previous day's closing price."},"dayNtlVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily notional volume."},"markPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Mark price."},"midPx":{"anyOf":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Mid price."},"funding":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Funding rate."},"openInterest":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total open interest."},"premium":{"anyOf":[{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Premium price."},"oraclePx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Oracle price."},"impactPxs":{"anyOf":[{"type":"array","items":{"type":"string"},"nullable":true}],"description":"Array of impact prices."},"dayBaseVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily volume in base currency."}},"required":["prevDayPx","dayNtlVlm","markPx","midPx","funding","openInterest","premium","oraclePx","impactPxs","dayBaseVlm"],"description":"Context for a specific perpetual asset."}},"required":["coin","ctx"],"description":"Event of active perpetual asset context."}}}}}}}}}
```
