# candle

## Subscribe to candle

> Subscription to candlestick events for a specific asset and time interval.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - candle","version":"1.0.0"},"tags":[{"name":"candle"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["candle"],"summary":"Subscribe to candle","description":"Subscription to candlestick events for a specific asset and time interval.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["candle"]},"coin":{"type":"string","description":"Asset symbol (e.g., BTC)."},"interval":{"enum":["1m","3m","5m","15m","30m","1h","2h","4h","8h","12h","1d","3d","1w","1M"],"description":"Time interval."}},"required":["type","coin","interval"],"description":"Subscription to candlestick events for a specific asset and time interval."}}},"required":true},"responses":{"200":{"description":"Event of candlestick data point.","content":{"application/json":{"schema":{"type":"object","properties":{"t":{"type":"integer","minimum":0,"description":"Opening timestamp (ms since epoch)."},"T":{"type":"integer","minimum":0,"description":"Closing timestamp (ms since epoch)."},"s":{"type":"string","description":"Asset symbol."},"i":{"enum":["1m","3m","5m","15m","30m","1h","2h","4h","8h","12h","1d","3d","1w","1M"],"description":"Time interval."},"o":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Opening price."},"c":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Closing price."},"h":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Highest price."},"l":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Lowest price."},"v":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total volume traded in base currency."},"n":{"type":"integer","minimum":0,"description":"Number of trades executed."}},"required":["t","T","s","i","o","c","h","l","v","n"],"description":"Event of candlestick data point."}}}}}}}}}
```
