Skip to main content
Glama
florinel-chis

oanda-mcp

get_candles

Read-only

Fetch OHLC candle data for Oanda instruments with adjustable granularity, count, or time range. Choose mid, bid, or ask prices and receive volume and completion status for each candle.

Instructions

Fetch OHLC candles for an instrument.

Specify either count (most recent N candles) or an RFC3339 from_time/to_time range; count cannot be combined with both range bounds. A single request returns at most 5000 candles — for longer ranges, paginate by setting from_time to the exact time of the last candle received (not past it, or one candle is silently skipped) and include_first to false (note the excluded first candle still counts against count, so a full follow-up page holds one candle fewer).

Returns instrument, granularity and candles: each candle has an RFC3339 time, volume (number of price ticks, an integer), complete (false means the candle is still forming — skip it for analysis), and o/h/l/c prices as decimal strings (flattened for a single price component, nested under mid/bid/ask when several components are requested).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of most-recent candles to return (max 5000; API default 500). Must not be combined with both from_time and to_time.
priceNoPrice components to include: M=mid, B=bid, A=ask, or a combination such as BA or MBA.M
smoothNoWhen true, each candle's open equals the previous candle's close.
to_timeNoRange end, RFC3339 timestamp (sent as the 'to' parameter).
from_timeNoRange start, RFC3339 timestamp (sent as the 'from' parameter).
instrumentYesInstrument name in Oanda format, e.g. EUR_USD or DE30_EUR.
granularityNoCandle granularity: S/M/H prefixes are seconds/minutes/hours (e.g. M15, H4), D=day, W=week, M=month.H1
include_firstNoOnly used with from_time: include the candle covering from_time (which may be timestamped before it). Set false when paginating with from_time equal to the last candle already received.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond the readOnlyHint annotation, the description richly discloses behavior: maximum 5000 candles, pagination edge cases (setting from_time to exact last time to avoid silent skip, include_first semantics, the excluded candle counting against count), and candle attributes (volume as integer, complete flag semantics, price decimal strings with flattening/nesting). This is substantial value beyond annotations.

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 dense but every sentence earns its place. The structure is logical: first sentence states the core action, second paragraph handles parameter constraints and pagination, third covers response format. It is appropriately sized for an 8-parameter tool with no redundancy.

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 the tool's complexity, the schema coverage, and the output schema existence, the description is complete. It explains parameter interactions, return fields, and behavioral nuances like silent skips and incomplete candles. There are no critical gaps about how to use or interpret the tool.

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

Parameters5/5

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

Although the schema has 100% coverage, the description adds significant meaning: the mutual exclusivity of count with both range bounds, the exact pagination behavior of include_first, the distinction between range and count, and the meaning of complete and price component flattening. This goes well beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch OHLC candles for an instrument' with a specific verb and resource, and elaborates on count/range behavior. However, it does not explicitly distinguish this tool from the closely related sibling get_latest_candles, so it lacks overt sibling differentiation.

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?

The description provides clear context on when to use count vs. from_time/to_time, including the constraint that count cannot combine with both bounds. It also details pagination strategy, but it does not explicitly mention when to use an alternative like get_latest_candles or list_pricing, so it falls short of full when/when-not guidance.

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/florinel-chis/oanda-mcp'

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