mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
* First commit * Renamed to bot * change from discordbot to bots imports * refractor cmds + autocomplete helpers + updated dps plots/candle + quote cmd * isort fix * Update helpers.py * Added first refactor * Added commands and refactor * Added description handler * Through grains * ta + image border helper * Added indices * merged * Finished econ * options refactor * dark_pool_shorts, candle, quote done * pagination/dropdown logic to helpers + fixes * dd/disc/insider done + add image logic to helpers * linting * removed plt style * Almost done with Gov * fixing conflicts * Finished gov (excpect ones mentioned) * screener done * Test bug refactor * Store changes to switch * Finished refactor * Fixed error * Delete ::40 * Fixed issue * Fixed black * finished * fixes Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
34 lines
887 B
Python
34 lines
887 B
Python
import bots.config_discordbot as cfg
|
|
from bots.config_discordbot import logger
|
|
from gamestonk_terminal.stocks.due_diligence import marketwatch_model
|
|
|
|
|
|
def sec_command(ticker=""):
|
|
"""Displays sec filings [Market Watch]"""
|
|
|
|
# Debug user input
|
|
if cfg.DEBUG:
|
|
logger.debug("dd-sec %s", ticker)
|
|
|
|
if ticker == "":
|
|
raise Exception("A ticker is required")
|
|
|
|
df_financials = marketwatch_model.get_sec_filings(ticker)
|
|
|
|
if df_financials.empty:
|
|
raise Exception("Enter a valid ticker")
|
|
|
|
# Debug user output
|
|
if cfg.DEBUG:
|
|
logger.debug(df_financials.to_string())
|
|
|
|
df = df_financials
|
|
df.loc[:, "Link"] = "[Link Source](" + df.loc[:, "Link"].astype(str)
|
|
df.loc[:, "Link"] = df.loc[:, "Link"] + ")"
|
|
|
|
# Output data
|
|
return {
|
|
"title": "Stocks: [Market Watch] SEC Filings",
|
|
"description": df.to_string(),
|
|
}
|