Skip to main content
Glama

get_trade_history

Read-only

Retrieve successful spot trades for a GDEX account on a specified chain, newest first, with pagination by limit and cursor.

Instructions

Successful spot trades of a GDEX account on one chain, newest first (/v1/user_history, keyed by the control wallet). Page with limit (max 50) and cursor = nextCursor of the previous page.

Input Schema

NameRequiredDescriptionDefault
chainYesChain identifier
limitNoTrades per page, 1-50 (default 50)
cursorNonextCursor from the previous page
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
walletAddressNoControl wallet address (the GDEX userId)
sessionPrivateKeyNoNot needed (history is keyed by the control wallet); present so accountRef can fill walletAddress

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv5.1.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
    • changedInput schema / properties / chain / description
      Previous value: -"Optional chain filter"New value: +"Chain identifier"
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "nextCursor from the previous page",
      +  "type": "number"
      +}
    • removedInput schema / properties / endTime
      Removed value: -{
      -  "description": "End Unix timestamp",
      -  "type": "number"
      -}
    • removedInput schema / properties / limit / default
      Removed value: -20
    • addedInput schema / properties / limit / description
      Added value: +"Trades per page, 1-50 (default 50)"
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • removedInput schema / properties / page
      Removed value: -{
      -  "default": 1,
      -  "type": "number"
      -}
    • addedInput schema / properties / sessionPrivateKey
      Added value: +{
      +  "description": "Not needed (history is keyed by the control wallet); present so accountRef can fill walletAddress",
      +  "type": "string"
      +}
    • removedInput schema / properties / startTime
      Removed value: -{
      -  "description": "Start Unix timestamp",
      -  "type": "number"
      -}
    • changedInput schema / properties / walletAddress / description
      Previous value: -"Wallet address"New value: +"Control wallet address (the GDEX userId)"
    • changedInput schema / required
      Previous value: -[
      -  "walletAddress"
      -]New value: +[
      +  "chain"
      +]
  2. First observedv4.11.3

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly/openWorld, so the bar is low; the description still adds real behavior — results are filtered to successful trades only, ordered newest first, scoped to a single chain, and keyed by the control wallet. It also clarifies that sessionPrivateKey is not required, which is non-obvious. It stops short of describing pagination termination or result fields.

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?

Two sentences, front-loaded with what is returned before pagination mechanics, and every clause carries information. Minor density from stacked parentheticals (endpoint path, keying note, page parameters) keeps it from being perfectly clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only paginated list with no output schema and fully documented parameters, the description covers scope, filtering, ordering, and pagination adequately. It leaves out how pagination ends (e.g., null nextCursor) and what fields each trade contains, which an agent would otherwise have to discover.

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%, so the schema already documents chain, limit, cursor, accountRef, walletAddress, and sessionPrivateKey. The description's limit/cursor statements largely restate the schema; its only genuine addition is explaining that history is keyed by the control wallet, which is why the private key is unnecessary. Baseline 3 is appropriate.

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?

States a specific verb and resource (spot trades of a GDEX account), plus meaningful qualifiers — 'successful', 'on one chain', 'newest first' — that scope the result precisely. The GDEX/spot framing also implicitly separates it from the Hyperliquid sibling get_hl_trade_history, so an agent can route 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 Guidelines3/5

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

Gives operational guidance for retrieval (keyed by control wallet, page with limit and cursor) but never states when to choose this over get_hl_trade_history, get_token_trades, or get_portfolio, nor any prerequisites such as needing a connected account first. Usage is implied by the resource, not spelled out.

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

Deploy Server

Other Tools