Skip to main content
Glama
longbridge

longbridge

Official

Candlesticks

candlesticks
Read-onlyIdempotent

Fetch historical OHLCV candlestick data for a security symbol. Configure period from 1 minute to yearly, count up to 1000, and select intraday or all trading sessions.

Instructions

Get candlestick data (OHLCV). Only symbol is required; period defaults to day, count to 100 (max 1000), forward_adjust to false, trade_sessions to all. period: 1m/5m/15m/30m/60m/day/week/month/year. trade_sessions: intraday/all. If the account's entitlement caps out below the requested count, this returns as many candles as allowed instead of erroring — check the returned array length against count if an exact number matters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_jqNoOptional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response.
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". Use the canonical form — a padded code like "00700.HK" returns an empty record, not an error.
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.

  1. Changed3 schema fields changedv0.12.0
    • addedInput schema / properties / _jq / description
      Added value: +"Optional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response."
    • removedInput schema / properties / count / format
      Removed value: -"uint"
    • changedInput schema / properties / symbol / description
      Previous value: -"Security symbol, e.g. \"700.HK\""New value: +"Security symbol, e.g. \"700.HK\". Use the canonical form — a padded code like \"00700.HK\" returns an empty record, not an error."
  2. Changed1 schema field changedv0.10.6
    • addedInput schema / properties / _jq
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"CandlesticksParam"
  4. Changed9 schema fields changedv0.4.9
    • 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_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",
      -  "count",
      -  "forward_adjust",
      -  "trade_sessions"
      -]New value: +[
      +  "symbol"
      +]
  5. Addedv0.4.5
  6. Removedv0.4.0
  7. Addedv0.3.2
  8. Removedv0.3.1
  9. First observedv0.1.12

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond that: the tool silently returns fewer candles when entitlement caps the count instead of erroring, and tells the agent to verify the returned array length. This is a meaningful edge case not present in the schema.

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 description is three sentences and front-loads the purpose before diving into defaults and caveats. It is efficient and each sentence earns its place, though the middle sentence packs a long list of defaults and allowed values that is also present in the schema.

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?

For a read-only data-fetching tool with no output schema, the description covers the essential operational details: required parameters, defaults, and the entitlement cap edge case. It does not explain the exact response shape or ordering, but the OHLCV naming and array-length mention give the agent enough to infer what to expect. The lack of differentiation from sibling history tools is the main 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%, so the schema already documents every parameter. The description repeats the defaults and allowed values for period and trade_sessions, which does not add new meaning beyond the schema. The only extra is the note that only symbol is required, which is a minimal addition.

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 description opens with a specific verb and resource — 'Get candlestick data (OHLCV)' — making the core function immediately clear. However, it does not distinguish itself from sibling tools like history_candlesticks_by_date or history_candlesticks_by_offset, so an agent may not know which candlestick tool to choose for historical vs. period-based data.

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?

The description gives clear context: only symbol is required, defaults are listed, and the entitlement cap behavior is explained. But it provides no explicit guidance on when to use this tool versus alternatives, nor any 'when not to use' conditions. Usage is implied rather than stated.

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

Deploy Server

Other Tools