{
  "schemaVersion": "1.0",
  "item": {
    "slug": "elsa-x402-api",
    "name": "Elsa x402 API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/justjkk/elsa-x402-api",
    "canonicalUrl": "https://clawhub.ai/justjkk/elsa-x402-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/elsa-x402-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=elsa-x402-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "ONE-PAGER.md",
      "README.md",
      "package-lock.json",
      "package.json",
      "SKILL.md",
      "tsconfig.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/elsa-x402-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/elsa-x402-api",
    "agentPageUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Elsa x402 DeFi Tools",
        "body": "This skill provides access to the Elsa DeFi API for portfolio management, token analysis, and swap execution using x402 micropayments."
      },
      {
        "title": "Budget Controls",
        "body": "Maximum $0.05 per API call (configurable)\nMaximum $2.00 per day (configurable)\nMaximum 30 calls per minute rate limit\nDaily budget resets at midnight in configured timezone (default: UTC)"
      },
      {
        "title": "Recommended Swap Flow (OpenClaw)",
        "body": "When executing swaps, follow this 4-step flow:\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\nStep 1: Get Quote - Show user what they'll receive\n\nnpx tsx scripts/index.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\nStep 2: Dry Run - Create pipeline, get pipeline_id\n\nnpx tsx scripts/index.ts elsa_execute_swap_dry_run '{...same params...}'\n# Returns: { \"pipeline_id\": \"abc-123\", \"confirmation_token\": \"...\" }\n\nStep 3: User Confirmation - Present results and wait for explicit \"yes\"\n\nStep 4: Execute Pipeline - Sign and broadcast transactions\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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"
      },
      {
        "title": "Required Environment Variables",
        "body": "# 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"
      },
      {
        "title": "Critical Rules",
        "body": "NEVER execute swaps without showing the user the quote first\nNEVER call execution tools in a loop\nNEVER proceed if budget limits are exceeded\nALWAYS check elsa_budget_status if unsure about remaining budget\nALWAYS use dry-run mode first for any swap operation"
      },
      {
        "title": "Read-Only Tools (Always Available)",
        "body": "elsa_search_token\n\nSearch for tokens across supported blockchains.\n\nnpx tsx scripts/index.ts elsa_search_token '{\"query\": \"USDC\", \"limit\": 5}'\n\nInput:\n\nquery (string, required): Token name, symbol, or address\nlimit (number, optional): Max results (default: 10)\n\nelsa_get_token_price\n\nGet current price for a token.\n\nnpx tsx scripts/index.ts elsa_get_token_price '{\"token_address\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", \"chain\": \"base\"}'\n\nInput:\n\ntoken_address (string, required): Token contract address\nchain (string, optional): Chain name (default: \"base\")\n\nelsa_get_balances\n\nGet token balances for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_balances '{\"wallet_address\": \"0x...\"}'\n\nInput:\n\nwallet_address (string, required): Wallet address to query\n\nelsa_get_portfolio\n\nGet comprehensive portfolio analysis.\n\nnpx tsx scripts/index.ts elsa_get_portfolio '{\"wallet_address\": \"0x...\"}'\n\nInput:\n\nwallet_address (string, required): Wallet address to analyze\n\nelsa_analyze_wallet\n\nGet wallet behavior and risk assessment.\n\nnpx tsx scripts/index.ts elsa_analyze_wallet '{\"wallet_address\": \"0x...\"}'\n\nInput:\n\nwallet_address (string, required): Wallet address to analyze\n\nelsa_get_swap_quote\n\nGet a swap quote with optimal routing.\n\nnpx tsx scripts/index.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\nInput:\n\nfrom_chain (string, required): Source chain\nfrom_token (string, required): Source token address\nfrom_amount (string, required): Amount to swap\nto_chain (string, required): Destination chain\nto_token (string, required): Destination token address\nwallet_address (string, required): Wallet address\nslippage (number, required): Slippage tolerance (0-50)\n\nelsa_execute_swap_dry_run\n\nSimulate a swap without execution. Returns a confirmation token for subsequent confirmed execution.\n\nnpx tsx scripts/index.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\nOutput includes:\n\nSwap simulation results\nconfirmation_token (if ELSA_REQUIRE_CONFIRMATION_TOKEN=true)\nToken expires after ELSA_CONFIRMATION_TTL_SECONDS\n\nelsa_budget_status\n\nCheck current budget usage and remaining limits.\n\nnpx tsx scripts/index.ts elsa_budget_status '{}'\n\nOutput:\n\nspent_today_usd: Amount spent today\nremaining_today_usd: Remaining daily budget\ncalls_last_minute: Recent call count\nlast_calls: Recent call details\n\nelsa_get_limit_orders\n\nGet all limit orders for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_limit_orders '{\"wallet_address\": \"0x...\", \"chain\": \"base\"}'\n\nInput:\n\nwallet_address (string, required): Wallet address to query\nchain (string, optional): Chain name (default: \"base\")\n\nOutput:\n\norders: Array of limit orders with status, prices, and expiry\n\nelsa_get_perp_positions\n\nGet perpetual positions for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_perp_positions '{\"wallet_address\": \"0x...\"}'\n\nInput:\n\nwallet_address (string, required): Wallet address to query\n\nOutput:\n\npositions: Array of open perp positions with PnL, leverage, and liquidation prices\ntotal_unrealized_pnl: Sum of unrealized profits/losses\ntotal_margin: Total margin used\n\nelsa_get_transaction_history\n\nGet transaction history for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_transaction_history '{\"wallet_address\": \"0x...\", \"chain\": \"base\", \"limit\": 20}'\n\nInput:\n\nwallet_address (string, required): Wallet address to query\nchain (string, optional): Filter by chain\nlimit (number, optional): Max results (default: 20, max: 100)\n\nOutput:\n\ntransactions: Array of transactions with details, token transfers, and status"
      },
      {
        "title": "Execution Tools (Requires ELSA_ENABLE_EXECUTION_TOOLS=true)",
        "body": "elsa_execute_swap_confirmed\n\nExecute a confirmed swap. Requires prior dry-run and confirmation token.\n\nnpx tsx scripts/index.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\nelsa_pipeline_get_status\n\nCheck status of a pipeline/transaction.\n\nnpx tsx scripts/index.ts elsa_pipeline_get_status '{\"pipeline_id\": \"pip_123456789\"}'\n\nelsa_pipeline_submit_tx_hash\n\nSubmit a signed transaction hash to the pipeline.\n\nnpx tsx scripts/index.ts elsa_pipeline_submit_tx_hash '{\"task_id\": \"task_123\", \"tx_hash\": \"0x...\"}'\n\nelsa_pipeline_run_and_wait\n\nOrchestrate full pipeline execution with automatic signing and submission.\n\nnpx tsx scripts/index.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\nModes:\n\nlocal_signer: Signs and broadcasts transactions using TRADE_PRIVATE_KEY\nexternal_signer: Returns unsigned tx_data for external signing\n\nelsa_create_limit_order\n\nCreate a limit order to execute when price reaches target.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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\nInput:\n\nwallet_address (string, required): Wallet address\nchain (string, required): Chain name\nfrom_token (string, required): Token to sell\nto_token (string, required): Token to buy\nfrom_amount (string, required): Amount to sell\nlimit_price (string, required): Target price to trigger execution\nexpiry_hours (number, optional): Hours until order expires (default: 24, max: 720)\n\nelsa_cancel_limit_order\n\nCancel an existing limit order.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.ts elsa_cancel_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"order_id\": \"order_123\",\n  \"chain\": \"base\"\n}'\n\nInput:\n\nwallet_address (string, required): Wallet address\norder_id (string, required): Order ID to cancel\nchain (string, optional): Chain name (default: \"base\")\n\nelsa_open_perp_position\n\nOpen a perpetual futures position.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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\nInput:\n\nwallet_address (string, required): Wallet address\nmarket (string, required): Market pair (e.g., \"ETH-USD\", \"BTC-USD\")\nside (enum, required): \"long\" or \"short\"\nsize_usd (string, required): Position size in USD\nleverage (number, optional): Leverage multiplier (default: 1, max: 100)\ntake_profit (string, optional): Take profit price\nstop_loss (string, optional): Stop loss price\n\nelsa_close_perp_position\n\nClose an open perpetual position.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.ts elsa_close_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"position_id\": \"pos_123\",\n  \"close_percentage\": 100\n}'\n\nInput:\n\nwallet_address (string, required): Wallet address\nposition_id (string, required): Position ID to close\nclose_percentage (number, optional): Percentage to close (default: 100, range: 1-100)"
      },
      {
        "title": "Supported Chains",
        "body": "base (default)\nethereum\narbitrum\noptimism\npolygon\nbsc\navalanche\nzksync"
      },
      {
        "title": "API Costs",
        "body": "ToolEstimated Costelsa_search_token$0.002elsa_get_token_price$0.002elsa_get_balances$0.002elsa_get_portfolio$0.002elsa_analyze_wallet$0.005elsa_get_swap_quote$0.002elsa_execute_swap_dry_run$0.005elsa_get_limit_orders$0.002elsa_get_perp_positions$0.002elsa_get_transaction_history$0.002elsa_create_limit_order$0.05elsa_cancel_limit_order$0.01elsa_open_perp_position$0.05elsa_close_perp_position$0.05elsa_execute_swap_confirmed$0.05"
      },
      {
        "title": "Coming Soon",
        "body": "Polymarket APIs - Prediction market trading and data"
      }
    ],
    "body": "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\nStandard Operating Procedure\nBudget Controls\nMaximum $0.05 per API call (configurable)\nMaximum $2.00 per day (configurable)\nMaximum 30 calls per minute rate limit\nDaily budget resets at midnight in configured timezone (default: UTC)\nRecommended Swap Flow (OpenClaw)\n\nWhen executing swaps, follow this 4-step flow:\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\nStep 1: Get Quote - Show user what they'll receive\n\nnpx tsx scripts/index.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\nStep 2: Dry Run - Create pipeline, get pipeline_id\n\nnpx tsx scripts/index.ts elsa_execute_swap_dry_run '{...same params...}'\n# Returns: { \"pipeline_id\": \"abc-123\", \"confirmation_token\": \"...\" }\n\n\nStep 3: User Confirmation - Present results and wait for explicit \"yes\"\n\nStep 4: Execute Pipeline - Sign and broadcast transactions\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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\nRequired Environment Variables\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\nCritical Rules\nNEVER execute swaps without showing the user the quote first\nNEVER call execution tools in a loop\nNEVER proceed if budget limits are exceeded\nALWAYS check elsa_budget_status if unsure about remaining budget\nALWAYS use dry-run mode first for any swap operation\nTool Catalog\nRead-Only Tools (Always Available)\nelsa_search_token\n\nSearch for tokens across supported blockchains.\n\nnpx tsx scripts/index.ts elsa_search_token '{\"query\": \"USDC\", \"limit\": 5}'\n\n\nInput:\n\nquery (string, required): Token name, symbol, or address\nlimit (number, optional): Max results (default: 10)\nelsa_get_token_price\n\nGet current price for a token.\n\nnpx tsx scripts/index.ts elsa_get_token_price '{\"token_address\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", \"chain\": \"base\"}'\n\n\nInput:\n\ntoken_address (string, required): Token contract address\nchain (string, optional): Chain name (default: \"base\")\nelsa_get_balances\n\nGet token balances for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_balances '{\"wallet_address\": \"0x...\"}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to query\nelsa_get_portfolio\n\nGet comprehensive portfolio analysis.\n\nnpx tsx scripts/index.ts elsa_get_portfolio '{\"wallet_address\": \"0x...\"}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to analyze\nelsa_analyze_wallet\n\nGet wallet behavior and risk assessment.\n\nnpx tsx scripts/index.ts elsa_analyze_wallet '{\"wallet_address\": \"0x...\"}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to analyze\nelsa_get_swap_quote\n\nGet a swap quote with optimal routing.\n\nnpx tsx scripts/index.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\nInput:\n\nfrom_chain (string, required): Source chain\nfrom_token (string, required): Source token address\nfrom_amount (string, required): Amount to swap\nto_chain (string, required): Destination chain\nto_token (string, required): Destination token address\nwallet_address (string, required): Wallet address\nslippage (number, required): Slippage tolerance (0-50)\nelsa_execute_swap_dry_run\n\nSimulate a swap without execution. Returns a confirmation token for subsequent confirmed execution.\n\nnpx tsx scripts/index.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\nOutput includes:\n\nSwap simulation results\nconfirmation_token (if ELSA_REQUIRE_CONFIRMATION_TOKEN=true)\nToken expires after ELSA_CONFIRMATION_TTL_SECONDS\nelsa_budget_status\n\nCheck current budget usage and remaining limits.\n\nnpx tsx scripts/index.ts elsa_budget_status '{}'\n\n\nOutput:\n\nspent_today_usd: Amount spent today\nremaining_today_usd: Remaining daily budget\ncalls_last_minute: Recent call count\nlast_calls: Recent call details\nelsa_get_limit_orders\n\nGet all limit orders for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_limit_orders '{\"wallet_address\": \"0x...\", \"chain\": \"base\"}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to query\nchain (string, optional): Chain name (default: \"base\")\n\nOutput:\n\norders: Array of limit orders with status, prices, and expiry\nelsa_get_perp_positions\n\nGet perpetual positions for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_perp_positions '{\"wallet_address\": \"0x...\"}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to query\n\nOutput:\n\npositions: Array of open perp positions with PnL, leverage, and liquidation prices\ntotal_unrealized_pnl: Sum of unrealized profits/losses\ntotal_margin: Total margin used\nelsa_get_transaction_history\n\nGet transaction history for a wallet.\n\nnpx tsx scripts/index.ts elsa_get_transaction_history '{\"wallet_address\": \"0x...\", \"chain\": \"base\", \"limit\": 20}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address to query\nchain (string, optional): Filter by chain\nlimit (number, optional): Max results (default: 20, max: 100)\n\nOutput:\n\ntransactions: Array of transactions with details, token transfers, and status\nExecution Tools (Requires ELSA_ENABLE_EXECUTION_TOOLS=true)\nelsa_execute_swap_confirmed\n\nExecute a confirmed swap. Requires prior dry-run and confirmation token.\n\nnpx tsx scripts/index.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\nelsa_pipeline_get_status\n\nCheck status of a pipeline/transaction.\n\nnpx tsx scripts/index.ts elsa_pipeline_get_status '{\"pipeline_id\": \"pip_123456789\"}'\n\nelsa_pipeline_submit_tx_hash\n\nSubmit a signed transaction hash to the pipeline.\n\nnpx tsx scripts/index.ts elsa_pipeline_submit_tx_hash '{\"task_id\": \"task_123\", \"tx_hash\": \"0x...\"}'\n\nelsa_pipeline_run_and_wait\n\nOrchestrate full pipeline execution with automatic signing and submission.\n\nnpx tsx scripts/index.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\nModes:\n\nlocal_signer: Signs and broadcasts transactions using TRADE_PRIVATE_KEY\nexternal_signer: Returns unsigned tx_data for external signing\nelsa_create_limit_order\n\nCreate a limit order to execute when price reaches target.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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\nInput:\n\nwallet_address (string, required): Wallet address\nchain (string, required): Chain name\nfrom_token (string, required): Token to sell\nto_token (string, required): Token to buy\nfrom_amount (string, required): Amount to sell\nlimit_price (string, required): Target price to trigger execution\nexpiry_hours (number, optional): Hours until order expires (default: 24, max: 720)\nelsa_cancel_limit_order\n\nCancel an existing limit order.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.ts elsa_cancel_limit_order '{\n  \"wallet_address\": \"0x...\",\n  \"order_id\": \"order_123\",\n  \"chain\": \"base\"\n}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address\norder_id (string, required): Order ID to cancel\nchain (string, optional): Chain name (default: \"base\")\nelsa_open_perp_position\n\nOpen a perpetual futures position.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.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\nInput:\n\nwallet_address (string, required): Wallet address\nmarket (string, required): Market pair (e.g., \"ETH-USD\", \"BTC-USD\")\nside (enum, required): \"long\" or \"short\"\nsize_usd (string, required): Position size in USD\nleverage (number, optional): Leverage multiplier (default: 1, max: 100)\ntake_profit (string, optional): Take profit price\nstop_loss (string, optional): Stop loss price\nelsa_close_perp_position\n\nClose an open perpetual position.\n\nELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.ts elsa_close_perp_position '{\n  \"wallet_address\": \"0x...\",\n  \"position_id\": \"pos_123\",\n  \"close_percentage\": 100\n}'\n\n\nInput:\n\nwallet_address (string, required): Wallet address\nposition_id (string, required): Position ID to close\nclose_percentage (number, optional): Percentage to close (default: 100, range: 1-100)\nSupported Chains\nbase (default)\nethereum\narbitrum\noptimism\npolygon\nbsc\navalanche\nzksync\nAPI Costs\nTool\tEstimated Cost\nelsa_search_token\t$0.002\nelsa_get_token_price\t$0.002\nelsa_get_balances\t$0.002\nelsa_get_portfolio\t$0.002\nelsa_analyze_wallet\t$0.005\nelsa_get_swap_quote\t$0.002\nelsa_execute_swap_dry_run\t$0.005\nelsa_get_limit_orders\t$0.002\nelsa_get_perp_positions\t$0.002\nelsa_get_transaction_history\t$0.002\nelsa_create_limit_order\t$0.05\nelsa_cancel_limit_order\t$0.01\nelsa_open_perp_position\t$0.05\nelsa_close_perp_position\t$0.05\nelsa_execute_swap_confirmed\t$0.05\nComing Soon\nPolymarket APIs - Prediction market trading and data"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/justjkk/elsa-x402-api",
    "publisherUrl": "https://clawhub.ai/justjkk/elsa-x402-api",
    "owner": "justjkk",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/elsa-x402-api",
    "downloadUrl": "https://openagent3.xyz/downloads/elsa-x402-api",
    "agentUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elsa-x402-api/agent.md"
  }
}