返回 Skill 市集

Trading Automation

solana-trader

Solana Trader is a comprehensive Solana wallet management and token-trading Skill that automates portfolio tasks and executes swaps via the Jupiter DEX aggregator.

45 天前更新1 分鐘內設定完

總覽

Solana Trader is a comprehensive Solana wallet management and token-trading Skill that automates portfolio tasks and executes swaps via the Jupiter DEX aggregator.

Solana Trader is a comprehensive Solana wallet management and token-trading Skill that automates portfolio tasks and executes swaps via the Jupiter DEX aggregator. It provides core features to check wallet balances, fetch enriched transaction history (Helius or Shyft), construct and submit token swaps through Jupiter, and manage RPC selection including free public endpoints and optional paid providers (QuickNode, Alchemy, Helius). Configure with a local keypair path and optional API keys to improve data fidelity and reliability. Use cases include portfolio monitoring, ad-hoc token swaps, transaction auditing, and embedding Solana trade workflows into automation agents. Built-in RPC fallback, rate-limit detection, and upgrade guidance make it suitable for both casual users and production/high-frequency trading scenarios.

Skill.md

這個 Skill 如何運作

Solana Trader is a comprehensive Solana wallet management and token-trading Skill that automates portfolio tasks and executes swaps via the Jupiter DEX aggregator.

SKILL.mdALPHIO / 已驗證

Solana Trader 🚀

A comprehensive Solana wallet management and trading skill for Clawdbot. Manage your Solana portfolio, check balances, view transaction history, and swap tokens using Jupiter DEX aggregator.

Environment Variables

VariableDescriptionRequired
SOLANA_KEYPAIR_PATHPath to wallet keypair JSON fileYes
SOLANA_RPC_URLCustom RPC endpoint (default: mainnet-beta)No
JUPITER_API_KEYJupiter API key for authenticated requestsNo
HELIUS_API_KEYHelius API key for enhanced transaction dataNo
SHYFT_API_KEYShyft API key for transaction historyNo
QUICKNODE_RPC_URLQuickNode RPC endpointNo
ALCHEMY_RPC_URLAlchemy Solana RPC endpointNo

🌐 Free Public RPC Endpoints (No API Key Required)

ProviderEndpointNotes
Solana Foundationhttps://api.mainnet-beta.solana.comOfficial, rate limited
PublicNodehttps://solana-rpc.publicnode.comPrivacy-first, fast
Ankrhttps://rpc.ankr.com/solanaFree public endpoint
Project Serumhttps://solana-api.projectserum.comCommunity maintained

⚠️ Rate Limits: Public endpoints typically limit to ~100 requests/10 seconds. For production or high-frequency trading, use a paid RPC provider.

RPC Selection Strategy

Default behavior (no API keys configured):

  1. Try SOLANA_RPC_URL if set
  2. Fall back to free public endpoints in order:
    • https://api.mainnet-beta.solana.com
    • https://solana-rpc.publicnode.com
    • https://rpc.ankr.com/solana

When to upgrade to paid RPC:

  • Rate limit errors (429 Too Many Requests)
  • High-frequency trading or MEV
  • Need for enhanced transaction data (Helius)
  • Production applications requiring 99.9% uptime
  • WebSocket subscriptions for real-time updates

If rate limited, ask user: "Would you like to configure a paid RPC provider? Options: Helius, QuickNode, Alchemy, Shyft"

💎 Referral Fee Configuration

This skill includes a small platform fee (0.2%) on swaps to support development. The fee is transparently disclosed to users before each swap.

VariableValueDescription
PLATFORM_FEE_BPS200.2% platform fee (20 basis points)
FEE_ACCOUNT8KDDpruBwpTzJLKEcfv8JefKSVYWYE53FV3B2iLD6bNNSolana wallet to receive fees

Fee Breakdown:

  • User pays: 0.2% of swap output
  • Developer receives: 97.5% of fee (0.195%)
  • Jupiter receives: 2.5% of fee (0.005%)

Example: On a 100 USDC swap output:

  • Total fee: 0.20 USDC
  • You receive: ~0.195 USDC
  • Jupiter receives: ~0.005 USDC

Setup Verification

# Check wallet address
solana address --keypair "$SOLANA_KEYPAIR_PATH"

# Check Solana CLI config
solana config get

# Test RPC connection
solana cluster-version

Import Private Key

If you only have a private key (base58 string or byte array), convert it to keypair JSON:

From Base58 private key:

# Install solana-keygen if needed
# Your private key looks like: 5K1gR...xyz (base58 string)

echo "Enter your base58 private key:"
read -s PRIVATE_KEY

# Convert to keypair JSON (requires Node.js)
node -e "
const bs58 = require('bs58');
const key = bs58.decode('$PRIVATE_KEY');
console.log(JSON.stringify(Array.from(key)));
" > ~/.config/solana/imported-wallet.json

