mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-04 08:22:26 +00:00
Last stocks int (#2658)
* Added stocks/ins fixes * Fixed stocks/options * Fixes stock/scr
This commit is contained in:
@@ -1143,7 +1143,11 @@ def get_open_insider_link(preset_loaded: str) -> str:
|
||||
"""
|
||||
preset = configparser.RawConfigParser()
|
||||
preset.optionxform = str # type: ignore
|
||||
preset.read(get_preset_choices()[preset_loaded])
|
||||
choices = get_preset_choices()
|
||||
if preset_loaded not in choices:
|
||||
console.print("[red]Could not find the link[/red]\n")
|
||||
return ""
|
||||
preset.read(choices[preset_loaded])
|
||||
|
||||
d_general = dict(preset["General"])
|
||||
d_date = dict(preset["Date"])
|
||||
|
||||
@@ -1075,7 +1075,7 @@ class OptionsController(BaseController):
|
||||
"--x_axis",
|
||||
type=str,
|
||||
dest="x",
|
||||
default=None,
|
||||
default="s",
|
||||
choices=self.plot_vars_choices,
|
||||
help=(
|
||||
"ltd- last trade date, s- strike, lp- last price, b- bid, a- ask,"
|
||||
@@ -1087,7 +1087,7 @@ class OptionsController(BaseController):
|
||||
"--y_axis",
|
||||
type=str,
|
||||
dest="y",
|
||||
default=None,
|
||||
default="y",
|
||||
choices=self.plot_vars_choices,
|
||||
help=(
|
||||
"ltd- last trade date, s- strike, lp- last price, b- bid, a- ask,"
|
||||
|
||||
@@ -179,7 +179,10 @@ def get_screener_output(preset: str) -> Tuple[pd.DataFrame, str]:
|
||||
|
||||
preset_filter = configparser.RawConfigParser()
|
||||
preset_filter.optionxform = str # type: ignore
|
||||
preset_filter.read(get_preset_choices()[preset])
|
||||
choices = get_preset_choices()
|
||||
if preset not in choices:
|
||||
return pd.DataFrame(), "No data found"
|
||||
preset_filter.read(choices[preset])
|
||||
|
||||
d_filters = {k: v for k, v in dict(preset_filter["FILTER"]).items() if v}
|
||||
s_filters = str(d_filters)
|
||||
|
||||
@@ -696,6 +696,12 @@ def plot_plot(
|
||||
x = "strike"
|
||||
y = "impliedVolatility"
|
||||
else:
|
||||
if x is None:
|
||||
console.print("[red]Invalid option sent for x-axis[/red]\n")
|
||||
return
|
||||
if y is None:
|
||||
console.print("[red]Invalid option sent for y-axis[/red]\n")
|
||||
return
|
||||
x = convert[x]
|
||||
y = convert[y]
|
||||
varis = op_helpers.opt_chain_cols
|
||||
|
||||
@@ -167,8 +167,9 @@ class ScreenerController(BaseController):
|
||||
if other_args and "-" not in other_args[0][0]:
|
||||
other_args.insert(0, "-p")
|
||||
ns_parser = self.parse_known_args_and_warn(parser, other_args)
|
||||
screener_view.display_presets(ns_parser.preset)
|
||||
console.print("")
|
||||
if ns_parser:
|
||||
screener_view.display_presets(ns_parser.preset)
|
||||
console.print("")
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def call_set(self, other_args: List[str]):
|
||||
|
||||
Reference in New Issue
Block a user