Loading...
Loading...
Execute DEX swaps on Solana or Base. Use when buying or selling a token, getting a swap quote, or executing a trade.
npx skill4agent add nansen-ai/nansen-cli nansen-tradingnansen wallet createnansen trade quote \
--chain solana \
--from SOL \
--to USDC \
--amount 1000000000SOLETHUSDCUSDTWETHnansen trade execute --quote <quote-id># Pipe quote ID directly into execute
quote_id=$(nansen trade quote --chain solana --from SOL --to USDC --amount 1000000000 2>&1 | grep "Quote ID:" | awk '{print $NF}')
nansen trade execute --quote "$quote_id"| Token | Chain | Address |
|---|---|---|
| SOL | Solana | |
| USDC | Solana | |
| ETH | Base | |
| USDC | Base | |
| Token | Decimals | 1 token = |
|---|---|---|
| SOL | 9 | |
| ETH | 18 | |
| USDC | 6 | |
| Flag | Purpose |
|---|---|
| |
| Source token (symbol or address) |
| Destination token (symbol or address) |
| Amount in base units (integer) |
| Wallet name (default: default wallet) |
| Slippage tolerance as decimal (e.g. 0.03) |
| Quote ID for execute |
| Skip pre-broadcast simulation |
| Var | Purpose |
|---|---|
| Required for |
| API key (also set via |
Agents: Never hold a wallet password only in session memory. Ifis not inNANSEN_WALLET_PASSWORD, follow the setup flow in the nansen-wallet-manager skill Password Policy to generate and persist one before proceeding.~/.nansen/.env