Skip to main content
Glama

Get Recent Trades

get_recent_trades
Read-onlyIdempotent

Retrieves anonymized recent trades (time, side, price, quantity, volume) for an instrument, fetching newest trades hour-by-hour backwards within the current UTC day. Optionally outputs to file.

Instructions

Anonymized recent trades feed for one instrument: time, side, price, quantity, volume. Returns the newest limit trades, fetched hour-by-hour backwards from to (the BCS backend caps one request at a 1-hour period and ~4 MB response). Optional from/to select an explicit window. IMPORTANT: the API serves trades of the CURRENT UTC DAY only (from 00:00 UTC = 03:00 MSK) — earlier window starts are clamped, yesterday is unavailable. Records carry no trade id: identical rows within the same second are genuine distinct trades, not duplicates. Pass outputPath to dump a period (default: the whole current UTC day) to a file via hour-by-hour windows. Bond prices are quoted in % of face value, not currency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd of period, ISO 8601 (default: now)
fromNoStart of period, ISO 8601 (default: auto-widening recent window inline / start of the current UTC day with outputPath); clamped to 00:00 UTC of the current day — the API keeps no older trades
limitNoMax trades returned inline, newest first (ignored with outputPath — the whole period is written)
tickerYesTicker, e.g. SBER
classCodeNoBoard class code (resolved via find_instrument when omitted)
outputPathNoWrite the full result to this file (path relative to the output root: BCS_OUTPUT_DIR or server cwd) instead of returning it inline. The response becomes a short summary {savedTo, records, bytes, sample}. Use for bulk data to keep the context clean. For get_candles this also enables full-history fetching (chunking beyond the 1000-bar API limit).
outputFormatNoFile format; default json (or csv if outputPath ends with .csv). csv writes the main flat array of the response.
Behavior4/5

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

The description adds behavioral details beyond the annotations, such as the absence of trade IDs, clamping behavior, bond pricing in % of face value, and hour-by-hour fetching. It does not contradict any 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?

The description is relatively lengthy but all sentences add value. It is front-loaded with the core purpose and then covers important details. A minor reduction could be made without losing essential information.

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?

Given the number of parameters, backend constraints, and file output feature, the description covers most aspects: date restrictions, limit behavior, outputPath semantics, and bonds pricing. It lacks an explicit mention of inline return structure but the summary and sample are implied.

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?

With 100% schema coverage, the description adds value by explaining nuances: from clamping, limit ignored with outputPath, outputPath behavior, classCode resolution via find_instrument, and outputFormat details. This goes beyond mere schema descriptions.

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 clearly identifies the tool as an anonymized recent trades feed for a single instrument, specifying the verb ('get') and resource ('recent trades') and enumerating the data fields. It distinguishes itself from siblings like get_trades by mentioning 'anonymized' and focusing on recent trades.

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

Usage Guidelines4/5

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

Provides explicit guidance on when to use and important constraints: the API serves only current UTC day, hour-by-hour fetching, backend caps, and the effect of outputPath. It does not explicitly state alternatives or when not to use, but the context is clear enough for an agent to decide.

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/human-turn/bcs-mcp'

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