StarkFiStarkFi

Portfolio

Full DeFi dashboard with USD valuations

Prerequisite: Requires an active authenticated session. Run starkfi auth login first.

Usage

starkfi portfolio
starkfi portfolio --json

What 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 --json

Returns 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:

FlagDescriptionRequired
--target <allocation>Target allocation (e.g., "50 ETH, 30 USDC, 20 STRK")Yes
--slippage <number>Slippage tolerance % (default: 1)No
--simulatePreview plan without executingNo
--jsonOutput raw JSONNo

What It Does

  1. Analyzes your current portfolio allocation (token balances with USD values)
  2. Calculates the difference between current and target percentages
  3. Generates sell/buy trades to rebalance overweight → underweight tokens
  4. 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 --json

Tip: Use --simulate first to preview the plan before committing real funds.


MCP equivalent: Wallet Toolsget_portfolio, rebalance_portfolio

Edit on GitHub

Last updated on

On this page