Пример #1
0
    async def vsurf(
        self,
        inter: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        z: str = commands.Param(
            choices=["Volatility", "Open Interest", "Last Price"]),
    ):
        """Display Volatility Surface

        Parameters
        ----------
        ticker: Stock Ticker
        z: The variable for the Z axis
        """
        await inter.response.defer()
        logger.info("opt-vsurf")

        if z == "Volatility":
            z = "IV"
        if z == "Open Interest":
            z = "OI"
        if z == "Last Price":
            z = "LP"

        await vsurf_command(inter, ticker, z)
Пример #2
0
    async def kc(
        self,
        ctx: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        length="20",
        scalar="2",
        ma_mode: str = commands.Param(
            choices=["ema", "sma", "wma", "hma", "zlma"]),
        offset="0",
        start="",
        end="",
    ):
        """Displays chart with keltner channel [Yahoo Finance]

        Parameters
        -----------
        ticker: Stock Ticker
        length: length. Default: 20
        scalar: scalar. Default: 2
        ma_mode: mode of moving average.
        offset: offset value. Default: 0
        start: YYYY-MM-DD format
        end: YYYY-MM-DD format
        """
        await ctx.response.defer()
        logger.info("ta-kc")
        ma_mode = str(ma_mode)
        await kc_command(ctx, ticker, length, scalar, ma_mode, offset, start,
                         end)
Пример #3
0
    async def pos(
            self,
            ctx: disnake.AppCmdInter,
            sort: str = commands.Param(choices=pos_choices),
            num: int = 10,
    ):
        """Dark pool short position [Stockgrid]

        Parameters
        -----------
        sort: Field for which to sort.
        num: Number of top tickers to show
        """
        await ctx.response.defer()
        logger.info("dps-pos")

        if str(sort) == "Short Vol (1M)":
            sort = "sv"
        if str(sort) == "Short Vol %":
            sort = "sv_pct"
        if str(sort) == "Net Short Vol (1M)":
            sort = "nsv"
        if str(sort) == "Net Short Vol ($100M)":
            sort = "nsv_dollar"
        if str(sort) == "DP Position (1M)":
            sort = "dpp"
        if str(sort) == "DP Position ($1B)":
            sort = "dpp_dollar"

        await pos_command(ctx, sort, num)
Пример #4
0
    async def bbands(
        self,
        ctx: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        length="5",
        std="2",
        ma_mode: str = commands.Param(
            choices=["ema", "sma", "wma", "hma", "zlma"]),
        start="",
        end="",
    ):
        """Displays chart with bollinger bands [Yahoo Finance]

        Parameters
        -----------
        ticker: Stock Ticker
        length: length. Default: 5
        std: standard deviation. Default: 2
        ma_mode: mode of moving average.
        start: YYYY-MM-DD format
        end: YYYY-MM-DD format
        """
        await ctx.response.defer()
        logger.info("ta-bbands")
        ma_mode = str(ma_mode)
        await bbands_command(ctx, ticker, length, std, ma_mode, start, end)
Пример #5
0
    async def feargreed(self,
                        ctx: disnake.AppCmdInter,
                        indicator: str = commands.Param(choices=fgind)):
        """CNN Fear and Greed Index [CNN]

        Parameters
        ----------
        indicator: Select an Indicator
        """
        await ctx.response.defer()
        logger.info("econ-feargreed")
        if indicator == "Junk Bond Demand":
            indicator = "jbd"
        if indicator == "Market Volatility":
            indicator = "mv"
        if indicator == "Put and Call Options":
            indicator = "pco"
        if indicator == "Market Momentum":
            indicator = "mm"
        if indicator == "Stock Price Strength":
            indicator = "sps"
        if indicator == "Stock Price Breadth":
            indicator = "spb"
        if indicator == "Safe Heaven Demand":
            indicator = "shd"
        await feargreed_command(ctx, indicator)
