zerion-trading
Original:🇺🇸 English
Translated
Execute on-chain trading actions via the Zerion CLI: swap, bridge, and send tokens across 14 EVM chains and Solana. Use whenever the user asks to swap / trade / convert tokens, bridge across chains, or transfer tokens to an address. Always uses an API key + agent token (no pay-per-call). Pair with `zerion-agent-management` to set up tokens/policies first, and `zerion-analyze` to check positions before trading.
9installs
Sourcezeriontech/zerion-ai
Added on
NPX Install
npx skill4agent add zeriontech/zerion-ai zerion-tradingTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Zerion — Trading
Execute on-chain trading actions: swap, bridge, send. All commands build, sign, and broadcast a transaction in one shot using the active agent token as the signer passphrase.
Setup
If a command fails with , install once:
zerioncommand not foundbash
npm install -g zerion-cliRequires Node.js ≥ 20. For auth see the umbrella skill. All trading needs an API key + agent token. Pay-per-call (, ) does NOT apply here.
zerion--x402--mppWhen to use
- "Swap X for Y" / "convert tokens" / "trade"
- "Bridge X to chain Y" (cross-chain)
- "Send tokens to address" (native ETH/SOL or ERC-20)
For balance checks before trading → . For setting up an agent token → . For off-chain signing (permits, EIP-712) → .
zerion-analyzezerion-agent-managementzerion-signPre-flight
bash
zerion wallet list # confirm wallet exists, see active policies
zerion agent list-tokens # confirm agent token is setIf no agent token, the CLI offers an inline create-token prompt on the next trade attempt (TTY only). In CI / piped contexts, see .
zerion-agent-managementSwap (same-chain)
Convert one token to another on the same chain. For cross-chain conversion use .
bridgebash
# zerion swap <chain> <amount> <from-token> <to-token>
zerion swap base 1 USDC ETH
zerion swap ethereum 0.1 ETH USDC
zerion swap arbitrum 100 USDC DAI
# Solana same-chain swap
zerion swap solana 0.1 SOL USDC
# Specific wallet (overrides defaultWallet)
zerion swap base 1 USDC ETH --wallet <name>
# Custom slippage (default 2%, max 3%)
zerion swap base 1 USDC ETH --slippage 3
# Confirmation timeout (default 120s)
zerion swap base 1 USDC ETH --timeout 300Tokens accepted as: symbol (, , ), 0x address (EVM), Solana mint, or full search match. Prefer the explicit address when the symbol is ambiguous.
ETHUSDCSOLbash
# List swap-available tokens for a chain
zerion swap tokens # all chains
zerion swap tokens base # filter to Base
zerion swap tokens solana # filter to SolanaBridge (cross-chain)
Move (and optionally swap) tokens between chains. Bridge with the same token on both sides for a pure transfer; pass a different for bridge + swap.
to-tokenbash
# zerion bridge <from-chain> <from-token> <amount> <to-chain> <to-token>
# Same-token bridge between EVM chains
zerion bridge base USDC 5 arbitrum USDC
zerion bridge ethereum USDC 100 polygon USDC
# Bridge + swap on destination
zerion bridge base USDC 5 arbitrum ETH
# Native token bridge
zerion bridge base ETH 0.001 optimism ETH
# Bridge EVM → Solana (mnemonic wallet has both accounts → no extra flag needed)
zerion bridge ethereum USDC 50 solana USDC
# Bridge Solana → EVM
zerion bridge solana USDC 50 ethereum USDC
# Cross-format bridge to a different local wallet
zerion bridge ethereum USDC 50 solana USDC --to-wallet <sol-wallet>
zerion bridge solana USDC 50 ethereum USDC --to-wallet <evm-wallet>
# Bridge to a raw destination address (must match the target chain's format)
zerion bridge ethereum USDC 50 solana USDC --to-address <solana-pubkey>
zerion bridge solana USDC 50 ethereum USDC --to-address 0x...
# Slippage / timeout flags work the same as swap
zerion bridge base USDC 5 arbitrum ETH --slippage 3 --timeout 300Cross-chain destination rules
For Solana ↔ EVM bridges (different address formats), the destination receiver is resolved in this priority order:
- — raw recipient. Must match the target chain's format (
--to-address <addr>for EVM, base58 pubkey for Solana). ENS names allowed for EVM.0x… - — local wallet whose corresponding account on the target chain is used.
--to-wallet <name> - Fallback — the source wallet itself, if it has an account on the target chain (true for any mnemonic-derived wallet).
The destination wallet must have an account that satisfies the target chain. EVM-only wallets cannot receive on ; Solana-only wallets cannot receive on EVM chains.
solanaIf the API returns, the route doesn't currently exist for the requested pair. Verify the token has implementations on both chains (swap cannot be performed with the given parameters), try a different amount, and confirm both chains support bridging (zerion search <symbol>).zerion chains
Send (transfer)
Native + ERC-20 + native SOL transfers. is auto-inferred from the recipient address format when not passed ( → ethereum default, base58 → solana).
--chain0x…bash
# EVM: native + ERC-20
zerion send ETH 0.01 --to 0x... --chain base
zerion send USDC 10 --to vitalik.eth --chain ethereum
# Solana: native SOL (chain auto-detected from base58 recipient)
zerion send SOL 0.1 --to 2Nsnn…
zerion send SOL 0.1 --to 2Nsnn… --chain solana # explicit formRecipients accepted: 0x address (EVM), ENS name (resolved at send time), Solana base58 pubkey. SPL token sends on Solana are not yet supported via the CLI — convert to SOL first with .
zerion swap solana <amount> <token> SOLToken search (resolve symbols → addresses)
bash
zerion search <query> # by name, symbol, or address
zerion search PEPE --chain ethereum
zerion search "uniswap" --limit 5Chain validation
bash
zerion chains # full chain catalogUse this to confirm a chain ID is supported before passing / / .
--chain--to-chain--from-chainOutput & global flags
| Flag | Description |
|---|---|
| Source wallet (default: from config) |
| Destination wallet for |
| Destination address for |
| Recipient address for |
| Slippage tolerance (default 2%, max 3%) |
| Confirmation timeout (default 120s) |
| Output mode (JSON default) |
Pre-trade safety checklist
- Confirm the agent token is bound to the right wallet — shows wallet bindings.
zerion agent list-tokens - Confirm policy allows the action — (e.g.
zerion agent list-policiesblocks raw--deny-transfers;sendblocks swaps on other chains).--chains base - Slippage — defaults to 2%. Tight (0.5%) for stable pairs, loose (3-5%) for low-liquidity tokens.
- Cross-chain timeout — bridges can take 1-5 min. Use for slower routes.
--timeout 300
Common errors
| Code | Cause | Fix |
|---|---|---|
| Trading needs an agent token | |
| Action blocked by an active policy | Check |
| Invalid chain | |
| Not enough of | |
| No route between tokens / chains | Try a different pair or chain |
| Price moved beyond | Increase slippage or retry |
| Confirmation didn't land within | Bump timeout, check tx hash on explorer |
| Cross-chain destination missing or wrong format | Pass |