[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GQPBE4JK6BX52SFYC7M8XM":3,"skill-same:01M6GQPBE4JK6BX52SFYC7M8XM":140},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6GQPBE4JK6BX52SFYC7M8XM","openclaw-elsa-x402",null,"DeFi tools for portfolio analysis, token search, and swap execution via Elsa API with x402 micropayments","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"openclaw elsa x402","x402","openclaw","payment","for","micropayments","with","via","token","swap","portfolio","api","analysis","execution","Tools","defi","search","portfolio analysis","2026-11-10 10:12:30",false,"---\nname: openclaw-elsa-x402\ndescription: DeFi tools for portfolio analysis, token search, and swap execution via Elsa API with x402 micropayments\nmetadata: {\"openclaw\":{\"requires\":{\"env\":[\"PAYMENT_PRIVATE_KEY\"]},\"primaryEnv\":\"PAYMENT_PRIVATE_KEY\"}}\n---\n\n# Elsa x402 DeFi Tools\n\nThis skill provides access to the Elsa DeFi API for portfolio management, token analysis, and swap execution using x402 micropayments.\n\n## Standard Operating Procedure\n\n### Budget Controls\n- Maximum $0.05 per API call (configurable)\n- Maximum $2.00 per day (configurable)\n- Maximum 30 calls per minute rate limit\n- Daily budget resets at midnight in configured timezone (default: UTC)\n\n### Recommended Swap Flow (OpenClaw)\n\nWhen executing swaps, follow this 4-step flow:\n\n```\n┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────┐     ┌─────────────────────┐\n│ 1. Get Quote        │ ──▶ │ 2. Dry Run          │ ──▶ │ 3. Confirm  │ ──▶ │ 4. Execute Pipeline │\n│ elsa_get_swap_quote │     │ elsa_execute_swap_  │     │ [User says  │     │ elsa_pipeline_run_  │\n│                     │     │ dry_run             │     │  \"yes\"]     │     │ and_wait            │\n└─────────────────────┘     └─────────────────────┘     └─────────────┘     └─────────────────────┘\n```\n\n**Step 1: Get Quote** - Show user what they'll receive\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_swap_quote '{\n  \"from_chain\": \"base\", \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"10\", \"to_chain\": \"base\", \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\", \"slippage\": 0.5\n}'\n```\n\n**Step 2: Dry Run** - Create pipeline, get `pipeline_id`\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_dry_run '{...same params...}'\n# Returns: { \"pipeline_id\": \"abc-123\", \"confirmation_token\": \"...\" }\n```\n\n**Step 3: User Confirmation** - Present results and wait for explicit \"yes\"\n\n**Step 4: Execute Pipeline** - Sign and broadcast transactions\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_pipeline_run_and_wait '{\n  \"pipeline_id\": \"abc-123\",\n  \"timeout_seconds\": 180,\n  \"poll_interval_seconds\": 3,\n  \"mode\": \"local_signer\"\n}'\n# Automatically: signs approve tx → submits → signs swap tx → submits → returns tx hashes\n```\n\n### Required Environment Variables\n\n```bash\n# For x402 API payments\nPAYMENT_PRIVATE_KEY=0x...\n\n# For signing swap transactions (optional - falls back to PAYMENT_PRIVATE_KEY)\nTRADE_PRIVATE_KEY=0x...\n\n# Enable execution tools\nELSA_ENABLE_EXECUTION_TOOLS=true\n```\n\n### Critical Rules\n- **NEVER** execute swaps without showing the user the quote first\n- **NEVER** call execution tools in a loop\n- **NEVER** proceed if budget limits are exceeded\n- **ALWAYS** check `elsa_budget_status` if unsure about remaining budget\n- **ALWAYS** use dry-run mode first for any swap operation\n\n## Tool Catalog\n\n### Read-Only Tools (Always Available)\n\n#### elsa_search_token\nSearch for tokens across supported blockchains.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_search_token '{\"query\": \"USDC\", \"limit\": 5}'\n```\n\n**Input:**\n- `query` (string, required): Token name, symbol, or address\n- `limit` (number, optional): Max results (default: 10)\n\n---\n\n#### elsa_get_token_price\nGet current price for a token.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_token_price '{\"token_address\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", \"chain\": \"base\"}'\n```\n\n**Input:**\n- `token_address` (string, required): Token contract address\n- `chain` (string, optional): Chain name (default: \"base\")\n\n---\n\n#### elsa_get_balances\nGet token balances for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_balances '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n\n---\n\n#### elsa_get_portfolio\nGet comprehensive portfolio analysis.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_portfolio '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to analyze\n\n---\n\n#### elsa_analyze_wallet\nGet wallet behavior and risk assessment.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_analyze_wallet '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to analyze\n\n---\n\n#### elsa_get_swap_quote\nGet a swap quote with optimal routing.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_swap_quote '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5\n}'\n```\n\n**Input:**\n- `from_chain` (string, required): Source chain\n- `from_token` (string, required): Source token address\n- `from_amount` (string, required): Amount to swap\n- `to_chain` (string, required): Destination chain\n- `to_token` (string, required): Destination token address\n- `wallet_address` (string, required): Wallet address\n- `slippage` (number, required): Slippage tolerance (0-50)\n\n---\n\n#### elsa_execute_swap_dry_run\nSimulate a swap without execution. Returns a confirmation token for subsequent confirmed execution.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_dry_run '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5\n}'\n```\n\n**Output includes:**\n- Swap simulation results\n- `confirmation_token` (if ELSA_REQUIRE_CONFIRMATION_TOKEN=true)\n- Token expires after ELSA_CONFIRMATION_TTL_SECONDS\n\n---\n\n#### elsa_budget_status\nCheck current budget usage and remaining limits.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_budget_status '{}'\n```\n\n**Output:**\n- `spent_today_usd`: Amount spent today\n- `remaining_today_usd`: Remaining daily budget\n- `calls_last_minute`: Recent call count\n- `last_calls`: Recent call details\n\n---\n\n#### elsa_get_limit_orders\nGet all limit orders for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_limit_orders '{\"wallet_address\": \"0x...\", \"chain\": \"base\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n- `chain` (string, optional): Chain name (default: \"base\")\n\n**Output:**\n- `orders`: Array of limit orders with status, prices, and expiry\n\n---\n\n#### elsa_get_perp_positions\nGet perpetual positions for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_perp_positions '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n\n**Output:**\n- `positions`: Array of open perp positions with PnL, leverage, and liquidation prices\n- `total_unrealized_pnl`: Sum of unrealized profits\u002Flosses\n- `total_margin`: Total margin used\n\n---\n\n#### elsa_get_transaction_history\nGet transaction history for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_transaction_history '{\"wallet_address\": \"0x...\", \"chain\": \"base\", \"limit\": 20}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n- `chain` (string, optional): Filter by chain\n- `limit` (number, optional): Max results (default: 20, max: 100)\n\n**Output:**\n- `transactions`: Array of transactions with details, token transfers, and status\n\n---\n\n### Execution Tools (Requires ELSA_ENABLE_EXECUTION_TOOLS=true)\n\n#### elsa_execute_swap_confirmed\nExecute a confirmed swap. Requires prior dry-run and confirmation token.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_confirmed '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5,\n  \"confirmation_token\": \"abc123...\"\n}'\n```\n\n---\n\n#### elsa_pipeline_get_status\nCheck status of a pipeline\u002Ftransaction.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_get_status '{\"pipeline_id\": \"pip_123456789\"}'\n```\n\n---\n\n#### elsa_pipeline_submit_tx_hash\nSubmit a signed transaction hash to the pipeline.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_submit_tx_hash '{\"task_id\": \"task_123\", \"tx_hash\": \"0x...\"}'\n```\n\n---\n\n#### elsa_pipeline_run_and_wait\nOrchestrate full pipeline execution with automatic signing and submission.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_run_and_wait '{\n  \"pipeline_id\": \"pip_123456789\",\n  \"timeout_seconds\": 120,\n  \"poll_interval_seconds\": 2,\n  \"mode\": \"local_signer\"\n}'\n```\n\n**Modes:**\n- `local_signer`: Signs and broadcasts transactions using TRADE_PRIVATE_KEY\n- `external_signer`: Returns unsigned tx_data for external signing\n\n---\n\n#### elsa_create_limit_order\nCreate a limit order to execute when price reaches target.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_create_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"from_amount\": \"100\",\n  \"limit_price\": \"0.0004\",\n  \"expiry_hours\": 24\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `chain` (string, required): Chain name\n- `from_token` (string, required): Token to sell\n- `to_token` (string, required): Token to buy\n- `from_amount` (string, required): Amount to sell\n- `limit_price` (string, required): Target price to trigger execution\n- `expiry_hours` (number, optional): Hours until order expires (default: 24, max: 720)\n\n---\n\n#### elsa_cancel_limit_order\nCancel an existing limit order.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_cancel_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"order_id\": \"order_123\",\n  \"chain\": \"base\"\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `order_id` (string, required): Order ID to cancel\n- `chain` (string, optional): Chain name (default: \"base\")\n\n---\n\n#### elsa_open_perp_position\nOpen a perpetual futures position.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_open_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"market\": \"ETH-USD\",\n  \"side\": \"long\",\n  \"size_usd\": \"100\",\n  \"leverage\": 5,\n  \"take_profit\": \"4000\",\n  \"stop_loss\": \"2800\"\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `market` (string, required): Market pair (e.g., \"ETH-USD\", \"BTC-USD\")\n- `side` (enum, required): \"long\" or \"short\"\n- `size_usd` (string, required): Position size in USD\n- `leverage` (number, optional): Leverage multiplier (default: 1, max: 100)\n- `take_profit` (string, optional): Take profit price\n- `stop_loss` (string, optional): Stop loss price\n\n---\n\n#### elsa_close_perp_position\nClose an open perpetual position.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_close_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"position_id\": \"pos_123\",\n  \"close_percentage\": 100\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `position_id` (string, required): Position ID to close\n- `close_percentage` (number, optional): Percentage to close (default: 100, range: 1-100)\n\n## Supported Chains\n\n- base (default)\n- ethereum\n- arbitrum\n- optimism\n- polygon\n- bsc\n- avalanche\n- zksync\n\n## API Costs\n\n| Tool | Estimated Cost |\n|------|----------------|\n| elsa_search_token | $0.002 |\n| elsa_get_token_price | $0.002 |\n| elsa_get_balances | $0.002 |\n| elsa_get_portfolio | $0.002 |\n| elsa_analyze_wallet | $0.005 |\n| elsa_get_swap_quote | $0.002 |\n| elsa_execute_swap_dry_run | $0.005 |\n| elsa_get_limit_orders | $0.002 |\n| elsa_get_perp_positions | $0.002 |\n| elsa_get_transaction_history | $0.002 |\n| elsa_create_limit_order | $0.05 |\n| elsa_cancel_limit_order | $0.01 |\n| elsa_open_perp_position | $0.05 |\n| elsa_close_perp_position | $0.05 |\n| elsa_execute_swap_confirmed | $0.05 |\n\n## Coming Soon\n\n- **Polymarket APIs** - Prediction market trading and data\n","# Elsa x402 DeFi Tools\n\nThis skill provides access to the Elsa DeFi API for portfolio management, token analysis, and swap execution using x402 micropayments.\n\n## Standard Operating Procedure\n\n### Budget Controls\n- Maximum $0.05 per API call (configurable)\n- Maximum $2.00 per day (configurable)\n- Maximum 30 calls per minute rate limit\n- Daily budget resets at midnight in configured timezone (default: UTC)\n\n### Recommended Swap Flow (OpenClaw)\n\nWhen executing swaps, follow this 4-step flow:\n\n```\n┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────┐     ┌─────────────────────┐\n│ 1. Get Quote        │ ──▶ │ 2. Dry Run          │ ──▶ │ 3. Confirm  │ ──▶ │ 4. Execute Pipeline │\n│ elsa_get_swap_quote │     │ elsa_execute_swap_  │     │ [User says  │     │ elsa_pipeline_run_  │\n│                     │     │ dry_run             │     │  \"yes\"]     │     │ and_wait            │\n└─────────────────────┘     └─────────────────────┘     └─────────────┘     └─────────────────────┘\n```\n\n**Step 1: Get Quote** - Show user what they'll receive\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_swap_quote '{\n  \"from_chain\": \"base\", \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"10\", \"to_chain\": \"base\", \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\", \"slippage\": 0.5\n}'\n```\n\n**Step 2: Dry Run** - Create pipeline, get `pipeline_id`\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_dry_run '{...same params...}'\n# Returns: { \"pipeline_id\": \"abc-123\", \"confirmation_token\": \"...\" }\n```\n\n**Step 3: User Confirmation** - Present results and wait for explicit \"yes\"\n\n**Step 4: Execute Pipeline** - Sign and broadcast transactions\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_pipeline_run_and_wait '{\n  \"pipeline_id\": \"abc-123\",\n  \"timeout_seconds\": 180,\n  \"poll_interval_seconds\": 3,\n  \"mode\": \"local_signer\"\n}'\n# Automatically: signs approve tx → submits → signs swap tx → submits → returns tx hashes\n```\n\n### Required Environment Variables\n\n```bash\n# For x402 API payments\nPAYMENT_PRIVATE_KEY=0x...\n\n# For signing swap transactions (optional - falls back to PAYMENT_PRIVATE_KEY)\nTRADE_PRIVATE_KEY=0x...\n\n# Enable execution tools\nELSA_ENABLE_EXECUTION_TOOLS=true\n```\n\n### Critical Rules\n- **NEVER** execute swaps without showing the user the quote first\n- **NEVER** call execution tools in a loop\n- **NEVER** proceed if budget limits are exceeded\n- **ALWAYS** check `elsa_budget_status` if unsure about remaining budget\n- **ALWAYS** use dry-run mode first for any swap operation\n\n## Tool Catalog\n\n### Read-Only Tools (Always Available)\n\n#### elsa_search_token\nSearch for tokens across supported blockchains.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_search_token '{\"query\": \"USDC\", \"limit\": 5}'\n```\n\n**Input:**\n- `query` (string, required): Token name, symbol, or address\n- `limit` (number, optional): Max results (default: 10)\n\n---\n\n#### elsa_get_token_price\nGet current price for a token.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_token_price '{\"token_address\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", \"chain\": \"base\"}'\n```\n\n**Input:**\n- `token_address` (string, required): Token contract address\n- `chain` (string, optional): Chain name (default: \"base\")\n\n---\n\n#### elsa_get_balances\nGet token balances for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_balances '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n\n---\n\n#### elsa_get_portfolio\nGet comprehensive portfolio analysis.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_portfolio '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to analyze\n\n---\n\n#### elsa_analyze_wallet\nGet wallet behavior and risk assessment.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_analyze_wallet '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to analyze\n\n---\n\n#### elsa_get_swap_quote\nGet a swap quote with optimal routing.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_swap_quote '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5\n}'\n```\n\n**Input:**\n- `from_chain` (string, required): Source chain\n- `from_token` (string, required): Source token address\n- `from_amount` (string, required): Amount to swap\n- `to_chain` (string, required): Destination chain\n- `to_token` (string, required): Destination token address\n- `wallet_address` (string, required): Wallet address\n- `slippage` (number, required): Slippage tolerance (0-50)\n\n---\n\n#### elsa_execute_swap_dry_run\nSimulate a swap without execution. Returns a confirmation token for subsequent confirmed execution.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_dry_run '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5\n}'\n```\n\n**Output includes:**\n- Swap simulation results\n- `confirmation_token` (if ELSA_REQUIRE_CONFIRMATION_TOKEN=true)\n- Token expires after ELSA_CONFIRMATION_TTL_SECONDS\n\n---\n\n#### elsa_budget_status\nCheck current budget usage and remaining limits.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_budget_status '{}'\n```\n\n**Output:**\n- `spent_today_usd`: Amount spent today\n- `remaining_today_usd`: Remaining daily budget\n- `calls_last_minute`: Recent call count\n- `last_calls`: Recent call details\n\n---\n\n#### elsa_get_limit_orders\nGet all limit orders for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_limit_orders '{\"wallet_address\": \"0x...\", \"chain\": \"base\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n- `chain` (string, optional): Chain name (default: \"base\")\n\n**Output:**\n- `orders`: Array of limit orders with status, prices, and expiry\n\n---\n\n#### elsa_get_perp_positions\nGet perpetual positions for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_perp_positions '{\"wallet_address\": \"0x...\"}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n\n**Output:**\n- `positions`: Array of open perp positions with PnL, leverage, and liquidation prices\n- `total_unrealized_pnl`: Sum of unrealized profits\u002Flosses\n- `total_margin`: Total margin used\n\n---\n\n#### elsa_get_transaction_history\nGet transaction history for a wallet.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_get_transaction_history '{\"wallet_address\": \"0x...\", \"chain\": \"base\", \"limit\": 20}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address to query\n- `chain` (string, optional): Filter by chain\n- `limit` (number, optional): Max results (default: 20, max: 100)\n\n**Output:**\n- `transactions`: Array of transactions with details, token transfers, and status\n\n---\n\n### Execution Tools (Requires ELSA_ENABLE_EXECUTION_TOOLS=true)\n\n#### elsa_execute_swap_confirmed\nExecute a confirmed swap. Requires prior dry-run and confirmation token.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_execute_swap_confirmed '{\n  \"from_chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"from_amount\": \"100\",\n  \"to_chain\": \"base\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"wallet_address\": \"0x...\",\n  \"slippage\": 0.5,\n  \"confirmation_token\": \"abc123...\"\n}'\n```\n\n---\n\n#### elsa_pipeline_get_status\nCheck status of a pipeline\u002Ftransaction.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_get_status '{\"pipeline_id\": \"pip_123456789\"}'\n```\n\n---\n\n#### elsa_pipeline_submit_tx_hash\nSubmit a signed transaction hash to the pipeline.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_submit_tx_hash '{\"task_id\": \"task_123\", \"tx_hash\": \"0x...\"}'\n```\n\n---\n\n#### elsa_pipeline_run_and_wait\nOrchestrate full pipeline execution with automatic signing and submission.\n\n```bash\nnpx tsx scripts\u002Findex.ts elsa_pipeline_run_and_wait '{\n  \"pipeline_id\": \"pip_123456789\",\n  \"timeout_seconds\": 120,\n  \"poll_interval_seconds\": 2,\n  \"mode\": \"local_signer\"\n}'\n```\n\n**Modes:**\n- `local_signer`: Signs and broadcasts transactions using TRADE_PRIVATE_KEY\n- `external_signer`: Returns unsigned tx_data for external signing\n\n---\n\n#### elsa_create_limit_order\nCreate a limit order to execute when price reaches target.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_create_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"chain\": \"base\",\n  \"from_token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"to_token\": \"0x4200000000000000000000000000000000000006\",\n  \"from_amount\": \"100\",\n  \"limit_price\": \"0.0004\",\n  \"expiry_hours\": 24\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `chain` (string, required): Chain name\n- `from_token` (string, required): Token to sell\n- `to_token` (string, required): Token to buy\n- `from_amount` (string, required): Amount to sell\n- `limit_price` (string, required): Target price to trigger execution\n- `expiry_hours` (number, optional): Hours until order expires (default: 24, max: 720)\n\n---\n\n#### elsa_cancel_limit_order\nCancel an existing limit order.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_cancel_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"order_id\": \"order_123\",\n  \"chain\": \"base\"\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `order_id` (string, required): Order ID to cancel\n- `chain` (string, optional): Chain name (default: \"base\")\n\n---\n\n#### elsa_open_perp_position\nOpen a perpetual futures position.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_open_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"market\": \"ETH-USD\",\n  \"side\": \"long\",\n  \"size_usd\": \"100\",\n  \"leverage\": 5,\n  \"take_profit\": \"4000\",\n  \"stop_loss\": \"2800\"\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `market` (string, required): Market pair (e.g., \"ETH-USD\", \"BTC-USD\")\n- `side` (enum, required): \"long\" or \"short\"\n- `size_usd` (string, required): Position size in USD\n- `leverage` (number, optional): Leverage multiplier (default: 1, max: 100)\n- `take_profit` (string, optional): Take profit price\n- `stop_loss` (string, optional): Stop loss price\n\n---\n\n#### elsa_close_perp_position\nClose an open perpetual position.\n\n```bash\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts\u002Findex.ts elsa_close_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"position_id\": \"pos_123\",\n  \"close_percentage\": 100\n}'\n```\n\n**Input:**\n- `wallet_address` (string, required): Wallet address\n- `position_id` (string, required): Position ID to close\n- `close_percentage` (number, optional): Percentage to close (default: 100, range: 1-100)\n\n## Supported Chains\n\n- base (default)\n- ethereum\n- arbitrum\n- optimism\n- polygon\n- bsc\n- avalanche\n- zksync\n\n## API Costs\n\n| Tool | Estimated Cost |\n|------|----------------|\n| elsa_search_token | $0.002 |\n| elsa_get_token_price | $0.002 |\n| elsa_get_balances | $0.002 |\n| elsa_get_portfolio | $0.002 |\n| elsa_analyze_wallet | $0.005 |\n| elsa_get_swap_quote | $0.002 |\n| elsa_execute_swap_dry_run | $0.005 |\n| elsa_get_limit_orders | $0.002 |\n| elsa_get_perp_positions | $0.002 |\n| elsa_get_transaction_history | $0.002 |\n| elsa_create_limit_order | $0.05 |\n| elsa_cancel_limit_order | $0.01 |\n| elsa_open_perp_position | $0.05 |\n| elsa_close_perp_position | $0.05 |\n| elsa_execute_swap_confirmed | $0.05 |\n\n## Coming Soon\n\n- **Polymarket APIs** - Prediction market trading and data\n",{"name":5,"metadata":42,"description":7},{"openclaw":43},{"requires":44,"primaryEnv":46},{"env":45},[46],"PAYMENT_PRIVATE_KEY","main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fdefi\u002Felsa-official-openclaw",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-12 02:28:42",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill openclaw-elsa-x402",{"tool":62,"command":63},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill openclaw-elsa-x402",{"tool":65,"command":66},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill openclaw-elsa-x402","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002FSKILL.md",true,[70,76,82,88,92,96,100,104,108,112,116,120,124,128,132,136],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"examples\u002Fdemo.md","REFERENCE","参考文档",3882,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fexamples\u002Fdemo.md",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"examples\u002Fopenclaw.json.example","OTHER","其他",904,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fexamples\u002Fopenclaw.json.example",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002F__tests__\u002Fbudgets.test.ts","SCRIPT","脚本",4956,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002F__tests__\u002Fbudgets.test.ts",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002F__tests__\u002Fconfirm.test.ts",6329,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002F__tests__\u002Fconfirm.test.ts",{"path":93,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fbudgets.ts",4553,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Fbudgets.ts",{"path":97,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fconfirm.ts",3734,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Fconfirm.ts",{"path":101,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002FelsaClient.ts",6985,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002FelsaClient.ts",{"path":105,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fenv.ts",3216,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Fenv.ts",{"path":109,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Ferrors.ts",3569,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Ferrors.ts",{"path":113,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Findex.ts",19319,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Findex.ts",{"path":117,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Fpipeline.ts",8233,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Fpipeline.ts",{"path":121,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":122,"sourceHtmlUrl":123},"scripts\u002Ftypes.ts",12761,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Ftypes.ts",{"path":125,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":126,"sourceHtmlUrl":127},"scripts\u002Futil.ts",5013,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Futil.ts",{"path":129,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":130,"sourceHtmlUrl":131},"scripts\u002Fx402Client.ts",4066,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002Fscripts\u002Fx402Client.ts",{"path":133,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":134,"sourceHtmlUrl":135},"SOURCE.md",157,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002FSOURCE.md",{"path":137,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":138,"sourceHtmlUrl":139},"TRUST.auto.yaml",2180,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Felsa-official-openclaw\u002FTRUST.auto.yaml",[141,169,190,208,221,231],{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":145,"licenseFileUrl":146,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":37},"01M712C436EQYE43342Q4E7GG1","recipe-performance","Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold\u002Fwarm\u002Fbackground-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout\u002Fpaint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FSKILL.md",[],[150,151,152,153,154,155,156,157,158,159,160,161,31,162,163,164,165,166,167,168],"performance","recipe performance","recipe","mm","sentry","harness","app","deterministic","recipes","flow","cold","critical","tasks","react","browser","layout","screen","network","metamask",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":173,"licenseFileUrl":174,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":37},"01M70XT2F8A5CQZ81JBP98KSW3","mexc-spot-websocket","MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FSKILL.md",[],[178,179,180,30,181,182,183,184,185,186,23,187,188,189],"mexc spot websocket","spot","websocket","workflows","public","listen","streams","depth","keys","api keys","maintenance","protobuf",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":173,"licenseFileUrl":194,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":37},"01M70XT0MBXN3WZY1BKN0CPNKR","mexc-spot-rest","MEXC Spot REST workflows for public data, signed account requests, orders, wallet\u002Fadmin actions, and secure signing without exposing API keys.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FSKILL.md",[],[198,179,199,200,201,202,203,187,23,186,204,205,206,182,207,181,30],"mexc spot rest","REST","admin","signing","Wallet","requests","actions","secure","data","orders",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":173,"licenseFileUrl":212,"sourceHtmlUrl":213,"categories":214,"keywords":215,"publishedAt":37},"01M70XSYSVZ2N0N91XCAR2CAK0","mexc-futures-websocket","MEXC Futures WebSocket workflows for public streams, private account\u002Forder\u002Fposition streams, ping\u002Fpong, subscriptions, and depth maintenance.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FSKILL.md",[],[216,217,180,218,219,188,23,220,185,184,182,181],"mexc futures websocket","futures","position","ping","subscriptions",{"skillNo":222,"name":223,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":145,"licenseFileUrl":224,"sourceHtmlUrl":225,"categories":226,"keywords":227,"publishedAt":37},"01M6H0ZWHVE5W04WG2DKQE2SQC","0xklen-version-and-refresh-sanctions-lists","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FSKILL.md",[],[228,229,230],"refresh","0xklen version and refresh sanctions lists","version",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":145,"licenseFileUrl":235,"sourceHtmlUrl":236,"categories":237,"keywords":238,"publishedAt":37},"01M6H0Z28Q3R8J0S799GJQWXM3","verify-tests-cover-changed-lines","Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FSKILL.md",[],[239,240,241,242,243,244,245,246,247,248,249],"tests","cover","verify tests cover changed lines","verify","coverage","pr","exercise","use","patch","code","share"]