How to Build Free Stock Market Discord Alerts (Webhooks)


  • Create the webhook
  • Connect to the webhook with python
  • Build your algorithm
  • Send alerts into your server

Create the webhook

Connect to the webhook with python

At the bottom of your file, add“webhook_URL”) with the webhook URL you copied from the previous step inside quotations.

Now you are ready to build the loop that runs your algorithm, and sends alerts into the channel. Right click your channel in discord, and copy the channel ID to use in this next step.

This function will start a loop that runs infinitely and connects into a channel. The seconds variable is the pause time in-between each loop, and the client.get_channel is where you paste the numerical ID of the channel ID you just copied. Inside this main loop, you can make calls to the Styvio API to receive a list of all the supported tickers, then loop through it receive data for each stock.

Building your algorithm and sending alerts

This loop shows some code that we used to create our first iteration bot, that loops through every single stock with a 2 second delay, and alerts both discord and twitter if the RSI is low and the SMA just crossed over to positive. It also uses matplotlib to add a yearly chart of the stock with the discord message and tweet.

That is the overall process. At the end, I added some error checking but that goes over the entire logic of how to setup a custom discord alert system for stocks that meet your criteria. Get free access to the styvio API here. is the top stock market research dashboard & API. Trending stocks, social sentiment, and open source ai