Autopilot Portfolio Advisor
The Autopilot Portfolio Advisor analyzes a wallet's holdings and LP positions to produce a health score and actionable suggestions for improving portfolio performance.
Health Score
The health score ranges from 0 to 100 and is calculated by applying penalty deductions to a perfect score:
| Condition | Penalty |
|---|---|
| Single token represents more than 80% of portfolio value | -30 |
| Fewer than 3 distinct tokens held | -20 |
| Idle stablecoins (not deployed in LP) exceed 20% of portfolio | -15 |
| No LP positions at all | -10 |
A score of 100 indicates a well-diversified portfolio with active yield generation. Lower scores identify specific areas for improvement.
Suggestion Types
The advisor generates structured suggestions, each with a type, reasoning, and concrete action parameters:
Diversify
Reduce concentration risk by swapping a portion of an overweight position into other assets.
- Triggered when a single token exceeds 80% of portfolio value.
- Includes suggested token addresses and target allocation percentages.
Earn Yield
Deploy idle assets into the highest-APR liquidity pools available on QsnDEX.
- Triggered when stablecoins or other holdings sit idle without generating yield.
- Includes target pool address, current APR, and estimated monthly earnings.
Take Profit
Realize gains on positions that have appreciated significantly.
- Includes the token address, current gain percentage, and suggested amount to sell.
Cut Loss
Reduce exposure to underperforming assets before losses deepen.
- Includes the token address, current loss percentage, and suggested reduction amount.
Set Alert
Monitor specific price levels for tokens in the portfolio.
- Includes the token address, target price, and alert direction (above/below).
Structured Action Parameters
Each suggestion includes machine-readable parameters so the frontend can pre-populate swap or LP forms:
- Token addresses (source and destination)
- Suggested amounts
- Pool APR data
- Estimated monthly earnings in USD
Rate Limiting
The Autopilot endpoint is rate limited to 5 requests per hour per user.
API
GET /api/autopilot/{wallet}
Returns the health score and list of suggestions for the specified wallet address.