Comparison
Allocation vs Rebalance
Both endpoints are about portfolio positioning, but they answer different questions. Allocation asks: what should I hold? Rebalance asks: how do I get from what I hold now to where I should be?
Allocation
Async · POST /agent/x402/allocate
Generates a target portfolio allocation from scratch. You do not need existing holdings. You provide your risk tolerance and timeframe, and Selun returns the weights you should target.
- Use when you are starting a new allocation
- Use when you want a fresh target regardless of current holdings
- Runs regime, policy, and scoring internally
- Returns target weights per asset
- Asynchronous — poll statusPath for result
Rebalance
Sync · POST /agent/x402/rebalance
Takes your current holdings and computes the gap between what you hold and the optimal target for your profile under current conditions. Returns the adjustments needed.
- Use when you already have holdings and want to maintain policy alignment
- Use on a schedule (daily, weekly) for drift monitoring
- Requires current holdings as input
- Returns drift per asset + trade instructions
- Synchronous — returns immediately
The typical workflow
Most portfolio workflows use Allocation first, then Rebalance on an ongoing basis.
Initial allocation
Call the Allocation endpoint with your risk profile. Get back target weights. Deploy the portfolio according to those weights.
Ongoing rebalancing
Over time, asset prices drift and the portfolio moves away from the target allocation. Call Rebalance periodically with your current holdings to get the adjustments needed to stay within policy.
Regime-triggered re-allocation
When market conditions shift significantly — a volatility spike, a sentiment reversal — run a fresh Allocation to update the target. Then use Rebalance to compute the path from current holdings to the new target.
Key input difference
The Rebalance endpoint requires your current holdings. Without them, it cannot compute drift. If you do not have holdings to submit, use Allocation instead.