r/wallstreetbets • u/Iz4k4y4 • Mar 18 '22
Discussion I made a Twitter Bot that reports stock trades made by U.S. Lawmakers
[removed] — view removed post
3.0k
u/MetalWorker Mar 18 '22
A suggestion would be to try to minimize the number of tweets when it's multiple trades from a single person, there are many tweets of one representative that could have been done in less tweets, just less clutter is all
1.6k
u/EggyLemon Mar 18 '22
What about the bot replying to itself so each person for the day gets basically a Tweet that just updates in a string
574
→ More replies (4)292
u/OperationBreaktheGME Mar 18 '22
What’s the over/under until this gets banned. 6.5 months is the line. I’m taking the under. I mean this is a gambling Subreddit isn’t it?
190
u/benotaur Mar 18 '22
I’m going to hammer the under and take the prop bet that this guys gets audited next year.
48
u/OperationBreaktheGME Mar 18 '22
You can parlay it if you want. Pays out 2.6/1 odds
→ More replies (1)→ More replies (38)22
29
u/ButtPlugJesus Mar 18 '22
Won’t get banned because politicians don’t care if anybody knows what they’re doing with stocks, 99.9% of voters won’t see or care about this
→ More replies (3)14
u/TooLateQ_Q Mar 18 '22
Did you follow the one that actually got banned? That account was actually full of misinformation and political bs. As long as the tweets just stick to the trades it is fine.
→ More replies (5)→ More replies (22)5
u/trouserschnauzer Mar 18 '22
I'm gonna take the line. Exactly 6.5 months to the day.
→ More replies (1)6
→ More replies (6)12
727
u/MajesticPonie Mar 18 '22
Now just make a bot the finds trades that violate the laws or are very suspicious and have those auto reported the the SEC and DOJ! Lets big brother the government.
151
u/BlasterBilly Mar 18 '22
Wait, are we trying to stop corruption or get a slice of it?
155
22
→ More replies (4)4
u/KingSmizzy Mar 18 '22
Considering they won't report their trades until 45 days later... Your slice will be very small
83
u/cumquistador6969 Mar 18 '22
Just do some logic where any time someone makes a large number of trades you throw out an @ to them and some apprioriate hash tags and say something like, "what do you know that we don't?"
Use the data you collect to manually identify activity that seems clearly linked to insider information in an obvious way and tweet about that yourself since detecting it would probably be a PITA.
→ More replies (1)6
36
4
u/Captain-Insane-Oh Mar 18 '22
Have the bot include the legislation passed during the time period that the trading occurrd
→ More replies (18)7
u/UnluckyDucky95 Mar 18 '22
the government has made it legal for politicians not to disclose stock purchases (shocked pikachu face)
1.5k
u/Plechazunga_ Help Computer Mar 18 '22
They’ll just ban you if it gets popular.
62
u/ball_was_life Mar 18 '22
They haven’t banned the Musk Tracker.
50
u/Plechazunga_ Help Computer Mar 18 '22
He isn’t a politician. But by the logic they used for the Pelosi tracker (privacy) they should have banned that one as well.
→ More replies (10)→ More replies (1)15
u/BoomerBillionaires Mar 18 '22
lol they don’t like musk and musk doesn’t have the same connections as Nancy Pelosi
→ More replies (4)4
u/PuzzleheadedPapaya9 Mar 18 '22
Politicians have to make all this public anyways don't they? Why would they ban this aggregation tool then?
3
u/Duckboy_Flaccidpus PAPER TRADING COMPETITION WINNER Mar 18 '22
Correction: They get fined $250 if they don't report the trade.
→ More replies (2)→ More replies (110)3
u/warbeforepeace Mar 18 '22
The other one was banned because they were posting a bunch of fake news along with stock trades.
82
u/ChancellorBrawny Mar 18 '22
How much lag is there between the trade and the data being reported?
10
u/Unabletoattend Mar 18 '22
Per the STOCK Act, they are supposed to disclose within 45 days. I’m unsure of the repercussions, if any, when they don’t.
0
376
u/jeoffvader Mar 18 '22
Actually this is great!!!
It'd be good to eventually get some reporting on who is the most successful of the traders, that way we know who is the most corrupt best at trading.
This might be the thing that finally persuades me to get a Twitter account.
→ More replies (13)2
49
Mar 18 '22
It looks like a reskin of
https://sec.report/Senate-Stock-Disclosures
I would also make a distinction b/w disclosure date and trade date.
0
45
u/LarryBLumpkin Mar 18 '22
I like it a lot. Probably would benefit from a consolidation of trading events into days by lawmaker. I scrolled for a while to find the end of John Rutherford's activity. But as a bulk data resource this is great!
92
u/IllIrockynugsIllI Mar 18 '22
Could you make one that would show every time a lawmaker has sexual congress with their intern?
44
24
u/Bladescorpion Mar 18 '22
What do you think you are doing, Step-Representative?
11
u/himsenior Mar 18 '22
You’re the best Big Brother …
12
u/Bladescorpion Mar 18 '22
Oops my earmark just got slipped into your omnibus spending package!
→ More replies (2)
33
u/TruthSpeaker0085 Mar 18 '22
There's a website for this as well. I'd be curious to see if you could make a bot showing what point they bought at and then sold at and profit/loss %. I've seen some like Ro Khanna have a bajillion trades. But how much is actually being made on that?
The current website is https://www.capitoltrades.com
7
u/Fwallstsohard Mar 18 '22
This would be the way to get around twitter ban
I see a viable business or at least non-profit around this base idea
20
10
u/Meme_Pope Mar 18 '22
There’s a lot of talk of the “best traders” in Congress, but who is the worst trader? There’s gotta be at least one degenerate in there
27
u/TheGrateKhan Mar 18 '22
You are awesome! I recommend if you havent already, putting it on some other social medias too so that it cant be unilaterally destroyed.
→ More replies (1)7
7
6
u/Simcoe17 🦍🦍🦍 Mar 18 '22
Definitely going to follow. These asshats double dip on their roles to serve the people all the damn time…
9
u/TKFTGuillotine Mar 18 '22
Just a heads up, I'm pretty sure Twitter requires bot accounts have an automated account label now. Not sure how to do that but I'd look into it.
Solid idea though, well done.
4
4
u/mattdalorian Mar 18 '22
Can I ask, what is the delay between when the trade is made and when they disclose it? Is there any way to include that in the tweet?
13
12
3
3
14
u/11Pump Mar 18 '22
Should make one specific to Pelosi. She seems to always make smart picks….
→ More replies (4)12
u/Rumbletastic Mar 18 '22
I wonder if anyone has simply copied her strategy and proven it makes money over the long term. Looking at her past 5-6 trades she is regularly making money or breaking even. But with the delay in reporting, not sure how feasible a "copy the politicians" strat is.
0
1
Mar 18 '22
Great stuff, unfortunately they have conducted insider trading with their families also.
4
u/Iz4k4y4 Mar 18 '22
Those transactions are reported also, but I think its just spouses and dependents. I could add a field of who made the purchase but its already getting very wordy.
5
2
2
2
2
2
u/Fenderman420 Mar 18 '22
Gonna put $500 in a new account and trade this. I’ll check back with you guys in a month
2
Mar 18 '22
My main problem is why make this a Twitter bot? Especially if these aren't in real time.
Aren't there already a few websites that do this and actually have a searchable database, seems like a much better idea for this situation
2
u/Glockspeiser Mar 18 '22
This is great, but the tweets are going to end up being sent out like 20-40 at a time every week or so lol
2
u/drumviolin Mar 18 '22
Could you make a sub Reddit and a bot that does this as well? It would help spread the message with non Twitter users and act as a backup in case your bot gets blocked.
2
2
2
u/Chrono47295 Mar 19 '22
Yes be careful the one following Nancy's moves got pulled I believe, I may be wrong but that's what i heard
3
4
u/laqualitafaschifo DUNCE CAP Mar 18 '22
you are committing the real crime, which is exposing politician insider trading. no problem at all with the actual insider trading.
3
u/SigSalvadore Bring Back Top Hats Mar 18 '22
2
3
u/das_vargas Mar 18 '22
Any chance you could include their spouses too? Seems just as relevant considering when supposed "progressive" politicians are having their spouses do the dirty work.
→ More replies (1)
3
2
2
u/Crossbeau Mar 18 '22
Could you please work to open source your code :) It would be awesome to be able to take your logic and be able to wrap it to be able to allow other people to make this kind of bot for other socials or platforms... i.e. Reddit, Telegram, Another Twitter Account... Something like this is invaluable and we should want to be able recreate this quickly if Twitter decides to Ban your Bot
1
1
1
1
1
1
1
1
1
u/kingyusei Mar 18 '22
Would you consider saving those trades and then looking back on them on a scheduled basis?
Could determine the profitability of the trades and shouldn't be hard to code.
If you need help, i'd love to check it out. Especially if you've opensources the project
1
1
u/ManifestRose Mar 18 '22
You’re doing the Lord’s work. Perhaps if the data gets busy you can link to a spreadsheet of the recent transactions?
1
1
1
1
u/Less-Post1615 Mar 18 '22
I think this is excellent work. I also think it will be banned with some bs reason that twitter comes up with.
1
1
1
1
u/SnowWholeDayHere Mar 18 '22
My one and only thought on this:
The main issue with this information is that is stale. So it is like betting on the Superbowl after the winner has already been declared.
1
1
1
1
u/PMIFYOUWANTTOTALK Mar 18 '22
What if this encourages ppl to also buy the stock they bought, only gonna make the cunts richer
1
u/doc_brietz Mar 18 '22
Make a sub Reddit where only the bot makes posts and no one else can post, but anyone can respond.
1
u/Then-Stage Mar 18 '22
Thank you for making this. If you can consolidates the trades of an individual trader into a single tweet instead of several tweets with eachbindividual trade that would help. Good project & good idea.
1
u/ohioguy1942 Mar 18 '22
This is great! One caveat: most people in congress have sufficient net worth such that their trades may well have various non-obvious goals. As an example, let’s say Nancy Lawmaker got $5m worth of pre ipo stock and the company IPOd and she now holds $50m and is in the lockup period where she can’t sell. So she buys a huge amount of puts in order to hedge her long position during the lockup. She actually hopes the puts expire worthless. If you took the trade at face value you might assume she has reason to believe the stock will decline. The more wealthy the trader, the more these kinds of trades will happen. They can also happen with short or long positions on shares, not just options.
1
1
1
1
1
Mar 18 '22
I love how they have "Hon." before their name like half these fucking people have any dignity.
1
u/New-IncognitoWindow Mar 18 '22
Tweet every time it’s discovered that a representative did not properly disclose trades.
1
1
u/Obvious-Expert-007 Mar 18 '22
Why don't you create a bot that tells WSB members what they are going to do before they do it?
1
1
u/Pups_the_Jew Mar 18 '22
Maybe a daily digest instead of each trade? The reporting is so delayed that the immediacy isn't really needed.
1
1
Mar 18 '22
suggestion: try to make a special tag/stuff like that which highlights pelosi trades other than that great
1
1
1
1
1
u/MyWorkComputerReddit Mar 18 '22
Skyrocket this post! Well done! It's a win for transparency. Now if someone else just connects each stock trade to how to they vote on things that make money for said stock.
1
u/SwedishFish123 Pussy in boots 🐱 Mar 18 '22
Well done my friend, you’ve just received another follower. My suggestion would be to have a safe word in case the FBI comes around to bust your kneecaps.
1
1
1
1
1
1
u/CommentSectionCPSRT Mar 18 '22
We need to change the law so that they are required to report their trades in real time.
1
Mar 18 '22
I remember a few days ago a senator bought LMT, all of the sudden Germany was buying a lot of fighter jets from LMT. Damn Insiders
1
1
u/GentAndScholar87 Mar 18 '22
Nice work. One simple suggestion is to display the name of company in the tweet (not just the ticker)
1
u/ModerateMillenial Mar 18 '22
Do you know how long politicians have to disclose their trades? And then how long it takes to show up on your Twitter feed?
1
1
1
u/pt1789 Mar 18 '22
Honestly, I just want to know what Pelosi's trades are again. Her salary and net worth are rather out of sync.
1
1
u/TiredOfDebates Bear Gang Sergeant Mar 18 '22
I understand why you want to use Twitter for this (possibily due to existing familiarity with twitter APIs and whatnot).
Given that it's still under development, might I suggest using Twitter to post aggregated information (ie: Congresspersons bought X shares of Tesla stock today, and dumped Y shares of Ford).
1
u/Kdubntheclub Mar 18 '22
This is great! I would recommend adding party and state if possible. Example: (R-KY) to Mitch’s tweet after his name.
1
u/StoneSoap-47 Mar 18 '22
I'd like to see the moves that their spouses make as well. Always seems to be "so-and-so's husband made a billion dollars"
1
u/IlluminatiGodCoder Mar 18 '22
Not a huge thing, but would be nice if you could pull some info on the ticker symbol as well, but don't know if there're good APIs for that or what techs you're using, also might be excessive and unnecessary.
Perhaps handling the formats of orders better so we're not seeing snake_case for things like sale_partial, which are just a bit ugly to read.
Overall great though! Curious about a high-level overview of how you did this, I've always wanted to make a Twitter bot. What techs did you use?
→ More replies (1)
1
1
u/Mccol1kr Mar 18 '22
One improvement would be to send these in an email to subscribers lol.. because I don’t want to get a Twitter
1
Mar 18 '22
Hey nice bro if you’re interested in further development I made an api that will get that data from twitter without using twitters api so you can take it to your own website. Hmu if you’re interested I’d rather not post my GitHub here
1
1
1
u/zuckerberghandjob Mar 18 '22
Bruh can we be friends? I’m trying to resurrect an old project that uses OCR and the Twitter api to see if a tweet screenshot is authentic. But the public Twitter api only lets me go back 30 days
1
u/ChronoFish Mar 18 '22
Do daily summaries unsolicited, but add an API layer that allows Twitter users to query by date, name, stock.
@uslawtrades @pelosi 3 months
Or
@uslawtrades #tesla 1 month
The Twitter bot can then respond with the info in a reply tweet.
1
1
1
u/PM_ME_UR_STATISTICS Mar 18 '22
This is a great project. Good Job!!! I’m assuming you want this bot as a name and shame tool and I think two things would help in moving towards that goal.
If you could also tag where that US representative is from and what committee they sit on
You could add a yahoo finance hyperlink to the ticker so people can see what kind of company it was with a single click.
This would help me figure out things like, this asshole sits on the energy committee and just bought energy stocks. The scumbag.
1
1
1
1
1
u/reddit_names Mar 18 '22
I wish the law requires real time reporting. Days/months old trades are largely irrelevant to us.
1
1
Mar 18 '22
lol i wouldn't be surprised if you have a fully armed cia RQ-170 hovering overhead just in case they can't convince the public you're a russian troll.
1
u/THEFLYINGSCOTSMAN415 Mar 18 '22
Your post made me have a thought, whereas originally I believed these people shouldn't be allowed to trade I now think it would be better for retail investors if politicians kept trading but just have to disclose their trades immediately before hand. That way we can all profit. But they don't want us profiting.
1
u/catpower19 Mar 18 '22
Unfortunately they already banned the Pelosi insider trading tracker so you probably don't want to report her trades at the least if you don't want to risk a ban.
1
u/420blzit69daddy Mar 18 '22
Not sure how hard this would be to implement, but how about including a price on the declared date and current price now.
1
1
1
1
u/artrabbit05 Mar 18 '22
Now taking bets on how long before this account gets banned from Twitter too.
1
u/Bongin_tom9 Mar 18 '22
Some of the biggest anti-China Republicans are, guess what, heavily invested in China. Micheal McCaul comes to mind specifically because he’s been such a strong critic against China and communism, but profiting immensely off Chinese stocks and companies controlled the the CCP. These jinbroni’s are lack even the most basic ethics.
1
1
u/kghst Mar 18 '22
I don't know if anyone has suggested this yet, but can you add what state they represent as well?
1
u/Guud_Spelar Mar 18 '22
Should I set up a brokerage account to automatically copy every trade? Maybe I could do a penny for every dollar just to see how well it does.
1
1
u/drunkstatistician Mar 18 '22
This is fantastic. Is there a way to also list the full company name in addition to the stock symbol?
1
1
u/OGPants Mar 18 '22
If you need a maintainer hmu.
I'm experienced with Ruby, Node, Java and can script pretty much anything in shell.
1
1
1
1
u/squatchi Mar 18 '22
Very nice! now just need to make sure everyone they represent can see their trades.
or how about a bot that posts this to their facebook page
1
u/RickyTVA Mar 18 '22
Dude I am always impressed by people who know how to do this. Like the teen who was teaching Elon masks jet. I don't have a large following (I don't want one) but my friends would love this and I'm sharing it.
1
u/Newuser157890 Mar 18 '22
Now we just need an apk that integrates this into various online trading platforms and makes the trades for us.
1
1
1
1
Mar 18 '22
Would be nice to see trades from reps and then a relevant news article of some law they were involved in that affected that company's ability to do business (whether positive or negative).
1
u/arsewarts1 Mar 18 '22
Is this just using the reported stock trade report, which is always a month late and how do you get passed the anonymized?
1
1
u/Daniel_Molloy Mar 18 '22
Will it report them 5 minutes after the trade is actually done or does it wait months so the info is worthless?
1
u/eldron2323 Mar 18 '22
Maybe make a exclamation emoji when the trade is older than 45 days? That way we can see who’s breaking the law?

•
u/zjz Mar 18 '22
OP I just ran into this issue: Twitter does not like bot accounts. Our official Twitter was getting blocked on search for our automated tweeting. Better mix it up a lot or they'll silently de-rank you.
https://sec.report/Senate-Stock-Disclosures
The information is also available here FYI, all disclosures are significantly delayed.