Skip to main content
Glama

My trade history

get_my_trade_history
Read-onlyIdempotent

Recent trades opened through TradeHub with entry, stop, take-profit, leverage, realised profit or loss, the fees and funding they paid, and the net result. Third-party apps see only the trades they opened; the user's own keys and Telegram see all. Use for reviews and reports. Not for live positions (use get_my_positions). Inputs: symbol (one coin), limit (1-200), closed_since, before (pages: pass next_before back until it is null). Sizes in the base coin, money in USD. Next: get_my_positions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_my_trade_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMost recent N trades
beforeNoNext page: the next_before of the previous answer
symbolNoOnly trades in this base coin, e.g. ETH; omit for all
closed_sinceNoOnly trades closed at or after this time (ISO 8601); open trades are left out

Output Schema

NameRequiredDescriptionDefault
tradesYesNewest first
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog
next_beforeNoMore trades: pass this as before for the next page; null at the end

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Only trades in this base coin, e.g. ETH; omit for all",
      +  "maxLength": 20,
      +  "minLength": 1,
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed7 schema fields changed
    • addedOutput schema / $defs / Trade / properties / funding_status
      Added value: +{
      +  "description": "done; split (other TradeHub trades on the same coin and exchange were open at the same time: the position's funding is shared by size over each stretch of time); unknown (the exchange never showed it); null until read",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / Trade / properties / funding_usd
      Added value: +{
      +  "description": "Funding this trade paid while open, USD (received is negative), from the exchange's funding records; 0 in the sandbox; null while open, until read (a few minutes after the close), or when funding_status is unknown",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedOutput schema / $defs / Trade / properties / net_pnl
      Removed value: -{
      -  "description": "pnl minus fees_usd, USD (null while open)",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / $defs / Trade / properties / net_pnl_usd
      Added value: +{
      +  "description": "pnl_usd minus fees_usd and funding_usd (when known), USD (null while open)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedOutput schema / $defs / Trade / properties / pnl
      Removed value: -{
      -  "description": "Realised profit or loss before fees, USD (null while open)",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / $defs / Trade / properties / pnl_usd
      Added value: +{
      +  "description": "Realised profit or loss before fees and funding, USD (null while open)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / $defs / Trade / required
      Previous value: -[
      -  "venue",
      -  "symbol",
      -  "side",
      -  "size",
      -  "entry_price",
      -  "stop_loss",
      -  "take_profit",
      -  "leverage",
      -  "pnl",
      -  "opened_at",
      -  "closed_at",
      -  "agent_id",
      -  "request_id"
      -]New value: +[
      +  "venue",
      +  "symbol",
      +  "side",
      +  "size",
      +  "entry_price",
      +  "stop_loss",
      +  "take_profit",
      +  "leverage",
      +  "pnl_usd",
      +  "opened_at",
      +  "closed_at",
      +  "agent_id",
      +  "request_id"
      +]
  3. Changed74 schema fields changed
    • removedInput schema / properties / before / anyOf
      Removed value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / before / default
      Removed value: -null
    • addedInput schema / properties / before / minimum
      Added value: +1
    • removedInput schema / properties / before / title
      Removed value: -"Before"
    • addedInput schema / properties / before / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / closed_since / anyOf
      Removed value: -[
      -  {
      -    "format": "date-time",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / closed_since / default
      Removed value: -null
    • addedInput schema / properties / closed_since / format
      Added value: +"date-time"
    • removedInput schema / properties / closed_since / title
      Removed value: -"Closed Since"
    • addedInput schema / properties / closed_since / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / title
      Removed value: -"get_my_trade_historyArguments"
    • removedOutput schema / $defs / Trade / properties / agent_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / agent_id / title
      Removed value: -"Agent Id"
    • addedOutput schema / $defs / Trade / properties / agent_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / closed_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / closed_at / title
      Removed value: -"Closed At"
    • addedOutput schema / $defs / Trade / properties / closed_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / $defs / Trade / properties / deprecation / additionalProperties
      Added value: +true
    • removedOutput schema / $defs / Trade / properties / deprecation / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / deprecation / default
      Removed value: -null
    • removedOutput schema / $defs / Trade / properties / deprecation / title
      Removed value: -"Deprecation"
    • addedOutput schema / $defs / Trade / properties / deprecation / type
      Added value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / entry_price / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / entry_price / title
      Removed value: -"Entry Price"
    • addedOutput schema / $defs / Trade / properties / entry_price / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / fees_settled / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / fees_settled / default
      Removed value: -null
    • removedOutput schema / $defs / Trade / properties / fees_settled / title
      Removed value: -"Fees Settled"
    • addedOutput schema / $defs / Trade / properties / fees_settled / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / fees_usd / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / fees_usd / default
      Removed value: -null
    • removedOutput schema / $defs / Trade / properties / fees_usd / title
      Removed value: -"Fees Usd"
    • addedOutput schema / $defs / Trade / properties / fees_usd / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / leverage / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / leverage / title
      Removed value: -"Leverage"
    • addedOutput schema / $defs / Trade / properties / leverage / type
      Added value: +[
      +  "number",
      +  "integer",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / net_pnl / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / net_pnl / default
      Removed value: -null
    • removedOutput schema / $defs / Trade / properties / net_pnl / title
      Removed value: -"Net Pnl"
    • addedOutput schema / $defs / Trade / properties / net_pnl / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / opened_at / title
      Removed value: -"Opened At"
    • removedOutput schema / $defs / Trade / properties / pnl / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / pnl / title
      Removed value: -"Pnl"
    • addedOutput schema / $defs / Trade / properties / pnl / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / reason / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / reason / default
      Removed value: -null
    • removedOutput schema / $defs / Trade / properties / reason / title
      Removed value: -"Reason"
    • addedOutput schema / $defs / Trade / properties / reason / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / request_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / request_id / title
      Removed value: -"Request Id"
    • addedOutput schema / $defs / Trade / properties / request_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / side / title
      Removed value: -"Side"
    • removedOutput schema / $defs / Trade / properties / size / title
      Removed value: -"Size"
    • removedOutput schema / $defs / Trade / properties / stop_loss / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / stop_loss / title
      Removed value: -"Stop Loss"
    • addedOutput schema / $defs / Trade / properties / stop_loss / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / symbol / title
      Removed value: -"Symbol"
    • removedOutput schema / $defs / Trade / properties / take_profit / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / $defs / Trade / properties / take_profit / title
      Removed value: -"Take Profit"
    • addedOutput schema / $defs / Trade / properties / take_profit / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / $defs / Trade / properties / venue / title
      Removed value: -"Venue"
    • removedOutput schema / $defs / Trade / title
      Removed value: -"Trade"
    • addedOutput schema / properties / deprecation / additionalProperties
      Added value: +true
    • removedOutput schema / properties / deprecation / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / deprecation / default
      Removed value: -null
    • removedOutput schema / properties / deprecation / title
      Removed value: -"Deprecation"
    • addedOutput schema / properties / deprecation / type
      Added value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / next_before / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / next_before / default
      Removed value: -null
    • removedOutput schema / properties / next_before / title
      Removed value: -"Next Before"
    • addedOutput schema / properties / next_before / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedOutput schema / properties / trades / title
      Removed value: -"Trades"
    • removedOutput schema / title
      Removed value: -"TradeHistory"
  4. Changed3 schema fields changed
    • addedInput schema / properties / before
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Next page: the next_before of the previous answer",
      +  "title": "Before"
      +}
    • addedInput schema / properties / closed_since
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only trades closed at or after this time (ISO 8601); open trades are left out",
      +  "title": "Closed Since"
      +}
    • addedOutput schema / properties / next_before
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "More trades: pass this as before for the next page; null at the end",
      +  "title": "Next Before"
      +}
  5. Changed4 schema fields changed
    • addedOutput schema / $defs / Trade / properties / fees_settled
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "True when fees_usd is entirely the amounts actually charged",
      +  "title": "Fees Settled"
      +}
    • addedOutput schema / $defs / Trade / properties / fees_usd
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Trading fees for opening and closing it, USD: what the exchange charged where its fill records say, else the estimate",
      +  "title": "Fees Usd"
      +}
    • addedOutput schema / $defs / Trade / properties / net_pnl
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "pnl minus fees_usd, USD (null while open)",
      +  "title": "Net Pnl"
      +}
    • changedOutput schema / $defs / Trade / properties / pnl / description
      Previous value: -"Realised profit or loss, USD (null while open)"New value: +"Realised profit or loss before fees, USD (null while open)"
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, so the safety bar is covered. The description adds genuine context the annotations cannot: the per-caller visibility scoping model, the cursor pagination contract ('pass next_before back until it is null'), and the unit conventions (sizes in base coin, money in USD).

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 selection criteria, then a compact 'Inputs:' block. The telegraphic style packs a lot in but reads slightly like notes rather than prose; every clause still carries information, so little is wasted.

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 read-only history tool with an output schema, an agent needs scope, visibility semantics, pagination, and units — all four are present. Nothing required to call it 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 baseline is 3; the description still adds value by clarifying the pagination loop termination ('until it is null') and the unit semantics of returned sizes. It doesn't elaborate on symbol formatting or limit bounds beyond what the schema states.

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 resource (trades opened through TradeHub) and enumerates exactly what each record carries: entry, stop, take-profit, leverage, realised PnL, fees, funding, net result. It also explicitly separates itself from get_my_positions, so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the intended use ('reviews and reports') and an explicit exclusion with the alternative named ('Not for live positions (use get_my_positions)'). It adds a visibility rule that determines whether the caller sees anything at all — third-party apps only see their own trades, own keys/Telegram see all.

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