Skip to main content
Glama

fxapi Exchange Rates MCP Server

Hourly or daily OHLC candles

getOhlc

Returns open, high, low and close per hour or per day for 1 to 10 currencies, built from the stored rates. Requires a plan that includes the range endpoint (medium and up).

  • hour: from the minute rates. datetime_start not more than 7 days back, not more than 7 days between start and end. Needs a plan with quarter-hourly updates or finer.

  • day (default): from the hourly rates. datetime_start not more than 3 months back, not more than 92 days between start and end. Needs a plan with hourly updates or finer.

Each candle closes on the stored rate at the end of its hour or day and opens on the close of the candle before it (on its own close after a gap); high and low are the extremes of the finer rates in between and always include the open and the close. datetime is the start of the candle. Candles whose close is not stored yet (e.g. the hour or day still running) are left out. A request costs one request, however many currencies and candles it holds.

shape=compact gives every candle as [datetime, open, high, low, close], precision rounds, and format=csv gives one row per candle: datetime,base_currency,currency,open,high,low,close.

Input Schema

NameRequiredDescriptionDefault
shapeNo`default`: every rate as `{"code": "EUR", "value": 0.918456}`. `compact`: plain values, `"EUR": 0.918456`.
formatNo`json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`.
intervalNoThe length of each candle.
precisionNoRound every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1).
currenciesYes1 to 10 currency codes, comma-separated (e.g. `EUR,GBP`) or as `currencies[]=`.
datetime_endYesEnd of the range as an ISO 8601 datetime or date, on or after `datetime_start`. The last candle is the one this moment falls in.
base_currencyNoThe base currency that all returned values are relative to. Defaults to `USD`.
datetime_startYesStart of the range as an ISO 8601 datetime or date (e.g. `2026-09-29T00:00:00Z`). The first candle is the one this moment falls in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / precision / description
      Previous value: -"Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals."New value: +"Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1)."
  2. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"`json` (default) or `csv`. CSV has a header line and one row per currency (and point in time), values without exponent notation."New value: +"`json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "json",
      -  "csv"
      -]New value: +[
      +  "json",
      +  "csv",
      +  "xlsx"
      +]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations carry only a title, so the description bears the full burden and does so: it explains how candles are constructed (open = prior close, high/low include open and close, gaps handled), that unfinished candles are omitted, and that the whole request costs one request regardless of currency/candle count. The plan-tier gating is disclosed up front rather than surfacing as an error.

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 and plan gate, then bulleted interval constraints, then candle semantics, then output shapes — a sensible ordering. It is on the long side and the CSV/compact restatement partially duplicates the schema's own parameter descriptions, but every section carries information an agent needs.

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 8 parameters, plan-tier gating, and no output schema, the description fills the gap: it covers lookback limits, default interval, candle construction edge cases, omission of in-progress candles, request costing, and the exact return representations for default, compact and CSV.

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 meaning: it tells the agent which finer rate series each interval is built from, that `day` is the default, that `datetime` is the candle start and `datetime_end` selects the candle it falls in, and it spells out the exact compact/CSV payload layouts including column order.

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?

Opens with a specific verb and resource: 'Returns open, high, low and close per hour or per day for 1 to 10 currencies, built from the stored rates.' That is clearly distinguishable from siblings like getHistorical, getRange or getFluctuation, which return different shapes of rate data.

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?

It gives concrete selection criteria between the two modes (hour needs 7-day windows and quarter-hourly plan; day needs 3-month/92-day windows and hourly plan) plus the plan requirement for the range endpoint, so the agent knows when the call will succeed. It stops short of naming sibling tools or stating when to prefer them (e.g. getHistorical for tick-level data), so it falls short of a 5.

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