[Devember 2021] [COMPLETE] A telegram bot that notifies you of congress critter stock trades

My idea is to make a telegram bot that you can connect to, and subscribe to get notifications when any, or specific, congress critters do a stock market trade.

It is written in Golang.

18 Likes

This is really cool. Looking forward to seeing this!

I have exp with golang and writing telegram bots. I can help if you want. legit wanting to see this become a thing haha

This is like, the proper way to react to level1 news :joy::rofl:

2 Likes

Thanks guys, I have created the repo with some initial code. Didn’t start the bot or test it yet, I’m not sure about the name, I’m sure we can do better.

Currently it can do /follow, /unfollow, /list or /findrep.

The datasource is from that website that lists the trades: https://housestockwatcher.com/

I find the rep by storing the unique reps in the database, since the user may not enter the full or correct name as included in the mega JSON file. So when you do /follow Nancy Pelosi it will auto select “Hon. Nancy Pelosi the 3rd” or whatever it is called in the disclosure JSON file.

I wanted to make it have the same command for tickers or critters but the only way I could think to do that was by seeing if the given topic was 5 chars or greater. So if you do /follow AAPL it will notify you whenever someone trades AAPL. But if you do /follow Nancy then it will think Nancy is a ticker.

Actually, using $AAPL will be the way won’t it!

1 Like

OK, now you can sub using the $ sign for a ticker. I might just create this bot anyway, it can be the working name.

this is amazing

You should make a channel on Telegram we can just follow for this.

You mean like a channel that just shows every transaction right? I did make a provision for that in the bot too (broadcast channel).

Yes that’s what I meant. So my lazy ass can just follow the channel for the juicy news?

Yea sweet. It may be a bit noisy in that channel, I’m not sure yet how many disclosures are done per day but I guess we’ll find out. I think i will also advertise in that channel the house stock watcher website every few days or once per week since the site is good for more in depth look at the trades etc.

2 Likes

Anyone think of a better name than politstonk ?

1 Like

Critter watch?

This is really cool

Instonk - as in insider trading, also “institution”, it also rolls easier off the tongue.

I think that’s the case not just phonologically, but because it sounds a lot like “in stock” which is something we all like to and indeed see and hear often.

Brains be associating.

And at least for me, the association with “poli” is actually to “poly”, as in “multi” rather than to politics.

You can have it, I promise not to sue.

LOL, even instonk.com is available, you should hurry up, I was almost tempted to buy it when I checked, but it is against my core principles to get involved in that kind of stuff.

I am only giving you the name because I loathe those a/b holes even more than profiteering off speculation and market manipulation.

Let’s hope some friendly community member doesn’t beat you to it.

1 Like

txs for information

You could add an extra i and call it politistonk. I think that’s kinda funny.

OK think I’m gonna go with the name, stonkcritter.

Got the broadcasting to a channel working OK, just gotta figure out why the bot isn’t responding to DMs.

Here’s a snippet:

image

The vomit means sell, the money eyes mean buy… more money bags means bigger purchase/sale

I’ve just noticed there is https://housestockwatcher.com/ and https://senatestockwatcher.com/ so probably gonna have to pull from both sources.

OK done a bit more work on it, fixed a lot of bugs, pushed updates to the repo. Made big updates to the readme.

I made it so both house and senate disclosures are gathered, but didn’t merge the disclosures cos I misunderstood json.Marshal (it replaced the entire pointer, doesn’t add extra stuff to an array object) [fixed now].

There is a few other bugs. it says its updated the cursor after it’s finished dispatching the trades, but it doesn’t, so when the bot restarts it goes back to the previous cursor and prints all the same ones again.

I added a clean channel to the github readme (Telegram: Contact @stonkcritter), right now it’s sending to Telegram: Contact @instonks (testing).

Also the fucking thing won’t reply to me in DMs… not sure why…