Skip to main content
Glama
florinel-chis

oanda-mcp

list_trades

Read-only

Retrieve recent trades from your Oanda account with filters for state, instrument, and trade ID. Get details like entry price, current units, and realized/unrealized profit or loss.

Instructions

List trades on the configured account, most recent first.

Returns {"trades": [...], "lastTransactionID": "..."}. Each trade has id, instrument, price (entry fill, decimal string), openTime (RFC3339), state, initialUnits and currentUnits (decimal strings whose sign gives direction: positive = long, negative = short), realizedPL, unrealizedPL, marginUsed (decimal strings in the account's home currency), and — when attached — the dependent orders takeProfitOrder, stopLossOrder, and trailingStopLossOrder (each with id and price or distance). Closed trades additionally carry averageClosePrice and closeTime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of trades to return (API maximum 500).
stateNoTrade state to filter by.OPEN
before_idNoMaximum trade ID to return (pagination cursor). Omit to start from the most recent trades; pass the smallest ID from the previous page to fetch older trades.
instrumentNoOnly return trades for this instrument, e.g. 'EUR_USD'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations provide readOnlyHint=true, and the description adds meaningful behavior: ordering (most recent first), return structure (trades array, lastTransactionID), and field semantics (e.g., sign of units indicates direction). It does not contradict annotations and adds value beyond the safety flag.

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 front-loaded with the purpose and then provides a detailed but organized return object breakdown. It is somewhat long but each sentence adds field-level detail, avoiding fluff. Slightly more verbose than necessary given an output schema exists, but remains well-structured.

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?

For a list tool with rich schema and annotations, the description is comprehensive: it explains ordering, return shape, field meanings, and extras for closed trades. It covers all important behavioral aspects not already encoded in structured data, leaving little ambiguity.

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% with detailed explanations for all four parameters (limit, state, before_id, instrument). The description itself does not discuss parameters, so the schema carries the burden, matching the baseline of 3.

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 states the tool lists trades on the configured account, with a specific verb and resource. It also distinguishes from siblings like list_open_trades by implying a broader scope through the return details and field descriptions.

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 use for listing trades generally but does not explicitly mention when to prefer this over siblings like list_open_trades or get_trade. There is no when-not-to-use guidance, though the schema filters (state, instrument) hint at usage scenarios.

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