openclaw-elsa-x402
DeFi tools for portfolio analysis, token search, and swap execution via Elsa API with x402 micropayments
Why use this skill?
Manage your DeFi portfolio and execute secure token swaps with the openclaw-elsa-x402 skill. Featuring x402 micropayments and automated multi-step transaction pipelines.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/justjkk/elsa-x402-apiWhat This Skill Does
The openclaw-elsa-x402 skill acts as a powerful DeFi orchestrator for the OpenClaw AI agent, enabling seamless portfolio management and token trading. By leveraging the Elsa API, this tool simplifies complex decentralized finance tasks, allowing users to search for assets, retrieve real-time token pricing, and execute multi-step swap pipelines. The integration of the x402 micropayments protocol ensures that API calls are metered, transparent, and scalable.
This skill is designed to handle the complexity of transaction pipelines, including approvals and multi-chain swaps, through a safe and predictable four-step process: Quote, Dry Run, Confirmation, and Execution. By enforcing rigorous budget controls and mandatory dry-run cycles, the skill prioritizes capital efficiency and user safety during volatile market conditions.
Installation
To install this skill, use the ClawHub CLI command within your OpenClaw environment:
clawhub install openclaw/skills/skills/justjkk/elsa-x402-api
Ensure you have configured your environment variables, specifically PAYMENT_PRIVATE_KEY for API access and TRADE_PRIVATE_KEY for transaction signing. Verify that ELSA_ENABLE_EXECUTION_TOOLS is set to true if you intend to execute actual trades.
Use Cases
- Portfolio Analysis: Quickly query price data and search for tokens to track assets across different chains like Base.
- DeFi Trading: Execute complex token swaps without manual interaction with DApp interfaces, relying on the agent to handle approvals and confirmations.
- Automated Trading Pipelines: Chain multiple transactions together, ensuring that each step of the swap process is validated before funds are moved.
Example Prompts
- "Check the current price of USDC on the Base network and search for its contract address."
- "I want to swap 10 Base USDC for Ethereum. Can you get me a quote and run a dry test?"
- "Execute the swap for pipeline ID abc-123 using my local signer, and let me know when the transaction hashes are confirmed."
Tips & Limitations
- Budget Management: Always check
elsa_budget_statusbefore initiating large sequences to prevent running out of gas for your x402 payments. - Dry-Run Mandatory: Never skip the dry-run phase; this is your primary protection against failed transactions and wasted fees.
- Rate Limits: Note the limit of 30 calls per minute; heavy automation sequences should include delays or wait periods to stay within these bounds.
- Security: Keep your
TRADE_PRIVATE_KEYsecure. The agent will sign transactions on your behalf, so ensure you have reviewed theelsa_get_swap_quotedata thoroughly before confirming execution.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-justjkk-elsa-x402-api": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api, code-execution