mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-18 15:22:13 +00:00
Options Menu Symbol Label Fixes (#3735)
* Options Menu Symbol Label Fixes * adding back in tests txt files * merge and fix test Co-authored-by: james <jmaslek11@gmail.com>
This commit is contained in:
@@ -26,7 +26,10 @@ def print_options_data(symbol: str, export: str = ""):
|
||||
data = barchart_model.get_options_info(symbol)
|
||||
|
||||
print_rich_table(
|
||||
data, show_index=False, headers=["Info", "Value"], title="Options Information"
|
||||
data,
|
||||
show_index=False,
|
||||
headers=["Info", "Value"],
|
||||
title=f"{symbol} Options Information",
|
||||
)
|
||||
|
||||
export_data(export, os.path.dirname(os.path.abspath(__file__)), "info", data)
|
||||
|
||||
@@ -236,7 +236,10 @@ def display_chains(
|
||||
for col in chain_table.columns
|
||||
]
|
||||
print_rich_table(
|
||||
chain_table, headers=headers, show_index=False, title="Option chain"
|
||||
chain_table,
|
||||
headers=headers,
|
||||
show_index=False,
|
||||
title=f"{symbol} Option chain for {expiry}",
|
||||
)
|
||||
|
||||
export_data(
|
||||
|
||||
@@ -127,7 +127,7 @@ def display_chains(
|
||||
title = "Call " if calls_only else "Put "
|
||||
print_rich_table(
|
||||
option_chains,
|
||||
title=title + "Option Chain (15 min delayed) (Greeks calculated by OpenBB)",
|
||||
title=f"{symbol} {title} Option Chain\nYahoo (15 min delayed)",
|
||||
floatfmt=[
|
||||
".2f",
|
||||
".2f",
|
||||
@@ -223,9 +223,10 @@ def display_chains(
|
||||
|
||||
print_rich_table(
|
||||
option_chains,
|
||||
title=f"Yahoo Option Chain (15 min delayed) for {expiry} (Greeks calculated by OpenBB)",
|
||||
title=f"{symbol} Option Chain for {expiry}\nYahoo (15 min delayed)",
|
||||
headers=[header_fmt(x) for x in option_chains.columns],
|
||||
)
|
||||
console.print("Greeks calculated by OpenBB")
|
||||
export_data(
|
||||
export,
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
@@ -889,7 +890,10 @@ def show_parity(
|
||||
show,
|
||||
headers=[x.title() for x in show.columns],
|
||||
show_index=False,
|
||||
title="Warning: Low volume options may be difficult to trade.",
|
||||
title=f"{symbol} Parity",
|
||||
)
|
||||
console.print(
|
||||
"[yellow]Warning: Low volume options may be difficult to trade.[/yellow]"
|
||||
)
|
||||
|
||||
export_data(
|
||||
@@ -1236,7 +1240,7 @@ def show_greeks(
|
||||
df,
|
||||
headers=list(df.columns),
|
||||
show_index=False,
|
||||
title="Greeks",
|
||||
title=f"{symbol} Greeks",
|
||||
floatfmt=column_formatting,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user