Live Kline
live_klineFull Description
Render a live candlestick chart from Binance (crypto) or stock market via real-time streaming. Supports crypto (spot/futures) and stocks. For crypto, provide symbol like BTCUSDT. For stocks, provide symbol with exchange suffix like 600519.SH. Default interval for stocks is 1d, for crypto is 1m. Stock market with 1m interval will automatically use area chart.
Parameters
marketstringMarket type (required): 'spot' (crypto spot), 'futures' (crypto futures), or stock exchange code like 'SH' (Shanghai), 'SZ' (Shenzhen). Any value other than 'spot' or 'futures' will be treated as stock market.
symbolstringTrading symbol. For crypto: BTCUSDT, ETHUSDT. For stocks: 600519.SH (Shanghai), 000001.SZ (Shenzhen)
chartTypestringChart type: candle_solid, candle_stroke, candle_up_stroke, candle_down_stroke, ohlc, or area (default candle_solid)
candle_solidcandle_strokecandle_up_strokecandle_down_strokeohlcareaindicatorsarrayArray of technical indicators with optional parameters and pane selection. CRITICAL RULE: Each unique combination of indicator name and pane must appear only ONCE in the array. If you need multiple parameter values for the same indicator (e.g., MA with periods 120 and 240), combine all values into a single params array: {name: 'MA', params: [120, 240], pane: 'main'}. Do NOT create multiple objects like [{name: 'MA', params: [120]}, {name: 'MA', params: [240]}]. Supported indicators: MA, EMA, SMA, BOLL, SAR, BBI, MACD, KDJ, RSI, WR, CCI, DMI, TRIX, OBV, VOL, VR, CR, PSY, BRAR, DMA, MTM, EMV, AO, PVT, BIAS, ROC, AVP
intervalstringKline interval. Default: 1d for stocks, 1m for crypto.
1m3m5m15m30m1h2h4h6h8h12h1d3d1w1MoverlaysarrayDefine overlays to draw automatically AFTER initial chart data is loaded. Points are applied directly without interactive selection. Required points by type: priceLine: 1(value); simpleTag: 1(value) [extendData optional]; simpleAnnotation: 1(timestamp+value) [extendData optional]; horizontalStraightLine: 1(value); horizontalRayLine: 1(value) [timestamp optional]; horizontalSegment: 2(timestamp, value same y); verticalStraightLine: 1(timestamp); verticalRayLine: 1(timestamp); verticalSegment: 2(value) at same timestamp; rayLine/segment/straightLine: 2(timestamp+value each); fibonacciLine: 2(timestamp+value each); parallelStraightLine/priceChannelLine: 3(timestamp+value for first two to set base; third value sets parallel distance).
timezonestringTimezone for the chart (e.g., Asia/Shanghai, Europe/Berlin, America/Chicago, UTC). Default is browser timezone.