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
| Resource | URL |
|---|---|
| MCP (streamable HTTP) | https://mcp.eterna.exchange/mcp |
| Agent marketing / discovery | https://ai.eterna.exchange |
| Tools reference (open source) | eterna-mcp tools reference |
Staging mirrors use *.staging.eterna.exchange hostnames during integration.
Execution model
- Agent registers (or reuses) an isolated sub-account via MCP onboarding tools.
- Agent sends TypeScript to
execute_code; Eterna runs it in a sandboxed Deno runtime with theeterna.*SDK bound to that sub-account. - 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)
| Market | How agents trade | Notes |
|---|---|---|
| USDT linear perpetuals | Default for placeOrder, getPositions, getTickers, and related calls | Core live book; see Availability labels |
| USDT spot | Pass market: "spot" on supported trading and market-data methods | Same sub-account unified wallet; no leverage / reduce-only on spot orders |
| Exit spot holdings | sellSpotBalance(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.