# Eterna MCP SDK Reference: All 30+ eterna.* Methods

> Eterna MCP exposes 3 top-level tools (search_sdk, search_examples, execute_code) and 30 typed eterna.* SDK methods inside the execute_code Deno sandbox across 5 categories: Market Data (3), Technical Analysis (6), Trading for USDT perps and spot (7), Account (5), and Funding (9). There is no register_agent tool.

- Canonical URL: https://ai.eterna.exchange/sdk
- Last updated: November 23, 2026
- Author: Eterna Engineering (MCP Infrastructure & Execution Team)
- MCP endpoint: https://mcp.eterna.exchange/mcp

Authoritative inventory of every method registered in Eterna's MCP gateway SDK. Coding agents and developers can rely on this page or call search_sdk(detail_level: 'full') at runtime to avoid hallucinating non-existent methods.

## Key Facts

| Metric | Value | Notes |
|--------|-------|-------|
| MCP Tools | 3 tools | search_sdk, search_examples, execute_code |
| SDK Methods | 30 methods | 5 categories in global eterna.* |
| Default Market | linear perps | Pass market: 'spot' for USDT spot |
| Runtime | Deno TypeScript | Zero imports required inside execute_code |

## Top-level MCP tools vs eterna.* sandbox methods

Never call SDK methods directly as top-level MCP tools. Always discover with search_sdk and run TypeScript through execute_code.

| MCP Tool Name | Purpose | When to Call |
| --- | --- | --- |
| search_sdk | Inspect exact SDK method docs at list, summary, full, params, or keywords detail levels | Before writing a new execute_code script to confirm exact parameter names |
| search_examples | Semantic search over curated working TypeScript strategy snippets | When implementing multi-step workflows (TP/SL, spot exit, funding) |
| execute_code | Run TypeScript inside an isolated Deno worker with pre-authenticated global eterna.* | For all market reads, TA indicators, orders, account checks, and funding |

## 1. Market Data methods (3 methods)

| Method | Market Support | Description |
| --- | --- | --- |
| eterna.getTickers | linear (default) | spot | Real-time last price, 24h change, volume, bid/ask, and funding rate for one or all symbols. |
| eterna.getOrderbook | linear (default) | spot | Live order-book bids and asks depth for spread and slippage checks. |
| eterna.getInstruments | linear (default) | spot | Contract specs including tickSize, qtyStep, minOrderQty, maxLeverage, and trading status. |

## 2. Technical Analysis methods (6 methods)

| Method | Indicator | Common Use Case |
| --- | --- | --- |
| eterna.getRsi | Relative Strength Index (RSI) | Overbought / oversold momentum filtering across timeframes. |
| eterna.getMacd | MACD (line, signal, histogram) | Momentum shifts and trend crossover confirmation. |
| eterna.getEma | Exponential Moving Average | Fast/slow trend alignment (e.g. EMA 20 vs EMA 50 or EMA 200). |
| eterna.getSma | Simple Moving Average | Baseline mean-reversion and higher-timeframe trend filter. |
| eterna.getBollingerBands | Bollinger Bands (upper/middle/lower) | Volatility squeeze detection and breakout / reversion targets. |
| eterna.getVwap | Volume-Weighted Average Price | Intraday institutional fair-value anchor for entries and exits. |

## 3. Trading methods (7 methods: USDT Perps & Spot)

| Method | Market Scope | Description |
| --- | --- | --- |
| eterna.placeOrder | linear (default) | spot | Submit Market or Limit Buy/Sell orders with optional stopLoss, takeProfit, reduceOnly, and market: 'spot'. |
| eterna.sellSpotBalance | spot only | Exit an existing spot coin holding at market price without manual dust rounding. |
| eterna.closePosition | linear perps only | Close an open perpetual position (full or partial reduce-only exit). |
| eterna.cancelOrder | linear (default) | spot | Cancel a specific resting limit or conditional order by orderId. |
| eterna.cancelAllOrders | linear (default) | spot | Cancel all open resting orders for a symbol or across the market. |
| eterna.setLeverage | linear perps only | Configure position leverage (up to symbol max, e.g. 150x on BTC/ETH). |
| eterna.setTradingStop | linear perps only | Attach or update stopLoss, takeProfit, or trailing stop on an open perp position. |

## 4. Account methods (5 methods)

