Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 2.18 KB

File metadata and controls

93 lines (63 loc) · 2.18 KB

SunSwap Skill

Execute token swaps, manage liquidity, and query market data on SunSwap DEX via sun-cli.

License: MIT TRON

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.2

@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 balances

Get Price

sun --json price TRX

Swap Tokens

sun --json swap:quote TRX USDT 100000000
sun --json --yes swap TRX USDT 100000000 --slippage 0.005

Manage 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 1000000

Query Pools

sun --json pool top-apy --page-size 10
sun --json pool search "TRX USDT"

Check Positions

sun --json position list --owner TAddress

Dependencies

  • @sun-protocol/sun-cli >= 1.2.2 (installed globally)

Version

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