一键导入
swarm-trade
Execute DeFi trades through SwarmMind's Trade Executor agent - routes orders through OKX DEX aggregator on X Layer with slippage protection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute DeFi trades through SwarmMind's Trade Executor agent - routes orders through OKX DEX aggregator on X Layer with slippage protection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run SwarmMind's autonomous DeFi intelligence cycle - coordinates market scanning, risk assessment, and trade execution across specialized AI agents with x402 micropayments on X Layer
Assess DeFi trade risk using SwarmMind's Risk Oracle agent - evaluates volatility, liquidity depth, smart contract risk, and market conditions on X Layer
Get real-time DeFi trading signals from SwarmMind's Alpha Scout agent - analyzes X Layer DEX data for arbitrage, momentum, and mean reversion opportunities
| name | swarm-trade |
| description | Execute DeFi trades through SwarmMind's Trade Executor agent - routes orders through OKX DEX aggregator on X Layer with slippage protection |
Trade Executor routes orders through the OKX DEX aggregator on X Layer. It handles token approvals, slippage protection, and transaction monitoring.
# Direct API call
curl -X POST http://localhost:3003/execute/swap \
-H "Content-Type: application/json" \
-H "X-API-KEY: <wallet-address>" \
-d '{"signalId":"sig-1","tokenPair":"OKB/USDC","direction":"BUY","entryPrice":45.2,"amount":"100"}'
# Via ReAct orchestrator (automated with risk check)
# The LLM calls execute_trade tool only after assess_risk returns PROCEED
{
"id": "trade-xyz789",
"signalId": "sig-abc123",
"tokenIn": "USDC",
"tokenOut": "OKB",
"amountIn": "100",
"amountOut": "2.21",
"txHash": "0xabc...def",
"status": "COMPLETED",
"timestamp": 1711234567890,
"gasUsed": "150000"
}
| Status | Description |
|---|---|
PENDING | Trade submitted, awaiting confirmation |
APPROVED | Risk-checked and approved for execution |
EXECUTING | Transaction submitted to X Layer |
COMPLETED | Trade confirmed on-chain |
FAILED | Transaction reverted or timed out |
Trade execution includes x402 micropayment for the service:
In the ReAct loop, trade execution is the final step:
get_market_signals - Find opportunitiesassess_risk - Evaluate risk (must return PROCEED)assess_liquidity - Optional depth checkexecute_trade - Execute if all checks passThe LLM may skip execution based on any unfavorable result.
dex-swap for cross-protocol routingonchain-gateway for cross-chain execution