Why Eterna is unusual here

Most exchanges give you a REST API and leave the agent plumbing to you. Eterna ships the plumbing: a Model Context Protocol endpoint, an official CLI, a sandboxed code runtime with an injected SDK, and an account model designed around the assumption that something automated will hold the keys.1

Combined with flat fees of 0.014% maker and 0.035% taker and sub-200ms execution latency, that matters more for agents than for humans: an agent that rebalances often is far more fee-sensitive than a discretionary trader holding for days.1

Before you start

  • An Eterna account. Authentication is wallet-based with no KYC, so there are no documents to upload.1
  • Node.js installed, for the CLI.
  • An MCP-capable client. Claude and Openclaw are supported today; Eterna lists ChatGPT, Cursor, Gemini, LangChain, CrewAI and AutoGen as coming soon.1
  • Test capital only. Read the safety section before you fund anything meaningfully.

Step 1 — Provision an isolated sub-account

Do not hand an agent your main account. Eterna’s model issues the agent an isolated sub-account with its own API key and no withdrawal permissions, and keys are stored Argon2-hashed.1

This is the single most important step and it is easy to skip. An agent with withdrawal rights is an agent that can be prompt-injected into draining you. An agent confined to a sub-account with no withdrawal path can, at worst, lose the capital you deliberately placed in that sub-account. Size that sub-account as the maximum you are willing to lose to a bug.

Step 2 — Connect the MCP endpoint

Eterna exposes MCP at https://mcp.eterna.exchange/mcp.1 In Claude, add it as a remote MCP server in your client configuration:

{
  "mcpServers": {
    "eterna": {
      "url": "https://mcp.eterna.exchange/mcp",
      "headers": {
        "Authorization": "Bearer ${ETERNA_API_KEY}"
      }
    }
  }
}

Keep the key in an environment variable, never inline in a config file you might commit. Once connected, the client discovers Eterna’s tools automatically and your agent can query state and place orders in natural language.

Step 3 — Install the CLI

The official CLI covers login, account state and execution without writing any code:

npx @eterna-hybrid-exchange/cli login
npx @eterna-hybrid-exchange/cli status
npx @eterna-hybrid-exchange/cli balance
npx @eterna-hybrid-exchange/cli positions

Credentials land in ~/.eterna/credentials.json. Override the location with ETERNA_CONFIG_DIR if you are running several agents side by side — one config directory per agent keeps their identities from colliding.1

Step 4 — Use the sandboxed runtime for real strategies

This is where Eterna’s design pays off. Rather than having the agent make dozens of individual tool calls, you give it one tool — execute_code — that runs TypeScript in a sandboxed Deno runtime with an eterna.* SDK injected. The SDK exposes roughly 29 methods, and Eterna reports the approach consumes about 90% fewer tokens than equivalent tool-call chains.1

const positions = await eterna.getPositions();
const account = await eterna.getAccountSnapshot();

const exposure = positions.reduce((sum, p) => sum + Math.abs(p.notional), 0);
const cap = account.equity * 3;

if (exposure > cap) {
  const worst = positions.sort((a, b) => a.unrealizedPnl - b.unrealizedPnl)[0];
  await eterna.closePosition({ symbol: worst.symbol });
}

return { exposure, cap, positions: positions.length };

The token saving is not cosmetic. Fewer tokens per decision cycle means you can run tighter loops within the same budget, and it keeps the model’s context focused on the decision instead of on serialised API responses.

Skip the setup — clone the starter repo

I published an MIT-licensed starter that wires all of this together: Claude and CLI setup docs, a fee reference, runnable TypeScript examples, and a system prompt for a risk-aware trading agent. github.com/stevevstd-oss/eterna-mcp-agent-starter3

Step 5 — Guardrails that are not optional

Constrain in the prompt

State maximum position size, maximum leverage, allowed symbols and a daily loss limit explicitly in the system prompt. Models do not infer conservatism.

Constrain in code

Prompt constraints are advisory. Enforce the same limits inside your strategy code, where they cannot be talked around by a bad input or an unexpected market state.

Paper trade first

Run the loop read-only for days before letting it execute. Log every decision and diff it against what you would have done.

Cap the blast radius

No withdrawal permissions, an isolated sub-account, and only capital you can afford to lose entirely. Leveraged perps liquidate.

One fee note for agent operators

Because Eterna’s EHX payback is calculated per fee event rather than per position, a high-frequency agent that scales in and out generates a credit on each of those fee events.4 That does not make trading free — fees are still debited in USDT and the credit arrives as in-app EHX at a fixed internal rate — but it does mean turnover is treated less punitively than on a venue with pure sunk-cost fees. The mechanics are worth understanding properly before you factor it into a strategy: see how EHX Payback actually works.

Where to go next

The deeper reference for Eterna’s agent stack lives on the AI agent trading page. For how the venue stacks up on cost before you commit an agent to it, see the platform comparison. To open an account: ehx.app/r/Steve.