Пример #6
0
    async def sidtc(
        self,
        ctx: disnake.AppCmdInter,
        sort: str = commands.Param(
            choices=["Float Short %", "Days to Cover", "Short Interest"]),
        num: int = 10,
    ):
        """Short interest and days to cover [Stockgrid]

        Parameters
        -----------
        sort: Field for which to sort. Possible are: `float`, `dtc`, `si`.
        num: Number of top tickers to show
        """
        await ctx.response.defer()
        logger.info("dps-sidtc")

        if str(sort) == "Float Short %":
            sort = "float"
        if str(sort) == "Days to Cover":
            sort = "dtc"
        if str(sort) == "Short Interest":
            sort = "si"

        await sidtc_command(ctx, sort, num)
Пример #7
0
    async def history(
        self,
        inter: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        expiry: str = commands.Param(autocomplete=expiry_autocomp),
        strike: float = commands.Param(),
        opt_type: str = commands.Param(choices=["Calls", "Puts"]),
        greek: str = commands.Param(
            default="",
            choices=[
                "iv",
                "gamma",
                "delta",
                "theta",
                "rho",
                "vega",
            ],
        ),
    ):
        """Options Price History

        Parameters
        ----------
        ticker: Stock Ticker
        expiry: Expiration Date
        strike: Options Strike Price
        type: Calls or Puts
        greek: Greek variable to plot
        """
        await inter.response.defer()
        logger.info("opt-hist")
        await hist_command(inter, ticker, expiry, strike, opt_type, greek)
Пример #8
0
    async def shorted(self, ctx: disnake.AppCmdInter, num: int = 10):
        """Show most shorted stocks [Yahoo Finance]

        Parameters
        -----------
        num: Number of the most shorted stocks to retrieve
        """
        await ctx.response.defer()
        logger.info("dps-shorted")
        await shorted_command(ctx, num)
Пример #9
0
    async def hsi(self, ctx: disnake.AppCmdInter, num: int = 10):
        """Show top high short interest stocks of over 20% ratio [shortinterest.com]

        Parameters
        -----------
        num: Number of top stocks to print
        """
        await ctx.response.defer()
        logger.info("dps-hsi")
        await hsi_command(ctx, num)
Пример #10
0
    async def ford(self, inter: disnake.AppCmdInter):
        """Display Orders by Fidelity Customers. [Fidelity]

        Parameters
        -----------
        num: Number of stocks to display
        """
        await inter.response.defer()
        logger.info("disc-ford")
        await ford_command(inter)
Пример #11
0
    async def lastcontracts(
        self, ctx: disnake.AppCmdInter, past_transactions_days: int = 2, num: int = 20
    ):
        """Displays last government contracts [quiverquant.com]

        Parameters
        -----------
        past_transactions_days: Positive number of past transaction days
        num: Number of contracts
        """
        await ctx.response.defer()
        logger.info("gov-lastcontracts")
        await lastcontracts_command(ctx, past_transactions_days, num)
