Skip to main content
Glama

trade_execute

Execute real market or limit perpetual futures orders on the configured network, with risk-limit enforcement and reduce-only support. Preview and confirm first; pending outcomes must not be resubmitted.

Instructions

Execute a REAL trade on the server's network (meta.network; PERP_NETWORK, default mainnet). IMPORTANT: Always call trade_preview first and get explicit user confirmation before calling this tool. Refused with RISK_VIOLATION when the order breaches the local risk limits (perp risk set; there is no override over MCP) or when the symbol is quarantined (only reduce-only orders pass). Every order is written to the execution log. Supports market and limit orders. Returns the uniform OrderResult (status, finality, filledSize, execution: slippage / protection price / TIF sent) with the raw venue response under legacy, plus top-level filledSize / requestedSize / partial. Outcomes: an unknown outcome (transport failure after send, or a non-final venue ack) → ok:false, code ORDER_PENDING, executed:false, pending:true and a "do NOT resubmit" remediation — the symbol is quarantined for opening orders until a human clears it; a final rejection / cancel with nothing filled → ORDER_REJECTED, executed:false; a cancel after a partial fill → executed:true, partial:true with the real filledSize. Hyperliquid: native perps only (HIP-3 dexes via the CLI --dex).

Input Schema

NameRequiredDescriptionDefault
tifNoLimit orders: GTC (default) | IOC | FOK | ALO (post-only); venue aliases GTT / GTX / TOB accepted
sideYesOrder side
sizeYesOrder size (base currency units)
priceNoLimit price (required for limit orders)
symbolYesTrading symbol (e.g., BTC, ETH, SOL)
exchangeYesExchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex, txflow (aliases accepted)
orderTypeNoOrder typemarket
reduceOnlyNoReduce-only order (close position only)
slippageBpsNoMarket orders: slippage bound in bps (default: settings defaultSlippageBps)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex (aliases accepted)"New value: +"Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex, txflow (aliases accepted)"
  2. Changed1 schema field changedv0.15.0
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex (aliases accepted)"New value: +"Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex (aliases accepted)"
  3. Changed3 schema fields changedv0.14.3
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange: pacifica, hyperliquid, lighter, or aster"New value: +"Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex (aliases accepted)"
    • addedInput schema / properties / slippageBps
      Added value: +{
      +  "description": "Market orders: slippage bound in bps (default: settings defaultSlippageBps)",
      +  "type": "number"
      +}
    • addedInput schema / properties / tif
      Added value: +{
      +  "description": "Limit orders: GTC (default) | IOC | FOK | ALO (post-only); venue aliases GTT / GTX / TOB accepted",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.3.12
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange: pacifica, hyperliquid, or lighter"New value: +"Exchange: pacifica, hyperliquid, lighter, or aster"
  5. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses that this is a real trade, that risk limits cannot be overridden over MCP, that orders are logged, and that quarantines affect opening orders. It also explains pending, rejected, and partial-fill outcomes in detail, including the critical 'do NOT resubmit' remediation.

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 long but front-loads the real-trade warning and preview requirement, and the length is justified by the tool's high-stakes behavior. Some sections are dense and could be split for readability, but 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?

Given the absence of annotations and output schema, the description is remarkably complete: it covers network context, risk refusals, quarantine behavior, order logging, return shape, and outcome handling. An agent has enough information to call this tool correctly and interpret the main result states.

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 input schema already documents all parameters clearly. The description adds high-level context such as market/limit support and reduce-only behavior during quarantine, but does not add parameter-level semantics beyond the schema.

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 states a specific verb and resource: execute a REAL trade on the server's network, and distinguishes it from the preview sibling by explicitly requiring trade_preview first. It also clarifies supported order types and that it returns a uniform OrderResult.

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?

It gives explicit preconditions: always call trade_preview and get user confirmation before invoking. It also names refusal conditions (risk violations, quarantined symbols) and the alternative path for quarantined symbols (reduce-only orders only).

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