StarkFiStarkFi

Wallet Tools

get_balance, send_tokens, deploy_account, get_portfolio, get_tx_status, rebalance_portfolio

Prerequisite: All wallet tools require an active authenticated session. Call get_auth_status first to verify.

get_balance

Get token balances for the authenticated wallet.

ParamTypeRequiredDescription
tokenstringNoSpecific token symbol (e.g., STRK, ETH, USDC)

Omit token to fetch all non-zero balances. Specify a symbol to check a single token.

This is a read-only tool — safe to call without user confirmation.


send_tokens

Transfer tokens to a recipient address. Pre-checks balance before executing.

ParamTypeRequiredDescription
amountstringYesAmount to send (e.g., 10, 0.5)
tokenstringYesToken symbol (e.g., STRK, ETH, USDC)
recipientstringYesRecipient Starknet address (0x...)
simulatebooleanNoSet true to estimate fees without sending

Important: This is a transactional tool. Always confirm with the user before executing. Set simulate: true first to preview the estimated fee.


deploy_account

Deploy the smart contract wallet on-chain. Required once before sending any transaction from a new wallet.

Parameters: None

Safe to call multiple times — returns the current status if already deployed. The wallet is automatically deployed when needed by other transaction tools, but calling this explicitly gives the user visibility.


get_portfolio

Get a comprehensive DeFi dashboard: all token balances with USD values, staking positions, lending positions, active DCA orders, and confidential Tongo balances in one call.

Parameters: None

This is a read-only tool — safe to call without user confirmation.


get_tx_status

Check the on-chain status of a transaction by its hash.

ParamTypeRequiredDescription
hashstringYesTransaction hash (0x...)

Returns the current status (pending, accepted, rejected), actual fee, block number, and explorer link. Useful for verifying transactions after execution.


rebalance_portfolio

Rebalance the portfolio to a target allocation by executing batch swaps. Calculates the optimal trades to move from current allocations to target percentages.

ParamTypeRequiredDescription
targetstringYesTarget allocation (e.g., "50 ETH, 30 USDC, 20 STRK")
slippagenumberNoSlippage tolerance % (default: 1)
simulatebooleanNoSet true to preview plan without executing

Important: This is a transactional tool. Always confirm with the user and use simulate: true first to preview the rebalance plan.

Returns: current allocations, target allocations, trades to execute, and transaction hash (or simulation results).


CLI equivalent: Wallet Commands and Portfolio Commands

Edit on GitHub

Last updated on

On this page