Elsa x402 DeFi Tools for Openclaw

An advanced DeFi toolkit for portfolio management and automated swap execution powered by x402 micropayments.

justjkk
v1.0.0
Feb 27, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install elsa-x402-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install elsa-x402-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Elsa x402 DeFi Tools?

This skill integrates the Elsa DeFi API into the agent environment, providing developers and traders with robust tools for deep blockchain interaction. By leveraging x402 micropayments, it allows for granular, pay-as-you-go access to high-quality financial data and transaction execution. The skill is designed with safety at its core, featuring built-in budget controls and a rigorous multi-step confirmation process for swaps.

Users can monitor complex portfolios, analyze wallet risks, and execute trades across multiple chains including Base, Ethereum, and Arbitrum. These Openclaw Skills offer a secure and scalable foundation for building automated trading bots or personal wealth managers without the overhead of massive subscription costs.

Elsa x402 DeFi Tools Use Cases

  • Automated portfolio monitoring and risk assessment across multiple EVM-compatible chains.
  • Executing slippage-protected token swaps with a secure dry-run validation step.
  • Setting up and managing limit orders and perpetual futures positions via AI-driven commands.
  • Tracking real-time token prices and transaction histories for deep on-chain research and auditing.

How Elsa x402 DeFi Tools Works

  1. Initialize the skill by configuring the required x402 payment keys and enabling execution tools in your environment.
  2. Perform read-only queries like elsa_search_token or elsa_get_portfolio to gather real-time market intelligence.
  3. For swaps, initiate the process with elsa_get_swap_quote to view optimal routing and expected output details.
  4. Trigger elsa_execute_swap_dry_run to generate a simulation and a unique confirmation token for safety.
  5. Upon explicit user confirmation, run elsa_pipeline_run_and_wait to automate the signing and broadcasting of transactions.
  6. Monitor budget consumption in real-time using elsa_budget_status to ensure cost-effective operations within Openclaw Skills.

Elsa x402 DeFi Tools Setup

To get started, configure your environment variables for x402 payments and trading permissions:

# Required for x402 API micropayments
export PAYMENT_PRIVATE_KEY=0xyour_private_key

# Optional: Separate key for signing swap transactions
export TRADE_PRIVATE_KEY=0xyour_trade_key

# Enable execution tools for swaps and limit orders
export ELSA_ENABLE_EXECUTION_TOOLS=true

Invoke tools directly using the CLI:

npx tsx scripts/index.ts elsa_get_balances '{"wallet_address": "0x..."}'

Elsa x402 DeFi Tools Data Schema & Taxonomy

Data Type Description Key Fields
Portfolio Comprehensive wallet analysis and PnL wallet_address, total_unrealized_pnl, positions
Swap Quote Routing and price impact details from_token, to_token, from_amount, slippage
Pipeline Transaction execution lifecycle tracking pipeline_id, status, tx_hash
Budget Usage and limit tracking for x402 spent_today_usd, remaining_today_usd, calls_last_minute

Elsa x402 DeFi Tools Advanced Features

  • Integrated x402 micropayment system for cost-effective, per-call API billing instead of flat monthly fees.
  • Local signer mode for secure, automated transaction broadcasting using local private keys.
  • Multi-chain support for a wide array of networks including Base, Optimism, Polygon, and zkSync.
  • Sophisticated perpetual futures management including leverage, take-profit, and stop-loss controls.
  • Automated limit order lifecycle management from creation to cancellation within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Github Stars: 0
forks: 0

Featured*