Skip to main content
Glama
longbridge

longbridge

Official

Historical Candlesticks by Offset

history_candlesticks_by_offset
Read-onlyIdempotent

Retrieve historical candlestick data relative to a reference time or latest bar, with configurable period, count, and direction for market analysis.

Instructions

Get historical candlestick data by offset from a reference time. Only symbol is required; period defaults to day (1m/5m/15m/30m/60m/day/week/month/year), count to 100, forward_adjust/forward to false, trade_sessions to all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeNoReference datetime (yyyy-mm-ddTHH:MM:SS), omit to start from latest
countNoNumber of candlesticks (optional, max 1000; default 100)
periodNoPeriod: 1m, 5m, 15m, 30m, 60m, day, week, month, year (default: day)day
symbolYesSecurity symbol, e.g. "700.HK"
forwardNoWhether to query forward in time (true) or backward (false; default)
forward_adjustNoWhether to forward-adjust for splits/dividends (default: false / no adjust)
trade_sessionsNoTrade sessions: "intraday" (regular hours only) or "all" (include pre-market and post-market; default "all")all

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed11 schema fields changedv0.10.2
    • addedInput schema / properties / count / default
      Added value: +100
    • changedInput schema / properties / count / description
      Previous value: -"Number of candlesticks (max 1000)"New value: +"Number of candlesticks (optional, max 1000; default 100)"
    • addedInput schema / properties / forward / default
      Added value: +false
    • changedInput schema / properties / forward / description
      Previous value: -"Whether to query forward in time (true) or backward (false)"New value: +"Whether to query forward in time (true) or backward (false; default)"
    • addedInput schema / properties / forward_adjust / default
      Added value: +false
    • changedInput schema / properties / forward_adjust / description
      Previous value: -"Whether to forward-adjust for splits/dividends"New value: +"Whether to forward-adjust for splits/dividends (default: false / no adjust)"
    • addedInput schema / properties / period / default
      Added value: +"day"
    • changedInput schema / properties / period / description
      Previous value: -"Period: 1m, 5m, 15m, 30m, 60m, day, week, month, year"New value: +"Period: 1m, 5m, 15m, 30m, 60m, day, week, month, year (default: day)"
    • addedInput schema / properties / trade_sessions / default
      Added value: +"all"
    • changedInput schema / properties / trade_sessions / description
      Previous value: -"Trade sessions: \"intraday\" (regular hours only) or \"all\" (include pre-market and post-market)"New value: +"Trade sessions: \"intraday\" (regular hours only) or \"all\" (include pre-market and post-market; default \"all\")"
    • changedInput schema / required
      Previous value: -[
      -  "symbol",
      -  "period",
      -  "forward_adjust",
      -  "forward",
      -  "count",
      -  "trade_sessions"
      -]New value: +[
      +  "symbol"
      +]
  2. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"HistoryCandlesticksByOffsetParam"
  3. Addedv0.4.5
  4. Removedv0.4.0
  5. Addedv0.3.2
  6. Removedv0.3.1
  7. First observedv0.1.12

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive behavior, and the description adds the default temporal direction: it queries by offset from a reference time, defaulting to backward (forward false) and no forward adjustment. It also clarifies default trade sessions. This is useful behavioral context beyond the annotations, with no contradiction.

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

Conciseness5/5

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

The description is a single front-loaded sentence that begins with the core operation and immediately follows with the most important call facts (required field and defaults). There is no filler or repetition that a schema already covers comprehensively.

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

Completeness4/5

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

With 100% schema coverage, robust read-only/idempotent annotations, and a clear defaults summary, the union of description and schema is sufficient for correct invocation. The main remaining gap is explicit routing guidance against sibling tools like history_candlesticks_by_date, which is more of a usage-guidelines than completeness gap.

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

Parameters3/5

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

Schema description coverage is 100%, and every parameter has a meaningful schema description. The tool description mostly restates defaults ('period defaults to day', 'count to 100', 'forward_adjust/forward to false', 'trade_sessions to all') rather than adding new meanings. A baseline 3 is appropriate because the schema carries the semantic load.

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

Purpose5/5

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

The description names a specific action ('Get historical candlestick data') and a defining mechanism ('by offset from a reference time'), which distinguishes it from the sibling history_candlesticks_by_date and other candle tools. The phrase 'historical' also separates it from real-time quote/intraday tools. It is specific enough for an agent to know what this tool does at a glance.

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

Usage Guidelines2/5

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

The description gives operational requirements ('Only symbol is required') and defaults, but does not state when to prefer this tool over alternatives such as history_candlesticks_by_date, candlesticks, or intraday. There is no exclusion or routing guidance despite a rich sibling list. The usage context must be inferred from the phrase 'by offset'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/longbridge/longbridge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server