export SOLANA_KEYPAIR_PATH=~/.config/solana/imported-wallet.json

From byte array (e.g., Phantom export):

# If you have a byte array like [12,34,56,...]
echo '[12,34,56,78,...]' > ~/.config/solana/imported-wallet.json
export SOLANA_KEYPAIR_PATH=~/.config/solana/imported-wallet.json

From seed phrase (mnemonic):

# Use solana-keygen to recover
solana-keygen recover -o ~/.config/solana/recovered-wallet.json
# Enter your 12/24 word seed phrase when prompted

export SOLANA_KEYPAIR_PATH=~/.config/solana/recovered-wallet.json

⚠️ Security: Never share your private key or seed phrase. Store keypair files with restricted permissions: chmod 600 ~/.config/solana/*.json


💰 Balance Commands

Check SOL Balance

solana balance --keypair "$SOLANA_KEYPAIR_PATH"

List All Token Accounts

spl-token accounts --owner $(solana address --keypair "$SOLANA_KEYPAIR_PATH")

Check Specific Token Balance

# Replace <MINT_ADDRESS> with token mint
spl-token balance <MINT_ADDRESS> --owner $(solana address --keypair "$SOLANA_KEYPAIR_PATH")

Get Portfolio Summary

# Get wallet address
WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")

# Get SOL balance
SOL_BALANCE=$(solana balance --keypair "$SOLANA_KEYPAIR_PATH" | awk '{print $1}')

# Get all token accounts
spl-token accounts --owner $WALLET

📜 Transaction History

View Recent Transactions

Multiple RPC providers supported. Default uses native Solana RPC (no API key required).

Option 1: Solana RPC (default, no API key)

WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")
RPC_URL="${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}"

curl -s -X POST "$RPC_URL" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getSignaturesForAddress\",\"params\":[\"$WALLET\",{\"limit\":10}]}" | jq '.result[] | {signature: .signature, slot: .slot, blockTime: .blockTime}'

Option 2: Helius (enhanced data, recommended for detailed history)

WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")

curl -s "https://api.helius.xyz/v0/addresses/${WALLET}/transactions?api-key=${HELIUS_API_KEY:-demo}&limit=10" | jq '.[] | {signature: .signature, type: .type, timestamp: .timestamp, fee: .fee}'

Option 3: Shyft (free tier available)

WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")

curl -s "https://api.shyft.to/sol/v1/transaction/history?network=mainnet-beta&account=${WALLET}&tx_num=10" \
  -H "x-api-key: ${SHYFT_API_KEY}" | jq '.result.transactions'

Option 4: QuickNode

WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")

curl -s -X POST "$QUICKNODE_RPC_URL" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getSignaturesForAddress\",\"params\":[\"$WALLET\",{\"limit\":10}]}" | jq '.result'

Option 5: Alchemy

WALLET=$(solana address --keypair "$SOLANA_KEYPAIR_PATH")

curl -s -X POST "$ALCHEMY_RPC_URL" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getSignaturesForAddress\",\"params\":[\"$WALLET\",{\"limit\":10}]}" | jq '.result[] | {signature: .signature, slot: .slot, blockTime: .blockTime}'

💡 Provider Selection: AI will auto-detect available API keys and use the best provider. If no keys configured, defaults to native Solana RPC.

View Transaction Details

# Replace <SIGNATURE> with transaction signature
solana confirm -v <SIGNATURE>

# Or via RPC for more details
RPC_URL="${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}"
curl -s -X POST "$RPC_URL" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getTransaction\",\"params\":[\"<SIGNATURE>\",{\"encoding\":\"jsonParsed\",\"maxSupportedTransactionVersion\":0}]}" | jq '.result'

🪙 Common Token Addresses

TokenSymbolMint AddressDecimals
Wrapped SOLSOLSo111111111111111111111111111111111111111129
USD CoinUSDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v6
TetherUSDTEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB6
BonkBONKDezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB2635
JupiterJUPJUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN6
RaydiumRAY4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R6
PythPYTHHZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt36
JitoJTOjtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL9

最適合用於

何時使用

Solana Trader is a comprehensive Solana wallet management and token-trading Skill that automates portfolio tasks and executes swaps via the Jupiter DEX aggregator.

01 · 會前準備

準備決策簡報

在投資委員會開會前,把零散證據整理成結構化的論據。

02 · 團隊協作

統一交接標準

讓分析師、投資組合經理與 Agent 產出一致的研究結果。

03 · 即時更新

更新投資邏輯

出現新催化劑、KPI 發布或財報結果後,更新情境假設。

社群回饋

越用越好用。

隨著 Skill 被使用與評審,回饋將顯示在這裡。

提交回饋

探索更多

相關 Skills

查看全部
免費開始