Automation · Built with friends
Reverse Split Arbitrage Bot
A pipeline that ingests SEC reverse-split filings, classifies their fractional-share terms with an LLM, and cuts the time from filing to trade decision to minutes.
- Python
- OpenAI API
- REST APIs
- Discord API
- Git
Overview
What it does and whyWhen a company reverse splits, the treatment of fractional shares is spelled out in a filing, in legal language that varies by company and only matters for a short window before the split date. Reading those filings quickly and correctly is the entire problem.
The pipeline does the reading. It ingests each new SEC reverse-split filing as it posts, uses the OpenAI API to classify the fractional-share provision, and pushes qualified cases to Discord with everything needed for a fast decision. A single execution layer then orchestrates the order through multiple brokerage APIs, taking the time from filing to execution down to minutes.
Technologies
And why each one- Python
- Scraping, orchestration, and the glue between every other piece.
- OpenAI API
- Classifies each filing as round-up, cash-out, or unclear. The legal language varies too much for regex.
- REST APIs
- One execution layer abstracts over multiple brokerage APIs, so a single decision becomes an order everywhere it needs to be.
- Discord API
- A webhook is the UI: each opportunity arrives with what you need to decide in seconds.
- Git
- Versioned config, so prompts and broker integrations change through commits.
How it works
- 01
Ingest the filings
A scraper polls new SEC reverse-split filings, so each one surfaces the day it posts instead of after the window closes.
- 02
Parse the legal language
The LLM reduces each filing to one classification of its fractional-share provision. The wording varies too much across companies for pattern matching.
- 03
Decide in Discord
Qualified cases post with ticker, ratio, and deadline. A human makes the final call, keeping the pipeline from acting on a misread filing.
- 04
Orchestrate the execution
A confirmed decision flows through one code path that abstracts over multiple brokerage APIs, with per-broker quirks isolated behind a shared interface.

Curious about the details? I'm happy to walk through any of it.
The source for this project lives in a private repository and is available on request.