@@ -29,6 +29,8 @@ const (
2929 baseCurrencyFlagName = "base-currency"
3030 // realtimeFlagName is the flag name for fetching real-time quotes and FX rates.
3131 realtimeFlagName = "realtime"
32+ // excludeSymbolFlagName is the shared flag name for excluding symbols from output.
33+ excludeSymbolFlagName = ibctlcmd .ExcludeSymbolFlagName
3234)
3335
3436// NewCommand returns a new geo list command.
@@ -71,6 +73,8 @@ type flags struct {
7173 BaseCurrency string
7274 // Realtime fetches real-time quotes and FX rates from Yahoo Finance.
7375 Realtime bool
76+ // ExcludeSymbols excludes these symbols from all computations and output.
77+ ExcludeSymbols []string
7478}
7579
7680func newFlags () * flags {
@@ -84,6 +88,7 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) {
8488 flagSet .StringVar (& f .Category , categoryFlagName , "" , "Filter by category (e.g., EQUITY, FIXED_INCOME)" )
8589 flagSet .StringVar (& f .BaseCurrency , baseCurrencyFlagName , "USD" , "Base currency for value conversion (e.g., USD, CAD)" )
8690 flagSet .BoolVar (& f .Realtime , realtimeFlagName , false , "Fetch real-time quotes and FX rates from Yahoo Finance" )
91+ flagSet .StringSliceVar (& f .ExcludeSymbols , excludeSymbolFlagName , nil , "Exclude symbol from all computations and output (repeatable)" )
8792}
8893
8994func run (ctx context.Context , container appext.Container , flags * flags ) error {
@@ -92,7 +97,7 @@ func run(ctx context.Context, container appext.Container, flags *flags) error {
9297 return appcmd .NewInvalidArgumentError (err .Error ())
9398 }
9499 // Load data through the common pipeline (config, merge, FX, optional download/realtime).
95- data , err := ibctlcmd .LoadHoldingsData (ctx , container , flags .Download , flags .Realtime , flags .BaseCurrency )
100+ data , err := ibctlcmd .LoadHoldingsData (ctx , container , flags .Download , flags .Realtime , flags .BaseCurrency , flags . ExcludeSymbols )
96101 if err != nil {
97102 return err
98103 }
0 commit comments