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:
- 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.
- Right below that, you should this on the left-hand side.
Select slash commands underneath features.
You should end up with something like this:
If you pass it "facebook" and not "fb," you'd get a response like this:
Try it out for yourself!