| Method | Description |
| --- | --- |
| eterna.getBalance | Trading wallet equity, available margin, and USDT balance. |
| eterna.getAccountInfo | Account mode (unified / margin mode), leverage tier, and configuration metadata. |
| eterna.getAllCoinsBalance | Balances across all coins in funding and unified trading wallets (essential for spot). |
| eterna.getPositions | Open perpetual positions with entry price, mark price, unrealized PnL, leverage, and TP/SL. |
| eterna.getOrders | Open and recent orders (pass market: 'spot' for spot orders). |

## 5. Funding & Wallet methods (9 methods)

| Method | Description |
| --- | --- |
| eterna.getAllowedDepositCoins | List coins and blockchain networks supported for deposit. |
| eterna.getDepositAddress | Retrieve deposit address and tag/memo for a coin and chain. |
| eterna.getDepositRecords | Inspect recent deposit history and confirmation status. |
| eterna.transferToTrading | Move deposited funds from funding wallet into the unified trading wallet. |
| eterna.swapToUsdt | Convert a deposited non-USDT asset into USDT for trading collateral. |
| eterna.getCoinInfo | Network fees, minimum withdrawal amounts, and chain metadata per coin. |
| eterna.getWithdrawableAmount | Check how much of a coin is currently free and eligible to withdraw. |
| eterna.submitWithdrawal | Request a withdrawal (requires explicit human approval step). |
| eterna.getWithdrawalStatus | Track the approval and on-chain broadcast status of a withdrawal request. |

## Example: Inspecting spot vs perp markets in one execute_code call

### execute_code / market-snapshot.ts

```typescript
const [btcPerp, btcSpot, ethRsi, balance, positions] = await Promise.all([
  eterna.getTickers({ symbol: "BTCUSDT" }),
  eterna.getTickers({ symbol: "BTCUSDT", market: "spot" }),
  eterna.getRsi({ symbol: "ETHUSDT", interval: "4h", period: 14 }),
  eterna.getBalance(),
  eterna.getPositions(),
]);

return {
  btcPerpLast: btcPerp[0]?.lastPrice,
  btcSpotLast: btcSpot[0]?.lastPrice,
  eth4hRsi: ethRsi.value,
  equity: balance.totalEquity,
  openPositions: positions.length,
};
```

**Returns:** Returns a concise 5-field snapshot comparing BTC perpetual vs spot pricing, ETH 4h RSI, account equity, and active position count in one MCP round-trip.

## Frequently Asked Questions

### How many methods are in the Eterna MCP SDK?

There are 30 typed SDK methods organized across 5 categories: Market Data (3), Technical Analysis (6), Trading (7), Account (5), and Funding (9), all executed inside execute_code.

### Is there a register_agent MCP tool?

No. register_agent does not exist. Sub-accounts are provisioned automatically on first OAuth 2.1 sign-in when connecting to https://mcp.eterna.exchange/mcp.

### How do I specify USDT spot instead of perpetual futures in the SDK?

Linear USDT perpetual futures are the default. To target USDT spot pairs (380+ pairs), pass market: 'spot' to placeOrder, getTickers, getOrderbook, getInstruments, getOrders, cancelOrder, or cancelAllOrders. To exit a spot holding cleanly, call eterna.sellSpotBalance(symbol).

## References & Primary Sources

- [Full GitHub Tools Reference](https://github.com/EternaHybridExchange/eterna-mcp/blob/main/docs/tools-reference.md): Parameter schemas, return types, and rate-limit notes.
- [Eterna API Catalog (RFC 9727)](https://ai.eterna.exchange/.well-known/api-catalog): Machine-readable linkset pointing to live MCP, AI API, and OAuth discovery endpoints.

## Related Guides

- [Best MCP Server for Crypto Trading: Architecture, Fees, and Setup](https://ai.eterna.exchange/mcp-crypto-trading)
- [How to Build an AI Crypto Trading Agent with MCP (Step-by-Step)](https://ai.eterna.exchange/ai-trading-agent)
- [Automated Crypto Technical Analysis with MCP: RSI, MACD, EMA, Bollinger Bands & VWAP](https://ai.eterna.exchange/guides/automated-technical-analysis-mcp)
- [Trading 800+ USDT Perpetuals & 380+ Spot Pairs from One MCP Server](https://ai.eterna.exchange/guides/spot-and-perpetual-futures-mcp)
- [MCP execute_code vs Tool Calling: Why Code-Execution MCP Uses ~90% Fewer Tokens](https://ai.eterna.exchange/guides/execute-code-vs-tool-calling)
