Overview
- Skill Key
- hurcannansen/nansen-trade
- Author
- hurcannansen
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/hurcannansen/nansen-trade
- Latest Commit SHA
- ee4ecd58a94453553a78009dc2c98ee51566e005
Execute DEX swaps on Solana or Base. Use when buying or selling a token, getting a swap quote, or executing a trade.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 nansen-trade 技能。 若已安装,则直接安装 nansen-trade 技能。
# Trade
Two-step flow: quote then execute. **Trades are irreversible once on-chain.**
**Prerequisite:** You need a wallet first. Run `nansen wallet create` before trading.
## Quote
```bash
nansen trade quote \
--chain solana \
--from SOL \
--to USDC \
--amount 1000000000
```
Symbols resolve automatically: `SOL`, `ETH`, `USDC`, `USDT`, `WETH`. Raw addresses also work.
## Execute
```bash
nansen trade execute --quote <quote-id>
```
## Agent pattern
```bash
# 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"
```
## Common Token Addresses
| Token | Chain | Address |
|-------|-------|---------|
| SOL | Solana | `So11111111111111111111111111111111111111112` |
| USDC | Solana | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| ETH | Base | `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` |
| USDC | Base | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
## Amounts are in base units
| Token | Decimals | 1 token = |
|-------|----------|-----------|
| SOL | 9 | `1000000000` |
| ETH | 18 | `1000000000000000000` |
| USDC | 6 | `1000000` |
## Flags
| Flag | Purpose |
|------|---------|
| `--chain` | `solana` or `base` |
| `--from` | Source token (symbol or address) |
| `--to` | Destination token (symbol or address) |
| `--amount` | Amount in base units (integer) |
| `--wallet` | Wallet name (default: default wallet) |
| `--slippage` | Slippage tolerance as decimal (e.g. 0.03) |
| `--quote` | Quote ID for execute |
| `--no-simulate` | Skip pre-broadcast simulation |
## Environment Variables
| Var | Purpose |
|-----|---------|
| `NANSEN_WALLET_PASSWORD` | **Required for `trade execute`.** Wallet encryption password — persisted in `~/.nansen/.env`. Source before executing: `source ~/.nansen/.env && nansen trade execute ...` |
| `NANSEN_API_KEY` | API key (also set via `nansen login`) |
> **Agents:** Never h...
capt-marbles
Task Router
capncoconut
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.