From 02424c87d2bb75e939c2c002ad0f87a568f4dd36 Mon Sep 17 00:00:00 2001 From: Ivan Pusic <450140+ivpusic@users.noreply.github.com> Date: Mon, 20 Apr 2026 08:41:39 +0200 Subject: [PATCH] Add --exclude-unpriced flag to sim evm balances (GRO-229) Default is true so unpriced tokens are filtered out by default; pass --exclude-unpriced=false to include them. Flag is shared with 'sim evm stablecoins' via addBalanceFlags. --- cmd/sim/evm/balances.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/sim/evm/balances.go b/cmd/sim/evm/balances.go index 5eebee6..8857107 100644 --- a/cmd/sim/evm/balances.go +++ b/cmd/sim/evm/balances.go @@ -116,6 +116,7 @@ func addBalanceFlags(cmd *cobra.Command) { cmd.Flags().String("filters", "", "Filter by token standard: 'erc20' (only ERC20 tokens) or 'native' (only native chain assets like ETH)") cmd.Flags().String("metadata", "", "Request additional metadata fields in the response (comma-separated): 'logo' (token icon URL), 'url' (project website), 'pools' (liquidity pool details)") cmd.Flags().Bool("exclude-spam", false, "Exclude low-liquidity tokens (less than $100 USD pool size) commonly associated with spam airdrops") + cmd.Flags().Bool("exclude-unpriced", true, "Exclude tokens without a USD price (default: true); pass --exclude-unpriced=false to include them") cmd.Flags().String("historical-prices", "", "Include historical USD prices at the specified hour offsets from now (comma-separated, e.g. '720,168,24' for 30d, 7d, 1d ago)") cmd.Flags().Int("limit", 0, "Maximum number of balance entries to return per page (1-1000, default: server-determined)") cmd.Flags().String("offset", "", "Pagination cursor returned as next_offset in a previous response; use to fetch the next page of results") @@ -155,6 +156,11 @@ func runBalancesEndpoint(cmd *cobra.Command, args []string, pathPrefix, pathSuff if v, _ := cmd.Flags().GetBool("exclude-spam"); v { params.Set("exclude_spam_tokens", "true") } + if v, _ := cmd.Flags().GetBool("exclude-unpriced"); v { + params.Set("exclude_unpriced", "true") + } else { + params.Set("exclude_unpriced", "false") + } if v, _ := cmd.Flags().GetString("historical-prices"); v != "" { params.Set("historical_prices", v) }