Skip to main content
Glama
CoinRithm

CoinRithm/coinrithm-agent-trading

Official

Get OHLCV candles

get_candles
Read-only

Fetch OHLCV candles for coins to compute RSI, moving averages, and breakout signals. Choose a range to set lookback and bar resolution, then analyze price trends in fiat.

Instructions

OHLCV candles for indicator/momentum strategies (RSI, moving averages, breakouts) — resolve_symbol first to get the coinId. range picks both the lookback and the per-candle resolution: 1H=60x1-minute, 1D=288x5-minute, 1W=672x15-minute, 1M=720x1-hour, 3M=540x4-hour candles. Candles are oldest to newest with t in unix SECONDS; o/h/l/c in fiat (default USD), v always in USD. These are sampled composite-price bars, not venue trade candles. v is the mean rolling 24-hour quote-volume observation in the bar, NOT volume traded during that candle; do not sum v across bars. Paper trading only — virtual funds (50,000 mUSD). Not financial advice. Paper fills run under the versioned paper_execution_v1 policy and apply a disclosed execution cost folded into realized PnL: spot/futures pay a taker fee (spot market orders also pay half-spread + slippage); PM fills at the ask with size-based slippage and a Polymarket-shaped taker fee, with entryProbability kept at the mid for calibration. See the executionModel in quote/trade results — a rehearsal cost, not an exchange fill guarantee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fiatNoQuote currency for o/h/l/c (default USD).
rangeNoLookback + resolution (default 1D = 288 five-minute candles).
coinIdYesCoin UCID (e.g. "1" = BTC). Use resolve_symbol to find it.
agentTraceNoOptional private trace metadata stored in the caller's ledger.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue when CoinRithm returned a successful 2xx response.
bodyNoParsed CoinRithm response body, or raw text when the response is not JSON.
httpStatusYesHTTP status returned by CoinRithm, or 0 for network errors.
ledgerStatusNoLedger write status header returned by CoinRithm, when present.
ledgerEventIdNoPrivate AgentActionEvent id returned by /api/agent/*, when present.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.8
    • addedInput schema / properties / agentTrace
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional private trace metadata stored in the caller's ledger.",
      +  "properties": {
      +    "confidence": {
      +      "description": "Optional confidence score from 0 to 1.",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "decisionId": {
      +      "description": "Agent decision id for quote/write attribution.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "rationaleSummary": {
      +      "description": "Optional concise rationale summary. Do not include chain-of-thought, secrets, or account identity.",
      +      "maxLength": 1200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "runId": {
      +      "description": "Agent run id for grouping.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "strategyLabel": {
      +      "description": "Short strategy label, self-reported by the caller.",
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / ledgerEventId
      Added value: +{
      +  "description": "Private AgentActionEvent id returned by /api/agent/*, when present.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / ledgerStatus
      Added value: +{
      +  "description": "Ledger write status header returned by CoinRithm, when present.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Addedv0.1.7

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare read-only/non-destructive/open-world; the description goes well beyond that with genuinely non-obvious traits: candles are oldest-to-newest, t is in unix SECONDS, o/h/l/c are in fiat while v is always USD, bars are sampled composite prices rather than venue trade candles, and v is a rolling 24h quote-volume observation that must not be summed. These are the semantics an agent would otherwise get wrong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loading is strong — purpose, then range semantics, then units and the v caveat. However the closing paragraph about paper fills, taker fees, Polymarket-shaped fees and entryProbability describes execution, not candle retrieval, and reads as boilerplate carried over from quote/trade tools; it does not earn its place here.

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?

Given an output schema exists, return values need no explanation, and the description covers everything else an agent needs: the prerequisite resolution step, unit conventions, ordering, data provenance, and the critical misuse warning about summing v. Nothing needed 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 100%, so the baseline is 3, but the description adds real value beyond the schema by decoding the range enum into concrete lookback/resolution pairs (1H=60x1-minute, 1D=288x5-minute, 1W=672x15-minute, 1M=720x1-hour, 3M=540x4-hour) and confirming fiat's default and unit behavior. Only the agentTrace sub-object is left to the schema.

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?

Names a specific verb+resource (OHLCV candles) and immediately scopes the use case to indicator/momentum strategies (RSI, moving averages, breakouts). It also names the sibling dependency (resolve_symbol) so the agent can distinguish this from other market-data tools without opening a schema.

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?

Explicit prerequisite: 'resolve_symbol first to get the coinId' — the single most likely failure mode for this call. Usage context is clear from the strategy framing, but it never excludes alternatives (e.g., get_market_context or the pm_data_* family) or states when candles are the wrong choice.

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