Пример #12
0
    async def sec(
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays sec filings [Market Watch]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dd-sec")
        await sec_command(ctx, ticker)
Пример #13
0
    async def est(
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays earning estimates [Business Insider]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dd-est")
        await est_command(ctx, ticker)
Пример #14
0
    async def analyst(
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays analyst recommendations [Finviz]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dd-analyst")
        await analyst_command(ctx, ticker)
Пример #15
0
    async def customer(
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays customers of the company [CSIMarket]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dd-customer")
        await customer_command(ctx, ticker)
Пример #16
0
    async def toplobbying(
        self, ctx: disnake.AppCmdInter, num: int = 10, raw: bool = False
    ):
        """Displays top lobbying firms [quiverquant.com]

        Parameters
        -----------
        num: Number to show
        raw: If raw data should be outputted
        """
        await ctx.response.defer()
        logger.info("gov-toplobbying")
        await toplobbying_command(ctx, num, raw)
Пример #17
0
    async def recom(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays text of a given stocks recommendation based on ta [Tradingview API]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("ta-recom")
        await recom_command(ctx, ticker)
Пример #18
0
    async def iv(
            self,
            inter: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays ticker options IV [Barchart]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await inter.response.defer()
        logger.info("opt-iv")
        await iv_command(inter, ticker)
Пример #19
0
    async def performance(
            self,
            ctx: disnake.AppCmdInter,
            economy_group: str = commands.Param(choices=group),
    ):
        """Performance of sectors, industry, country [Finviz]

        Parameters
        -----------
        economy_group: Economy Group
        """
        await ctx.response.defer()
        logger.info("econ-performance")
        await performance_command(ctx, economy_group)
Пример #20
0
    async def histcont(
        self,
        ctx: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays historical quarterly-contracts [quiverquant.com]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("gov-histcont")
        await histcont_command(ctx, ticker)
Пример #21
0
    async def psi(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Price vs short interest volume [Stockgrid]

        Parameters
        ----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dps-psi")
        await psi_command(ctx, ticker)
Пример #22
0
    async def spos(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Net short vs position [Stockgrid]

        Parameters
        ----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dps-spos")
        await spos_command(ctx, ticker)
Пример #23
0
    async def dpotc(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Dark pools (ATS) vs OTC data [FINRA]

        Parameters
        ----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("dps-dpotc")
        await dpotc_command(ctx, ticker)
Пример #24
0
    async def valuation(
            self,
            ctx: disnake.AppCmdInter,
            economy_group: str = commands.Param(choices=group),
    ):
        """Valuation of sectors, industry, country [Finviz]

        Parameters
        -----------
        economy_group: Economy Group
        """
        await ctx.response.defer()
        logger.info("econ-valuation")
        await valuation_command(ctx, economy_group)
Пример #25
0
    async def summary(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays text of a given stocks ta summary [FinBrain API]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("ta-summary")
        await summary_command(ctx, ticker)
Пример #26
0
    async def view(
            self,
            ctx: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
    ):
        """Displays image from Finviz [Finviz]

        Parameters
        -----------
        ticker: Stock Ticker
        """
        await ctx.response.defer()
        logger.info("ta-view")
        await view_command(ctx, ticker)
Пример #27
0
    async def arktrades(
        ctx: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        num: int = 10,
    ):
        """Displays trades made by ark [cathiesark.com]

        Parameters
        -----------
        ticker: Stock Ticker
        num: number of rows displayed
        """
        await ctx.response.defer()
        logger.info("dd-arktrades")
        await arktrades_command(ctx, ticker, num)
Пример #28
0
    async def lobbying(
        self,
        ctx: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        num: int = 10,
    ):
        """Displays lobbying details [quiverquant.com]

        Parameters
        -----------
        ticker: Stock Ticker
        num: Number of events
        """
        await ctx.response.defer()
        logger.info("gov-lobbying")
        await lobbying_command(ctx, ticker, num)
Пример #29
0
    async def lins(
        self,
        inter: disnake.AppCmdInter,
        ticker: str = commands.Param(autocomplete=ticker_autocomp),
        num: int = 10,
    ):
        """Display insider activity for a given stock ticker. [Source: Finviz]

        Parameters
        ----------
        ticker : Stock Ticker
        num : Number of latest insider activity to display
        """
        await inter.response.defer()
        logger.info("ins-last")
        await lins_command(inter, ticker, num)
Пример #30
0
    async def volume(
            self,
            inter: disnake.AppCmdInter,
            ticker: str = commands.Param(autocomplete=ticker_autocomp),
            expiry: str = commands.Param(autocomplete=expiry_autocomp),
    ):
        """Options Volume

        Parameters
        ----------
        ticker: Stock Ticker
        expiry: Expiration Date
        """
        await inter.response.defer()
        logger.info("opt-vol")
        await vol_command(inter, ticker, expiry)