Skip to main content
Glama

Market History

market_history
Read-only

Bulk history for one coin, one metric per call, in pages: 'price' (OHLCV candles, spot or perp), 'open_interest' (market-wide aggregate USD), 'funding' (OI-weighted rate, %/8h and annualized) or 'liquidations' (market-wide long/short USD per bucket). Returns up to 'limit' rows (default 200, max 1000) at or before 'end' (default now), oldest first, as compact columns + rows; pass the returned nextEndMs as 'end' to fetch the page before it, and 'start' to stop there. Reach: price is full venue history (Binance spot from 2017, futures from 2019) at 1m–1w; derivatives come from CoinGlass at 4h (about 180 days back), 6h/8h/12h (about 360 days) or 1d/1w (back to 2020) — use 1d for anything older than six months. The newest row may still be forming (newestForming). Use this to pull history; for a read of what is happening now, use the derivatives_* and research_* tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoLatest time to include: ISO-8601 or Unix ms. Default now. Pass nextEndMs here to page back.
limitNoRows per page, 1–1000. Default 200.
startNoEarliest time to include: ISO-8601 (UTC if no offset) or Unix ms. Paging stops here.
marketNoPrice only: spot (default) or perpetual candles.
metricYes
symbolYesCoin symbol, e.g. "BTC".
intervalNoBucket size. Price: 1m–1w except 6h/8h, default 1d. Derivatives: 4h, 6h, 8h, 12h, 1d or 1w; default 4h (funding 8h).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
rowsYesOldest first; each row is [timeMs, ...values] in column order; null where the source has no value
countYes
endMsNoThe page's end bound, Unix ms
unitsNoWhat each value column means
marketNoPrice only: spot or perp
metricYes
sourceNoProvider that answered this page
symbolYes
columnsYesNames of each row's cells; the first is timeMs (bucket open, Unix ms)
startMsNo
intervalNo
nextEndMsNoPass as 'end' for the page before this one; null when this page reached 'start' or the series' beginning
newestFormingNoNewest row's bucket is still open; the vendor rewrites it until it closes
earliestAvailableMsNoSet when 'end' was before the plan's history edge for this interval

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=true; the description adds pagination mechanics (pass nextEndMs back as 'end'), a 'start' stop condition, the fact that the newest row may still be forming (newestForming), and precise data provenance/retention windows per source. This is rich behavior beyond the annotation.

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?

Front-loaded with purpose, then paging, then reach, then routing; every section earns its place. Slightly redundant in restating limit/interval defaults already present in the schema, but the density is justified for a complex paginated tool.

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?

With an output schema present, return values need not be described, and the description still covers pagination flow, coverage limits, defaults, and sibling routing. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is high (86%) and carries most parameter docs, but the description adds real value the schema lacks: the meaning of each 'metric' enum value (OHLCV candles, market-wide OI aggregate, OI-weighted %/8h funding, long/short liquidation buckets) and the paging contract for 'end'/'start'.

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?

States a specific verb and resource ('Bulk history for one coin, one metric per call, in pages') and enumerates the exact metric modes with their semantics. It is clearly distinct from siblings such as market_candles and the derivatives_* snapshot tools.

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?

Explicitly routes the agent: 'Use this to pull history; for a read of what is happening now, use the derivatives_* and research_* tools.' It also gives selection rules, e.g. 'use 1d for anything older than six months' and interval availability by metric.

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.

Resources