Skip to main content
Glama

ohlcv

Read-onlyIdempotent

[Trading Data API] OHLCV candles (oldest-first) for crypto or stocks. Routes to Alpaca SIP / Alpaca-crypto / Coinbase.

Example: /v1/ohlcv?symbol=NVDA&timeframe=1h&limit=100

Use when you need historical candles to chart or compute indicators yourself. Not for only the latest price (use price) or a ready-made indicator (atr, fvg, liquidity_levels).

Behavior: read-only. Priced via x402 (USDC on Base) or free with WICKEDAPI_API_KEY; with neither, you get HTTP 402 with the decoded price in payment_required (a price quote, not a failure).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "ohlcv"
  }
}

Input Schema

NameRequiredDescriptionDefault
classNoOptional. stock|crypto for non-curated symbols.
limitNoOptional. Candles to return (default 100, max 300).
symbolYesRequired. e.g. BTC, NVDA, SPY.
timeframeNoOptional. 1m,5m,15m,30m,1h,2h,4h,6h,12h,1D,1W (default 1h).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely non-obvious traits: provider routing, oldest-first result ordering, and the x402 payment model where an HTTP 402 carries a decoded price quote in payment_required and is 'not a failure.' That last point materially changes how an agent should interpret an error response. It stops short of describing the candle object fields or pagination edge cases.

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?

Front-loaded purpose sentence, then a compact example, then routing guidance, then behavior/payment notes. Every block earns its place and nothing is repeated from the schema.

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 four-parameter read tool with no output schema, the description covers purpose, alternatives, provider routing, ordering, and the payment/error path. The only residual gap is the exact shape of returned candle objects, which is minor for a standard OHLCV list.

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 symbol, timeframe, limit, and class are all documented at the field level. The description only supplements with a concrete example query (symbol=NVDA&timeframe=1h&limit=100) and never touches the 'class' parameter, so it adds marginal semantics beyond the schema — baseline 3 is appropriate.

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 first sentence names a specific verb and resource (OHLCV candles), states ordering (oldest-first), asset coverage (crypto or stocks), and even the upstream routing (Alpaca SIP / Alpaca-crypto / Coinbase). It is unmistakably distinct from siblings like price, atr, fvg, and liquidity_levels, which are named explicitly.

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

Usage Guidelines5/5

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

It gives an explicit positive case (charting or computing indicators yourself) and explicit negative routing with named alternatives: 'Not for only the latest price (use price) or a ready-made indicator (atr, fvg, liquidity_levels).' An agent can decide between siblings without opening another schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.