Skip to main content

Eterna MCP for agents

Partners building AI trading agents can connect end-user or operator agents to Eterna through the public Model Context Protocol (MCP) gateway. Agents call a sandboxed execute_code tool with the Eterna TypeScript SDK instead of chaining dozens of raw tool calls.

Public endpoints​

ResourceURL
MCP (streamable HTTP)https://mcp.eterna.exchange/mcp
Agent marketing / discoveryhttps://ai.eterna.exchange
Tools reference (open source)eterna-mcp tools reference

Staging mirrors use *.staging.eterna.exchange hostnames during integration.

Execution model​

  1. Agent registers (or reuses) an isolated sub-account via MCP onboarding tools.
  2. Agent sends TypeScript to execute_code; Eterna runs it in a sandboxed Deno runtime with the eterna.* SDK bound to that sub-account.
  3. One round-trip can compose balance reads, market data, and order placement.

The SDK exposes 30+ methods across market data, technical analysis, trading, account, and funding.

Markets (linear default, spot explicit)​

MarketHow agents tradeNotes
USDT linear perpetualsDefault for placeOrder, getPositions, getTickers, and related callsCore live book; see Availability labels
USDT spotPass market: "spot" on supported trading and market-data methodsSame sub-account unified wallet; no leverage / reduce-only on spot orders
Exit spot holdingssellSpotBalance(symbol)Market-sells available base coin for a BASEUSDT pair; lot-size rounding may leave dust below min qty

Perpetual-only parameters (leverage, reduceOnly, positionIdx, attached TP/SL on linear) must be omitted for spot orders.

Partner vs retail positioning​

  • Retail agent landing (ai.eterna.exchange) focuses on perpetual futures in public copy.
  • Institutional partners should treat MCP as supporting both the live linear perp book and USDT spot where enabled for the agent sub-account, subject to whitelist and commercial terms.

Security expectations​

  • Treat MCP credentials like API keys: backend or secure agent host only, never in browser bundles.
  • Sub-accounts are scoped without withdrawal permissions; keys are shown once at registration.
  • See Integration overview for partner-side secret handling.