current earnings only:
totalWithFee = total − current × 0.1. Never display total × 0.9.
Signature
Parameters
Returns
Onchain earnings data with gross and net-of-fee totals by token and by chain.Return Type
All earnings values are decimal strings (e.g.
"421.315354"), not numbers. Parse them with parseFloat() or a BigNumber library when doing arithmetic.Fee model (short)
Example
Refresh flow
If GET returns no V2 snapshot, callcalculateOnchainEarnings first, then retry:
Notes
- Input is the smart wallet address — resolve from EOA via
getSmartWalletAddress/getSmartWalletByEOA - For portfolio balances net of the same pending fee, see getPortfolio
- Prefer calculateOnchainEarnings to refresh before reading if data is missing or stale