2.5k
GitHub Stars
7
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill elsa-x402-api- _meta.json279 B
- ONE-PAGER.md2.5 KB
- package-lock.json331.1 KB
- package.json930 B
- README.md8.1 KB
- SKILL.md12.0 KB
- tsconfig.json528 B
Overview
This skill provides DeFi portfolio analysis, token discovery, and secure swap execution using the Elsa API with x402 micropayments. It bundles read-only tools for prices, balances, transaction history and risk analysis together with execution tools for dry-run swaps, confirmed execution, limit orders, and perp positions. Built-in budget controls and a required quote → dry-run → confirm → execute flow protect funds and control API spend. Supports multiple chains and optional local or external signing for transactions.
How this skill works
Read-only endpoints let you search tokens, fetch prices, inspect balances, and analyze wallets without spending execution budget. For swaps, the skill enforces a 4-step flow: request a quote, run a dry-run to generate a pipeline and confirmation token, obtain explicit user confirmation, then execute the pipeline which signs and broadcasts transactions. Budget and rate limits are tracked; execution tools require environment flags and private keys for signing or fall back to the payment key.
When to use it
- Quickly scan token price, balances, and portfolio metrics across supported chains.
- Find optimal on-chain swap routes and simulate outcomes before spending funds.
- Execute confirmed swaps, limit orders, or open/close perp positions with controlled signing.
- Audit transaction history or get behavioral and risk analysis for a wallet.
- Enforce daily and per-call budget limits for cost-sensitive automation.
Best practices
- Always call elsa_get_swap_quote and show it to the user before any execution.
- Use elsa_execute_swap_dry_run to create a pipeline and require confirmation_token before executing.
- Check elsa_budget_status before initiating expensive operations to avoid exceeding limits.
- Never call execution tools in an automated loop; require explicit human confirmation.
- Keep PAYMENT_PRIVATE_KEY and TRADE_PRIVATE_KEY secured and set ELSA_ENABLE_EXECUTION_TOOLS only when needed.
Example use cases
- Search for a token symbol, retrieve current price, and calculate potential slippage for a planned swap.
- Analyze a wallet to surface risky patterns, open perp positions, or unrealized PnL before trading decisions.
- Create a limit order that executes when a price target is reached and cancel it if conditions change.
- Simulate a cross-token swap to verify routes and fees, then execute the pipeline with local signing.
- Fetch transaction history and portfolio breakdown for reporting or compliance.
FAQ
Yes. You can use external_signer mode to receive unsigned transactions for offline signing, or omit execution tools and only use read-only endpoints.
How are API spending limits enforced?
The skill enforces per-call and daily USD caps, a rate limit for calls per minute, and exposes elsa_budget_status to check remaining budget before actions.
What happens if I skip the dry-run?
Skipping the dry-run violates the required flow. The skill mandates a dry-run to produce a confirmation token and simulation results before execution.