Solskill solskill
DeFi Skills for AI Agents on Solana - 45+ endpoints - Swaps, Lending, Vaults, LP, Strategy Engine, Backtesting, Risk Scoring, Simulation, Market Data, TVL, Gas, Rebalancing, P&L, Smart Alerts
git clone https://github.com/caiovicentino/solskill
skill.md- makes HTTP requests (curl)
- references API keys
SolSkill — DeFi Skills for AI Agents
You have access to 45+ DeFi operations on Solana via the SolSkill API.
Base URL
https://solskill.ai/api/v1
Authentication
Protected endpoints require an API key:
# Option 1: x-api-key header (recommended) curl -H "x-api-key: solskill_your_api_key_here" ... # Option 2: Authorization header curl -H "Authorization: Bearer solskill_your_api_key_here" ...
Public Endpoints (no auth)
— List tokensGET /jupiter/tokens
— Swap quoteGET /jupiter/quote
— Raydium quoteGET /raydium/quote
— List poolsGET /raydium/pools
— Lending marketsGET /kamino/markets
— Reserves with APYGET /kamino/reserves
— Yield vaultsGET /kamino/vaults
— User positionsGET /kamino/positions
— Wallet balancesGET /wallet/balance
— Platform statisticsGET /stats
— Protocol health checkGET /health
— Risk assessmentGET /risk/score
— Best yield opportunitiesGET /yields/best
— Strategy recommendationsPOST /strategies/recommend
— Dry-run simulationPOST /simulate
— Real-time token pricesGET /market/prices
— Historical strategy backtestPOST /strategies/backtest
— Trending Solana tokensGET /tokens/trending
— Solana DeFi TVL trackerGET /defi/tvl
— Priority fee & gas estimatesGET /gas/estimate
— Portfolio P&LGET /wallet/pnl
— Compare protocol yieldsGET /protocols/compare
— Composite swap + depositPOST /wallet/swap-and-deposit
— Portfolio rebalance plannerPOST /portfolio/rebalance
Protected Endpoints (API key required)
— Execute swapPOST /jupiter/swap
— Raydium swapPOST /raydium/swap
— Add liquidityPOST /raydium/pools/add-liquidity
— Remove liquidityPOST /raydium/pools/remove-liquidity
— Deposit/withdrawPOST /kamino/deposit
— Borrow/repayPOST /kamino/borrow
— Send tokensPOST /wallet/send
— Deposit addressGET /wallet/receive
— Transaction historyGET /wallet/transactions
— Limit ordersPOST /orders
— Price alertsPOST /alerts
— Smart multi-type alertsPOST /alerts/smart
— List smart alertsGET /alerts/smart
— Delete smart alertDELETE /alerts/smart/:id
Quick Start: Agent Self-Registration
1. Register Your Agent
curl -X POST https://solskill.ai/api/v1/agents/register \ -H "Content-Type: application/json" \ -d '{"name": "YourAgentName"}'
Response:
{ "success": true, "agent": { "id": "uuid", "name": "YourAgentName", "api_key": "solskill_...", "verified": true }, "important": "SAVE YOUR API KEY!" }
2. Store Credentials
mkdir -p ~/.config/solskill cat > ~/.config/solskill/credentials.json << 'EOF' { "api_key": "solskill_your_api_key_here", "agent_id": "your_agent_id" } EOF chmod 600 ~/.config/solskill/credentials.json
3. Use in Requests
API_KEY=$(jq -r .api_key ~/.config/solskill/credentials.json) curl -H "x-api-key: $API_KEY" https://solskill.ai/api/v1/...
Market Prices (NEW v3)
Get Real-Time Token Prices
GET /market/prices GET /market/prices?tokens=SOL,JUP,BONK
Returns live prices from Jupiter Price API for top Solana tokens.
Response:
{ "success": true, "prices": { "SOL": {"price": 180.52, "symbol": "SOL", "mint": "So111..."}, "JUP": {"price": 1.23, "symbol": "JUP", "mint": "JUPy..."}, "BONK": {"price": 0.00003, "symbol": "BONK", "mint": "DezX..."} }, "timestamp": "2026-02-07T..." }
Supported tokens: SOL, USDC, JUP, RAY, JITO, PYTH, BONK, WIF, ORCA, MNDE
Strategy Backtesting (NEW v3)
Backtest a Strategy
POST /strategies/backtest { "strategy": "balanced", "token": "USDC", "amount": 1000, "periodDays": 90 }
Strategies:
conservative, balanced, aggressive, yield-farming, lending
Response:
{ "success": true, "backtest": { "strategy": "balanced", "totalReturn": 85.23, "finalBalance": 1085.23, "apy": 12.8, "maxDrawdown": 3.2, "sharpeRatio": 1.45, "winRate": 62.5, "dailyReturns": [0.03, 0.01, -0.02, ...] } }
Trending Tokens (NEW v3)
Get Top Trending Solana Tokens
GET /tokens/trending GET /tokens/trending?limit=10
Data from DexScreener with Jupiter price enrichment.
Response:
{ "success": true, "trending": [ {"rank": 1, "tokenAddress": "...", "symbol": "TOKEN", "price": 0.05, "totalAmount": 500} ], "source": "dexscreener" }
Swap & Deposit (NEW v3)
Composite: Swap Then Deposit
POST /wallet/swap-and-deposit { "fromToken": "SOL", "toToken": "USDC", "amount": 1.5, "depositVault": "USDC Lending" }
Returns Jupiter swap quote + Kamino deposit estimate with projected yield.
Response:
{ "success": true, "swapQuote": {"inAmount": "1500000000", "outAmount": "270000000", "priceImpactPct": "0.01"}, "depositEstimate": {"vault": "USDC Lending", "apy": 6.5, "projectedYield": {"yearly": 17.55}}, "totalSteps": 2, "estimatedFees": {"totalFee": "~0.00001 SOL"} }
DeFi TVL (NEW v3)
Solana Ecosystem TVL
GET /defi/tvl GET /defi/tvl?limit=10&category=Lending|DEX
Real-time TVL data from DefiLlama for all Solana protocols.
Response:
{ "success": true, "chain": "Solana", "totalTvl": 8500000000, "protocols": [ {"name": "Marinade Finance", "tvl": 1200000000, "tvlChange24h": 2.1, "category": "Liquid Staking"} ], "categoryBreakdown": {"Lending": 3000000000, "DEX": 2500000000}, "source": "defillama" }
Gas Estimator (NEW v3)
Get Fee Estimates
GET /gas/estimate
Live Solana priority fees from RPC with recommended tiers.
Response:
{ "success": true, "gasEstimate": { "baseFee": 0.000005, "priorityFee": { "low": {"microLamports": 1000, "label": "Economy"}, "medium": {"microLamports": 10000, "label": "Standard"}, "high": {"microLamports": 100000, "label": "Fast"} }, "currentTps": 3500, "recommendedPriority": "medium" } }
Portfolio Rebalancer (NEW v3)
Generate Rebalance Plan
POST /portfolio/rebalance { "targetAllocation": {"SOL": 50, "USDC": 30, "yield": 20}, "totalValue": 10000, "currentHoldings": {"USDC": 100} }
Returns step-by-step execution plan with swap and deposit instructions.
Response:
{ "success": true, "rebalance": { "steps": [ {"step": 1, "action": "swap", "from": "USDC", "to": "SOL", "amountUsd": 5000, "endpoint": "POST /api/v1/jupiter/swap"}, {"step": 2, "action": "deposit", "from": "USDC", "to": "Kamino Lending", "amountUsd": 2000, "endpoint": "POST /api/v1/kamino/deposit"} ], "estimatedCost": {"totalEstimate": "~$0.04"} } }
Portfolio P&L (NEW v3)
Get Profit & Loss
GET /wallet/pnl GET /wallet/pnl?wallet=WALLET_ADDRESS
Response:
{ "success": true, "pnl": { "totalValue": 4250.00, "totalCost": 3800.00, "pnlUsd": 450.00, "pnlPercent": 11.84, "byToken": [ {"token": "SOL", "balance": 5.2, "currentPrice": 180, "pnlUsd": 120, "pnlPercent": 14.5} ] } }
Protocol Comparison (NEW v3)
Compare Protocols
GET /protocols/compare?action=lend&token=USDC GET /protocols/compare?action=lp&token=SOL&limit=5
Actions:
lend, deposit, lp, liquidity, vault
Response:
{ "success": true, "comparison": { "protocols": [ {"name": "Kamino Lend", "apy": 6.5, "tvl": 150000000, "risk": "low", "fees": "0% deposit"}, {"name": "Marginfi", "apy": 5.8, "tvl": 80000000, "risk": "low", "fees": "0% deposit"} ], "recommendation": "Kamino Lend offers the best lend yield for USDC at 6.5% APY with low risk." } }
Smart Alerts (NEW v3)
Create Smart Alert
POST /alerts/smart { "type": "price", "condition": {"token": "SOL", "operator": "above", "value": 200}, "webhook": "https://your-webhook.com/alert" }
Types:
price, yield, tvl, gas, health
Operators: above, below, change_pct, crosses
List Smart Alerts
GET /alerts/smart GET /alerts/smart?type=price&status=active
Delete Smart Alert
DELETE /alerts/smart/:alertId
Strategy Engine
Get Strategy Recommendation
POST /strategies/recommend { "goal": "maximize yield", "risk": "medium", "amount": 1000, "token": "USDC" }
Response:
{ "success": true, "strategy": { "totalEstimatedApy": 12.5, "riskScore": 35, "allocations": [ { "protocol": "Kamino Vaults", "action": "deposit", "allocation": 40, "amountUsd": 400, "estimatedApy": 15.2, "riskLevel": "medium", "endpoint": "POST /api/v1/kamino/deposit" } ] } }
Risk levels:
low, medium, high
Simulation Mode
Simulate Any Operation
POST /simulate { "operation": "swap", "params": { "inputMint": "SOL", "outputMint": "USDC", "amount": "1000000000", "slippageBps": 50 } }
Supported operations:
swap, deposit, withdraw, add-liquidity
Response includes:
- Expected output amounts
- Price impact
- Fee breakdown
- Risk assessment
- Endpoint to execute
Risk Score
Assess Risk for Any Action
GET /risk/score?protocol=kamino&action=deposit&token=SOL&amount=100
Parameters:
— kamino, raydium, jupiterprotocol
— deposit, withdraw, borrow, swap, lp, add-liquidityaction
— Token symbol (SOL, USDC, etc.)token
— Position sizeamount
Response:
{ "success": true, "risk": { "overallScore": 22, "riskLevel": "MODERATE", "breakdown": [ {"category": "Smart Contract", "score": 10, "weight": 35, "detail": "3 audits..."}, {"category": "Liquidation", "score": 5, "weight": 28, "detail": "Supply-side only..."}, {"category": "Protocol TVL & Maturity", "score": 10, "weight": 21, "detail": "TVL: $500M+..."}, {"category": "Historical Performance", "score": 15, "weight": 14, "detail": "No incidents..."} ], "recommendation": "Acceptable risk level for most portfolios." } }
Health Monitor
Check Platform & Protocol Health
GET /health
Response:
{ "success": true, "status": "healthy", "solana": { "network": "mainnet-beta", "tps": 3500, "rpcLatencyMs": 85, "medianPriorityFeeMicroLamports": 1000 }, "protocols": [ {"name": "Jupiter", "status": "operational", "responseTimeMs": 280}, {"name": "Kamino", "status": "operational", "responseTimeMs": 150}, {"name": "Raydium", "status": "operational", "responseTimeMs": 200}, {"name": "DefiLlama", "status": "operational", "responseTimeMs": 120} ], "solskill": { "version": "3.0.0", "endpoints": 45, "uptime": "99.9%" } }
Yield Optimizer
Find Best Yields Across All Protocols
GET /yields/best?token=USDC&minApy=5&maxRisk=medium&limit=10
Parameters:
— Filter by token symboltoken
— Minimum APY thresholdminApy
— Maximum risk level (low, medium, high)maxRisk
— Max results (default 20, max 50)limit
Response:
{ "success": true, "yields": [ { "protocol": "kamino-lend", "type": "lending", "token": "USDC", "apy": 8.5, "tvlUsd": 150000000, "riskLevel": "low", "endpoint": "POST /api/v1/kamino/deposit" } ], "source": "defillama" }
Token Swaps (Jupiter)
List Tokens
GET /jupiter/tokens GET /jupiter/tokens?all=true # All verified tokens
Get Quote
GET /jupiter/quote?inputMint=SOL_MINT&outputMint=USDC_MINT&amount=LAMPORTS&slippageBps=50
Execute Swap (Protected)
POST /jupiter/swap { "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "1000000000", "userPublicKey": "YOUR_WALLET", "slippageBps": 50 }
Token Swaps (Raydium)
Get Quote
GET /raydium/quote?inputMint=SOL_MINT&outputMint=USDC_MINT&amount=LAMPORTS
Execute Swap (Protected)
POST /raydium/swap { "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "1000000000", "userPublicKey": "YOUR_WALLET", "slippageBps": 50 }
Liquidity Pools (Raydium)
List Pools
GET /raydium/pools?token=SOL&minTvl=1000000&minApy=10
Get Pool Details
GET /raydium/pools/:poolId
Add Liquidity (Protected)
POST /raydium/pools/add-liquidity { "poolId": "POOL_ADDRESS", "wallet": "YOUR_WALLET", "amountA": "1000000000", "slippage": 0.5 }
Remove Liquidity (Protected)
POST /raydium/pools/remove-liquidity { "poolId": "POOL_ADDRESS", "wallet": "YOUR_WALLET", "lpAmount": "1500000000", "slippage": 0.5 }
Lending & Vaults (Kamino)
List Markets
GET /kamino/markets
Get Reserves (with APY)
GET /kamino/reserves?token=SOL
List Vaults
GET /kamino/vaults?token=USDC&minApy=10
Get Positions
GET /kamino/positions?wallet=WALLET_ADDRESS
Deposit/Withdraw (Protected)
POST /kamino/deposit { "wallet": "WALLET_ADDRESS", "reserve": "RESERVE_ADDRESS", "amount": "1000000", "action": "deposit" }
Borrow/Repay (Protected)
POST /kamino/borrow { "wallet": "WALLET_ADDRESS", "reserve": "RESERVE_ADDRESS", "amount": "1000000", "action": "borrow" }
Wallet Operations
Check Balance
GET /wallet/balance?wallet=WALLET_ADDRESS
Send Tokens (Protected)
POST /wallet/send { "to": "RECIPIENT_ADDRESS", "amount": 0.5, "mint": "TOKEN_MINT" }
Get Receive Address (Protected)
GET /wallet/receive
Transaction History (Protected)
GET /wallet/transactions?limit=10
Limit Orders
Create Order (Protected)
POST /orders { "inputMint": "So111...", "outputMint": "EPjF...", "inAmount": "1000000000", "outAmount": "150000000" }
List Orders (Protected)
GET /orders?status=open
Cancel Order (Protected)
DELETE /orders/:orderId
Price Alerts
Create Alert (Protected)
POST /alerts { "tokenMint": "So111...", "tokenSymbol": "SOL", "condition": "above", "targetPrice": 200, "webhookUrl": "https://..." }
List Alerts (Protected)
GET /alerts?status=active
Delete Alert (Protected)
DELETE /alerts/:alertId
Common Token Mints
| Token | Mint Address |
|---|---|
| SOL | So11111111111111111111111111111111111111112 |
| USDC | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| USDT | Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB |
| JUP | JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN |
| KMNO | KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS |
| RAY | 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R |
| JITO | jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL |
| PYTH | HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3 |
| BONK | DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 |
| WIF | EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm |
| ORCA | orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE |
| MNDE | MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey |
Workflow Examples
Smart Yield Strategy
# 1. Check market prices curl "https://solskill.ai/api/v1/market/prices?tokens=SOL,USDC,JUP" # 2. Get personalized strategy curl -X POST https://solskill.ai/api/v1/strategies/recommend \ -d '{"goal":"maximize yield","risk":"medium","amount":1000,"token":"USDC"}' # 3. Backtest the strategy curl -X POST https://solskill.ai/api/v1/strategies/backtest \ -d '{"strategy":"balanced","token":"USDC","amount":1000,"periodDays":90}' # 4. Compare protocols curl "https://solskill.ai/api/v1/protocols/compare?action=lend&token=USDC" # 5. Simulate before executing curl -X POST https://solskill.ai/api/v1/simulate \ -d '{"operation":"deposit","params":{"token":"USDC","amount":400}}' # 6. Execute (with API key) curl -X POST https://solskill.ai/api/v1/kamino/deposit \ -H "x-api-key: $API_KEY" \ -d '{"reserve":"...","amount":"400000000","action":"deposit"}'
Swap & Deposit in One Flow
# 1. Get swap + deposit quote curl -X POST https://solskill.ai/api/v1/wallet/swap-and-deposit \ -d '{"fromToken":"SOL","toToken":"USDC","amount":1.5,"depositVault":"USDC Lending"}' # 2. Check gas fees curl "https://solskill.ai/api/v1/gas/estimate" # 3. Execute steps with API key
Portfolio Management
# 1. Check P&L curl "https://solskill.ai/api/v1/wallet/pnl?wallet=YOUR_WALLET" # 2. Plan rebalance curl -X POST https://solskill.ai/api/v1/portfolio/rebalance \ -d '{"targetAllocation":{"SOL":50,"USDC":30,"yield":20},"totalValue":10000}' # 3. Set smart alerts curl -X POST https://solskill.ai/api/v1/alerts/smart \ -H "x-api-key: $API_KEY" \ -d '{"type":"price","condition":{"token":"SOL","operator":"above","value":200}}' # 4. Track DeFi TVL curl "https://solskill.ai/api/v1/defi/tvl?category=Lending&limit=10"
Find Best Yields
# 1. Get best opportunities curl "https://solskill.ai/api/v1/yields/best?token=USDC&minApy=5&maxRisk=medium" # 2. Check health of protocols curl "https://solskill.ai/api/v1/health" # 3. Discover trending tokens curl "https://solskill.ai/api/v1/tokens/trending?limit=10" # 4. Assess risk curl "https://solskill.ai/api/v1/risk/score?protocol=kamino&action=deposit&token=USDC&amount=1000"
Error Handling
All endpoints return:
{ "success": false, "error": "Description" }
Status codes:
— Invalid parameters400
— Invalid API key401
— Rate limited (wait 60s)429
— Server error500
— External API error502
— External timeout (retry)504
Rate Limits
- 100 requests/minute per API key
- Rate limit headers in responses
- 429 = wait 60 seconds
Support
- Docs: https://solskill.ai
- Dashboard: https://solskill.ai/dashboard
- GitHub: https://github.com/caiovicentino/solskill