Skills universal-trading
Execute cross-chain token trading on EVM and Solana with Particle Network Universal Account SDK. Use when users ask to set up universal-account-example, buy or sell tokens, run convert/swap flows, transfer assets, call custom transactions, query balances/history, or monitor transaction status via WebSocket.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/0xmomo-ngclubs/universal-trading" ~/.claude/skills/clawdbot-skills-universal-trading && rm -rf "$T"
manifest:
skills/0xmomo-ngclubs/universal-trading/SKILL.mdsource content
Universal Trading
Execute cross-chain trades with the official Particle Network
universal-account-example project.
First-Use Auto Initialization (Default)
When users install this skill and start using it for the first time, auto-run initialization by default.
Use this decision flow:
- If
already exists, treat environment as initialized and continue to trading tasks.universal-account-example/.env - If not initialized, run from any directory:
bash {baseDir}/scripts/init.sh new
- If user explicitly wants to import an existing wallet, run:
bash {baseDir}/scripts/init.sh import <YOUR_PRIVATE_KEY>
After initialization, explicitly tell users:
- private key is stored at
underuniversal-account-example/.envPRIVATE_KEY - they can use this wallet in the UniversalX frontend:
->https://universalx.app
->创建钱包导入现有钱包
By default, setup auto-binds invite code
666666 after .env is created.
It also patches examples/buy-evm.ts to remove usePrimaryTokens restriction.
Optional flags:
# Use existing repo path bash {baseDir}/scripts/init.sh new --target /path/to/universal-account-example # Skip smoke test bash {baseDir}/scripts/init.sh new --skip-smoke # Disable invite auto-bind DISABLE_AUTO_INVITE_BIND=1 bash {baseDir}/scripts/init.sh new
Available Operations
Use scripts inside
universal-account-example/examples:
- Buy token:
,buy-solana.tsbuy-evm.ts - Sell token:
,sell-solana.tssell-evm.ts - Convert (swap):
,convert-solana.ts
,convert-evm.ts7702-convert-evm.ts - Transfer:
,transfer-solana.tstransfer-evm.ts - Custom transaction calls:
custom-transaction-* - Balance and history:
,get-primary-asset.tsget-transactions.ts - Real-time monitoring:
,transaction-status-wss.tsuser-assets-wss.ts
For buy operations that need explicit slippage control, use:
(fixed slippage or dynamic retry)scripts/buy-with-slippage.sh
Trade Status Follow-Up (Required)
After any
sendTransaction, do not stop at "transaction submitted".
Always return final outcome to user:
- Capture and show
.transactionId - Poll status until success or failure:
cd /path/to/universal-account-example bash {baseDir}/scripts/check-transaction.sh <TRANSACTION_ID> --max-attempts 30 --interval-sec 2
- Reply with one of:
(confirmed)SUCCESS
(failed on-chain/executor)FAILED
(not finalized before timeout, include explorer link)PENDING
Trade Configuration
| Option | Description | Example |
|---|---|---|
| Slippage tolerance (100 = 1%) | |
| Use PARTI token for gas | |
| Restrict source/fee primary tokens. Default: do not set (auto select). | |
| Jito tip for MEV protection (SOL) | |
Slippage Controls (Required for Volatile Tokens)
Allow users to choose one of these modes before buy:
- Fixed slippage only:
cd /path/to/universal-account-example bash {baseDir}/scripts/buy-with-slippage.sh \ --chain bsc \ --token-address 0x0000000000000000000000000000000000000000 \ --amount-usd 5 \ --slippage-bps 300
- Dynamic slippage + auto retry:
cd /path/to/universal-account-example bash {baseDir}/scripts/buy-with-slippage.sh \ --chain bsc \ --token-address 0x0000000000000000000000000000000000000000 \ --amount-usd 5 \ --slippage-bps 300 \ --dynamic-slippage \ --retry-slippages 300,500,800,1200
- Solana custom tip (anti-MEV) + retry tips:
cd /path/to/universal-account-example bash {baseDir}/scripts/buy-with-slippage.sh \ --chain solana \ --token-address 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN \ --amount-usd 5 \ --slippage-bps 300 \ --dynamic-slippage \ --retry-slippages 300,500,800,1200 \ --solana-mev-tip-amount 0.001 \ --retry-mev-tips 0.001,0.003,0.005
Reply with:
- chosen slippage mode and values
- chosen Solana tip settings (if Solana)
- final status (
/SUCCESS
/FAILED
)PENDING
and explorer URL when availabletransactionId
Supported Chains
- Solana:
CHAIN_ID.SOLANA_MAINNET - EVM:
,CHAIN_ID.POLYGON
,CHAIN_ID.ARBITRUM
,CHAIN_ID.OPTIMISM
,CHAIN_ID.BSCCHAIN_ID.ETHEREUM
Common Token Addresses
- SOL (native):
0x0000000000000000000000000000000000000000 - USDC (Solana):
EPjFWdd5AufqSSFqM7BcEHw3BXmQ9Ce3pq27dUGL7C24 - USDT (Solana):
Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Safety Checklist
- Validate chain, token address, and amount before creating transactions.
- Use small size for first live trade.
- Wrap
in try-catch and logsendTransaction
.transactionId - Prefer your own Particle credentials for production workloads.