get_realtime_kline
Fetch real-time K-line (OHLCV) data for Chinese A-share stocks, including intraday bars during trading hours and configurable frequencies for market analysis.
Instructions
Fetches realtime K-line (OHLCV) data for a Chinese A-share stock.
This tool uses Ashare library which fetches live data from Tencent/Sina APIs.
No login required, supports intraday data during trading hours.
Args:
code: The stock code. Supports multiple formats:
- 'sh600000' or 'sz000001' (Tongdaxin format)
- '600000' or '000001' (pure number, auto-detect exchange)
- 'sh.600000' or 'sz.000001' (Baostock format)
- '600519.XSHG' or '000001.XSHE' (JoinQuant format)
frequency: K-line frequency. Valid options:
'1m': 1 minute
'5m': 5 minutes
'15m': 15 minutes
'30m': 30 minutes
'60m': 60 minutes
'1d': daily (default)
'1w': weekly
'1M': monthly
count: Number of K-line bars to fetch. Defaults to 60.
format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.
Returns:
K-line data table with columns: time, open, close, high, low, volume
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| count | No | ||
| format | No | markdown | |
| frequency | No | 1d |