Skip to main content
Glama

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

NameRequiredDescriptionDefault
codeYes
countNo
formatNomarkdown
frequencyNo1d

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full load, and it delivers meaningful disclosure: the underlying Ashare library and Tencent/Sina data sources, no authentication requirement, and the trading-hours availability window. It omits limits on how far back 'count' reaches, latency/caching behavior, and error behavior, which are the remaining gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, followed by operational context and then a clean Args/Returns layout. It is somewhat verbose in enumerating every frequency, but each entry carries real disambiguation value, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter read tool with no output schema, the description covers data source, auth, availability, all parameter formats, defaults, and the returned columns (time, open, close, high, low, volume). An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must supply all parameter meaning, and it does so thoroughly: four accepted code formats with concrete examples, every valid frequency value spelled out with labels, the count default, and the three output formats. This is exactly the compensation the low coverage requires.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first line gives a specific verb and resource — fetches realtime K-line (OHLCV) data for a Chinese A-share stock — which is unambiguous. It does not, however, differentiate itself from close siblings such as get_historical_k_data or get_intraday_minute_kline, so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Useful context is given: no login required and intraday data is supported during trading hours, which implies when the tool is viable. But there is no explicit statement of when to prefer this over get_historical_k_data or get_intraday_minute_kline, and no exclusions or prerequisites, so routing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.