close-position
Close positions and cancel orders on Eterna
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Close positions and cancel orders on Eterna
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide user through depositing crypto and transferring funds to the trading wallet
Live market scanning, technical analysis, and trade idea generation using Eterna CLI
Place trades on Eterna with proper sizing, leverage, and risk management
Always-active router for Eterna trading — detects user state and invokes the right skill
Withdraw crypto from Eterna to an external wallet
| name | close_position |
| description | Close positions and cancel orders on Eterna |
| metadata.openclaw.requires.bins | [{"name":"eterna","install":"npm install -g @eterna-hybrid-exchange/cli","postInstall":"eterna login"}] |
Close positions and cancel orders.
const [positions, orders] = await Promise.all([
eterna.getPositions(),
eterna.getOrders(),
]);
return {
positions: positions.list.filter((p) => parseFloat(p.size) > 0).map((p) => ({
symbol: p.symbol, side: p.side, size: p.size,
entryPrice: p.avgPrice, markPrice: p.markPrice,
unrealisedPnl: p.unrealisedPnl, leverage: p.leverage,
})),
activeOrders: orders.list.map((o) => ({
symbol: o.symbol, orderId: o.orderId, side: o.side,
type: o.orderType, qty: o.qty, price: o.price, status: o.orderStatus,
})),
};
Confirm with user before closing. Show current P&L so they know what they're locking in.
const result = await eterna.closePosition("LINKUSDT");
return result;
Returns { orderId, closedSize, side, entryPrice, markPrice, unrealisedPnl }.
Single order:
const result = await eterna.cancelOrder("LINKUSDT", "orderId123");
return result;
All orders on a symbol:
const result = await eterna.cancelAllOrders("LINKUSDT");
return result;
All orders across all symbols:
const result = await eterna.cancelAllOrders();
return result;
await eterna.setTradingStop({
symbol: "LINKUSDT",
takeProfit: "9.80",
stopLoss: "9.10",
});
| Method | Returns |
|---|---|
eterna.getPositions(symbol?) | { list: [{ symbol, side, size, avgPrice, markPrice, unrealisedPnl, leverage, takeProfit, stopLoss }] } |
eterna.getOrders(symbol?) | { list: [{ symbol, orderId, side, orderType, qty, price, orderStatus }] } |
eterna.closePosition(symbol) | { orderId, closedSize, side, entryPrice, markPrice, unrealisedPnl } |
eterna.cancelOrder(symbol, orderId) | { orderId, orderLinkId } |
eterna.cancelAllOrders(symbol?) | { list: [{ orderId }] } |
eterna.setTradingStop({ symbol, takeProfit?, stopLoss?, trailingStop?, ... }) | {} |