Skip to content

elizabethsiegle/stockbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This stock bot uses the Linklater API to make a Slack bot that returns stock info based on a given public company. The information is accessed from this Yahoo Finance API. It does not recognize "Google" or "Twilio", only the stock name of "Goog" or "Twlo" (or "twlo".) To run, clone the repo, stack build, stack exec stockbot, and then open up a Ngrok tunnel. You'll need a Slack incoming webhook, too, which you will copy the URL of and paste into your Slack app.

Slack steps:

  1. After going to your apps in the top righthand corner of https://api.slack.com, and selecting the bot you want (or creating a new one),select incoming webhooks to generate your web hook. Put this in a file called hook. webhook
  2. Right below that, you should this on the left-hand side. slashcommands

Select slash commands underneath features.

  1. Put your ngrok URL under Request URL, fill in some of the optional spots, and you're good to go! ngrokurl

You should end up with something like this: yqlresponse

If you pass it "facebook" and not "fb," you'd get a response like this: nonstockname

Try it out for yourself!