Skip to content

Commit 66378cc

Browse files
committed
commit
1 parent 39bd689 commit 66378cc

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cmd/ibctl/internal/command/holding/coveredcall/coveredcalllist/coveredcalllist.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ USD-denominated equities are eligible.
4646
4747
PROVIDERS
4848
49-
Configure market_data_providers in ibctl.yaml to set the options data source:
49+
Configure options_data_providers in ibctl.yaml to set the options data source:
5050
- marketdata_app: Data with greeks (delta, theta). Requires
5151
MARKETDATA_APP_TOKEN environment variable.
5252
- polygon: Data with greeks (delta, theta). Unlimited API calls. Requires
@@ -158,7 +158,7 @@ func run(ctx context.Context, container appext.Container, flags *flags) error {
158158
}
159159
// Resolve the options data provider from the configured preference list.
160160
// Resolve the options data provider using the app container's env lookup.
161-
provider, err := ibctloptions.ResolveProvider(config.MarketDataProviders, container.Env)
161+
provider, err := ibctloptions.ResolveProvider(config.OptionsDataProviders, container.Env)
162162
if err != nil {
163163
return err
164164
}

internal/ibctl/ibctlconfig/ibctlconfig.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ type ExternalConfigV1 struct {
9595
// InterestRates maps currency codes to annual interest rates on cash balances.
9696
// Used by projected-income to estimate cash interest income (e.g., {"USD": 0.0312}).
9797
InterestRates map[string]float64 `yaml:"interest_rates"`
98-
// MarketDataProviders is an ordered list of options data providers for covered call screening.
98+
// OptionsDataProviders is an ordered list of options data providers for covered call screening.
9999
// Valid values: "marketdata_app" (requires MARKETDATA_APP_TOKEN env var),
100100
// "polygon" (requires POLYGON_TOKEN env var), "yahoo" (free, no greeks).
101101
// Default: ["yahoo"].
102-
MarketDataProviders []string `yaml:"market_data_providers"`
102+
OptionsDataProviders []string `yaml:"options_data_providers"`
103103
}
104104

105105
// ExternalTaxConfigV1 holds capital gains tax rate configuration.
@@ -185,9 +185,9 @@ type Config struct {
185185
TaxRateInterest float64
186186
// CashInterestRates maps currency codes to annual interest rates on cash balances.
187187
CashInterestRates map[string]float64
188-
// MarketDataProviders is the ordered list of options data providers for covered call screening.
188+
// OptionsDataProviders is the ordered list of options data providers for covered call screening.
189189
// Valid values: "marketdata_app", "polygon", "yahoo". Default: ["yahoo"].
190-
MarketDataProviders []string
190+
OptionsDataProviders []string
191191
}
192192

193193
// SymbolConfig holds classification metadata for a symbol.
@@ -303,7 +303,7 @@ func NewConfigV1(externalConfig ExternalConfigV1, dirPath string) (*Config, erro
303303
cashInterestRates = make(map[string]float64)
304304
}
305305
// Parse and validate market data providers, defaulting to ["yahoo"] if not configured.
306-
marketDataProviders := externalConfig.MarketDataProviders
306+
marketDataProviders := externalConfig.OptionsDataProviders
307307
if len(marketDataProviders) == 0 {
308308
marketDataProviders = []string{"yahoo"}
309309
}
@@ -312,7 +312,7 @@ func NewConfigV1(externalConfig ExternalConfigV1, dirPath string) (*Config, erro
312312
case "marketdata_app", "polygon", "yahoo":
313313
// Valid provider name.
314314
default:
315-
return nil, fmt.Errorf("invalid market_data_providers value %q, must be \"marketdata_app\", \"polygon\", or \"yahoo\"", providerName)
315+
return nil, fmt.Errorf("invalid options_data_providers value %q, must be \"marketdata_app\", \"polygon\", or \"yahoo\"", providerName)
316316
}
317317
}
318318
return &Config{
@@ -330,7 +330,7 @@ func NewConfigV1(externalConfig ExternalConfigV1, dirPath string) (*Config, erro
330330
AdditionLastPrices: additionLastPrices,
331331
RealtimeSymbols: realtimeSymbols,
332332
CashInterestRates: cashInterestRates,
333-
MarketDataProviders: marketDataProviders,
333+
OptionsDataProviders: marketDataProviders,
334334
}, nil
335335
}
336336

internal/ibctl/ibctloptions/ibctloptions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// All rights reserved.
44

55
// Package ibctloptions resolves an optionsdata.Provider from the configured
6-
// market_data_providers list in ibctl.yaml. Providers are tried in order;
6+
// options_data_providers list in ibctl.yaml. Providers are tried in order;
77
// the first matching provider is returned. If a provider requires credentials
88
// (e.g., MARKETDATA_APP_TOKEN, POLYGON_TOKEN) and they are not set, an error
99
// is returned.
@@ -43,14 +43,14 @@ func ResolveProvider(providerNames []string, envFunc EnvFunc) (optionsdata.Provi
4343
// MARKETDATA_APP_TOKEN is required when marketdata_app is configured.
4444
token := envFunc(marketdataAppTokenEnvVar)
4545
if token == "" {
46-
return nil, errors.New(marketdataAppTokenEnvVar + " environment variable is required when marketdata_app is configured in market_data_providers")
46+
return nil, errors.New(marketdataAppTokenEnvVar + " environment variable is required when marketdata_app is configured in options_data_providers")
4747
}
4848
return marketdataapp.NewProvider(token), nil
4949
case "polygon":
5050
// POLYGON_TOKEN is required when polygon is configured.
5151
token := envFunc(polygonTokenEnvVar)
5252
if token == "" {
53-
return nil, errors.New(polygonTokenEnvVar + " environment variable is required when polygon is configured in market_data_providers")
53+
return nil, errors.New(polygonTokenEnvVar + " environment variable is required when polygon is configured in options_data_providers")
5454
}
5555
return polygon.NewProvider(token), nil
5656
case "yahoo":

0 commit comments

Comments
 (0)