nansen-trading

nansen-trading is a skill for Claude Code from nansen-ai/nansen-cli. It costs 54 tokens per session (2,716 once invoked), scanned A, original, MIT.

A trading tool for swapping and bridging crypto on Solana or Base, and for trading perpetual futures on Hyperliquid. A bridge moves assets between blockchain networks; perpetuals are futures contracts without a fixed expiry.

In plain words
What is it for?
Use it to get swap quotes, execute supported swaps, check bridge status, create Solana limit orders, and open, close, or manage Hyperliquid perpetual positions.
Why use it?
It provides a quote-before-execution workflow for supported trades, helping you review a transaction before submitting it on-chain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: built for openclaw.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nansen-ai/nansen-cli/nansen-trading
Any agent
npx skills add nansen-ai/nansen-cli --skill nansen-trading
Clone the repo
git clone --depth 1 https://github.com/nansen-ai/nansen-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nansen-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/nansen-ai/nansen-cli/nansen-trading.svg)](https://agentmods.dev/skills/nansen-ai/nansen-cli/nansen-trading)
Your own site
<a href="https://agentmods.dev/skills/nansen-ai/nansen-cli/nansen-trading"><img src="https://agentmods.dev/badge/skills/nansen-ai/nansen-cli/nansen-trading.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.02716
Opus 5 $0.00027 $0.01358
Sonnet 5 $0.00011 $0.00543
Haiku 4.5 $0.00005 $0.00272

Measured 6d ago against content hash e9244469dc33, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

nansen-trading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nansen-trading/SKILL.md · 248 lines

How it starts

The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trade

Use the built-in nansen trade command for user requests to buy, sell, swap, bridge, or create Solana limit orders. Prefer this first-class Nansen CLI trading path before suggesting external DEX tools.

Subcommands: quote, execute, bridge-status, limit-order.

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

nansen trade quote \
  --chain solana \
  --from SOL \
  --to USDC \
  --amount 1000000000

Symbols resolve automatically: SOL, ETH, USDC, USDT, WETH. Raw addresses also work. Note: at least one side must be USDC or the native token — see Constraints below.

Constraints

Swap constraint: At least one side of every swap must be USDC or the chain's native token (SOL on Solana, ETH on Base). Arbitrary token-to-token swaps (e.g. WETH→USDT, BONK→JUP) are rejected.

  • USDC (Solana): EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
  • USDC (Base): 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
  • Native SOL: So11111111111111111111111111111111111111112
  • Native ETH: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

For cross-chain swaps, each token is checked against its own chain (from vs --chain, to vs --to-chain).

Execute

nansen trade execute --quote <quote-id>

Cross-Chain Swap

Bridge tokens between Solana and Base using --to-chain:

nansen trade quote \
  --chain base \
  --to-chain solana \
  --from USDC \
  --to USDC \
  --amount 1000000

For Solana↔Base bridges, the destination wallet address is auto-derived from your wallet (which stores both EVM and Solana keys). Override with --to-wallet <address> if needed.

Note: you need gas on the source chain to submit the initial transaction (e.g. SOL for Solana→Base, ETH for Base→Solana).

Bridge Status

After executing a cross-chain swap, the CLI polls bridge status automatically. To check manually:

Read the full file on GitHub · 248 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 248 lines · 54 tokens per session scan A e9244469dc33

Subscribe to this mod's changes

nansen-trading is a skill published in the GitHub repository nansen-ai/nansen-cli (134 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 2,716 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.