SunSwap Skill
Execute token swaps, manage liquidity, and query market data on SunSwap DEX via sun-cli.
Quick Start
Instructions: Read SKILL.md for complete usage instructions.
Approach
This skill uses sun-cli (@sun-protocol/sun-cli) — a unified CLI for SUN.IO / SunSwap on TRON. All swap, liquidity, price, pool, and position operations are handled through sun commands with --json output for AI agent consumption.
Files
- SKILL.md - Complete skill documentation with all commands and workflows
- CHANGELOG.md - Version history
Prerequisites
npm install -g @sun-protocol/sun-cli@1.2.2Exactly @sun-protocol/sun-cli@1.2.2 is required for wallet-free --dry-run previews.
Networks
| Network | Description |
|---|---|
| mainnet | TRON mainnet (default) |
| nile | TRON Nile testnet |
| shasta | TRON Shasta testnet |
Usage Examples
Check Wallet
sun --json wallet address
sun --json wallet balancesGet Price
sun --json price TRXSwap Tokens
sun --json swap:quote TRX USDT 100000000
sun --json --yes swap TRX USDT 100000000 --slippage 0.005Manage Liquidity
# V2
sun --json --yes liquidity v2:add --token-a TRX --token-b USDT --amount-a 1000000
# V3
sun --json --yes liquidity v3:mint --token0 TRX --token1 USDT --fee 3000 --amount0 1000000
# V4
sun --json --yes liquidity v4:mint --token0 TRX --token1 USDT --amount0 1000000Query Pools
sun --json pool top-apy --page-size 10
sun --json pool search "TRX USDT"Check Positions
sun --json position list --owner TAddressDependencies
@sun-protocol/sun-cli@1.2.2(installed globally)
Version
2.0.0 (2026-09-07) - align with the unified BofAI Skills repository release and pin @sun-protocol/sun-cli@1.2.2
3.3.0 (2026-07-09) - migrate runtime dependency to @sun-protocol/sun-cli and document wallet-free dry-run previews
3.0.0 (2026-03-15) - sun-cli based approach
See CHANGELOG.md for migration notes.
License
MIT - see LICENSE for details