Portfolio
Full DeFi dashboard with USD valuations
Prerequisite: Requires an active authenticated session. Run
starkfi auth loginfirst.
Usage
starkfi portfolio
starkfi portfolio --jsonWhat It Shows
The portfolio command aggregates your complete DeFi state into a single dashboard view.
Token Balances
All tokens with non-zero balances, each with USD value calculated via StarkZap pricing.
Staking Positions
For each validator pool:
- Staked amount and USD value
- Pending rewards
- Unpooling status with cooldown end date (shown when an exit intent is active)
Lending Positions
For each Vesu V2 pool:
- Collateral value
- Debt value
- Health factor and risk level
DCA Orders
Lists all active Dollar-Cost Averaging orders:
- Order ID and on-chain address
- Provider (Avnu, Ekubo)
- Swap status, frequency, and executed cycles count
Confidential Tongo Balance
Shows privacy-focused Tongo Cash metrics:
- Private Tongo Account Address
- Active spendable balance
- Pending balance (awaiting rollover)
Total Portfolio Value
Sum of all token balances, staked amounts, and collateral in USD.
JSON Output
For programmatic use, piping to other tools, or AI agent parsing:
starkfi portfolio --jsonReturns structured data with all balances, positions, and USD valuations.
portfolio-rebalance
Rebalances your portfolio to a target allocation by executing batch swaps via Fibrous DEX aggregator.
starkfi portfolio-rebalance --target "<allocation>"Target allocations are expressed as percentages per token — they must sum to 100:
starkfi portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK"Flags:
| Flag | Description | Required |
|---|---|---|
--target <allocation> | Target allocation (e.g., "50 ETH, 30 USDC, 20 STRK") | Yes |
--slippage <number> | Slippage tolerance % (default: 1) | No |
--simulate | Preview plan without executing | No |
--json | Output raw JSON | No |
What It Does
- Analyzes your current portfolio allocation (token balances with USD values)
- Calculates the difference between current and target percentages
- Generates sell/buy trades to rebalance overweight → underweight tokens
- Executes all swaps in a single atomic batch transaction via
TxBuilder
Output
Shows current allocation, target allocation, and required trades with USD amounts:
- Current Allocation — each token's current percentage and USD value
- Target Allocation — desired percentages
- Trades — sell/buy actions with token, amount, and estimated USD value
Examples:
starkfi portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK"
starkfi portfolio-rebalance --target "60 ETH, 40 STRK" --simulate
starkfi portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK" --slippage 2 --jsonTip: Use
--simulatefirst to preview the plan before committing real funds.
MCP equivalent: Wallet Tools —
get_portfolio,rebalance_portfolio
Last updated on