Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

Get Crypto Trades

get_crypto_trades
Read-only

Fetch historical trade records for one or more crypto pairs, with configurable time ranges, sorting, and limits.

Instructions

Retrieve historical trade data for one or more cryptocurrencies.

When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoInclusive end time (RFC 3339). Omit for current time.
daysNoDays to look back when start is omitted (default 0).
sortNoTimestamp sort order — "asc" (default) or "desc".asc
hoursNoAdditional hours in the lookback (default 0).
limitNoMax total data points returned across all symbols, 1–10000 (default 1000).
startNoInclusive start time (RFC 3339). Omit to use relative lookback.
minutesNoAdditional minutes in the lookback (default 15).
symbolsYesComma-separated crypto pairs (e.g. "BTC/USD" or "BTC/USD,ETH/USD").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.3.2
    • addedInput schema / properties / days / description
      Added value: +"Days to look back when start is omitted (default 0)."
    • addedInput schema / properties / end / description
      Added value: +"Inclusive end time (RFC 3339). Omit for current time."
    • addedInput schema / properties / hours / description
      Added value: +"Additional hours in the lookback (default 0)."
    • addedInput schema / properties / limit / description
      Added value: +"Max total data points returned across all symbols,\n   1–10000 (default 1000)."
    • addedInput schema / properties / minutes / description
      Added value: +"Additional minutes in the lookback (default 15)."
    • addedInput schema / properties / sort / description
      Added value: +"Timestamp sort order — \"asc\" (default) or \"desc\"."
    • addedInput schema / properties / start / description
      Added value: +"Inclusive start time (RFC 3339). Omit to use relative lookback."
    • addedInput schema / properties / symbols / description
      Added value: +"Comma-separated crypto pairs (e.g. \"BTC/USD\" or\n     \"BTC/USD,ETH/USD\")."
  2. Addedv2.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful behavioral context by explaining how start is computed when omitted. However, it does not disclose other behaviors such as pagination, cross-symbol limit application, or error conditions, though some of this is present in the schema and output schema.

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 two short sentences with no filler. The core action is front-loaded in the first sentence, and the important start/lookback nuance is in the second. Every sentence earns its place.

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 a fully described input schema, an output schema, and annotations covering read-only safety, the description only needs to add non-obvious behavior. It does that for the start/lookback interaction. The main gap is routing guidance among sibling crypto tools, but that is not essential for a correct call given the rich schema.

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 all 8 parameters. The description adds a clarifying note about the interaction of start with days/hours/minutes, but it does not substantively enrich the meaning of individual parameters beyond what the schema provides. 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 description opens with a specific verb and resource: 'Retrieve historical trade data for one or more cryptocurrencies.' It clearly distinguishes this from sibling latest-trade, bar, quote, and snapshot tools, and the plural support ('one or more') is stated explicitly.

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 implies usage for historical trade data but does not explicitly state when to prefer this tool over get_crypto_latest_trade, get_crypto_bars, or get_crypto_quotes. The relative lookback behavior is explained, but no when-not-to-use or alternative-selection guidance is provided.

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