Spot Portfolio Playbook
Automated Crypto Spot DCA & Portfolio Rebalance Agent (MCP Script)
Not every AI agent needs leverage or perpetual futures. Eterna's 380+ USDT spot pairs let you build calm, zero-liquidation accumulation and rebalancing agents with the exact same MCP endpoint.
Strategy Summary
Use `eterna.getAllCoinsBalance()` to inspect current spot holdings, compare against target portfolio weights (for example 50% BTC, 30% ETH, 20% SOL), and buy underweight assets with `eterna.placeOrder({ market: 'spot', side: 'Buy', ... })` or trim overweight holdings cleanly with `eterna.sellSpotBalance()`.
Spot Markets380+ USDT pairsZero funding fees, zero liquidation
Exit MethodsellSpotBalance()Clean spot trims without dust math
Funding ToolsswapToUsdt()Convert non-USDT deposits automatically
Cost$0 platform feeNo SaaS rebalance subscription
https://mcp.eterna.exchange/mcp1. Runnable Spot Portfolio Drift Calculator
const targets: Record<string, number> = { BTC: 0.5, ETH: 0.3, SOL: 0.2 };
const balances = await eterna.getAllCoinsBalance();
const holdings: Record<string, { qty: number; price: number; usd: number }> = {};
let totalUsd = 0;
for (const coin of Object.keys(targets)) {
const row = balances.find((b: any) => b.coin === coin);
const qty = Number(row?.walletBalance ?? 0);
const ticker = await eterna.getTickers({ symbol: coin + "USDT", market: "spot" });
const price = Number(ticker[0].lastPrice);
const usd = qty * price;
holdings[coin] = { qty, price, usd };
totalUsd += usd;
}
return Object.entries(targets).map(([coin, targetWeight]) => {
const currentUsd = holdings[coin].usd;
const targetUsd = totalUsd * targetWeight;
const deltaUsd = targetUsd - currentUsd;
return {
coin,
currentWeightPct: totalUsd > 0 ? Number(((currentUsd / totalUsd) * 100).toFixed(1)) : 0,
targetWeightPct: targetWeight * 100,
action: Math.abs(deltaUsd) < 15 ? "HOLD" : deltaUsd > 0 ? "BUY_SPOT" : "SELL_SPOT",
deltaUsd: Number(deltaUsd.toFixed(2)),
};
});Returns: Exact USD buy/sell rebalancing deltas with a $15 deadband to prevent over-trading.
FAQ
Frequently asked questions
Why use `eterna.sellSpotBalance()` instead of `eterna.closePosition()` for spot?
`closePosition()` is for linear USDT perpetual contracts. For spot holdings, Eterna provides `sellSpotBalance()` so you never hit spot/perp market-type mismatch errors.
Primary Sources
References & verification links
- Spot & Perpetual Futures MCP GuideExact parameter differences between linear perps and spot.
Start Trading via MCP
Connect your AI agent in 30 seconds
One remote MCP URL. 800+ USDT perpetuals, 380+ spot pairs, 0.014% maker / 0.035% taker, no KYC.