NadirAliOfficial
ibkr_news_bot
Python

Real-time IBKR trading bot core engine with Benzinga news integration. Fetches live market headlines from Benzinga, scans them with Aho-Corasick keyword matching, logs results to SQLite and rotating logs, and prepares triggers for automated IBKR trading strategies.

Last updated Jul 3, 2026
14
Stars
2
Forks
0
Issues
0
Stars/day
Attention Score
52
Language breakdown
Python 100.0%
โ–ธ Files click to expand
README

๐Ÿ“ฐ IBKR News Bot

Real-time news-driven engine for algorithmic trading on IBKR โ€” powered by Benzinga Pro headlines. Milestone 1: Core bot for ingesting market headlines, matching keywords, and logging results to SQLite + rotating logs.


โšก Features

  • ๐Ÿ”Œ Benzinga Pro Integration โ€” Fetches real-time market headlines via API
  • ๐Ÿง  Keyword Detection โ€” High-speed Aho-Corasick engine for matching terms
  • ๐Ÿ’พ Persistent Logging โ€” Saves all matches into SQLite and rotating file logs
  • ๐Ÿ“ฆ Modular Design โ€” Clean architecture ready for IBKR order routing

๐Ÿ“‚ Structure

ibkr\news\bot/
โ”‚
โ”œโ”€โ”€ ibkr\news\bot.py     # main bot script
โ”œโ”€โ”€ .env                  # API keys and config
โ”œโ”€โ”€ data/news.db          # SQLite database (auto-created)
โ”œโ”€โ”€ logs/bot.log           # Rotating log file (auto-created)
โ””โ”€โ”€ README.md

โš™๏ธ Setup

1. Clone the Repository

<pre><code class="lang-bash">git clone https://github.com/NadirAliOfficial/ibkrnewsbot.git cd ibkrnewsbot</code></pre>

2. Create Virtual Environment

python3 -m venv .venv
source .venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

(Or manually):

pip install requests python-dotenv pyahocorasick

4. Add Your API Key

Create .env:

BZAPIKEY=yourrealbenzingaapikey_here

๐Ÿš€ Usage

python ibkrnewsbot.py
  • Pulls latest Benzinga headlines for watchlist symbols (default: AAPL, TSLA)
  • Detects configured keywords (default: bankruptcy, merger, upgrade, earnings)
  • Logs matches into data/news.db and logs/bot.log

๐Ÿ“Œ Roadmap

โœ… Milestone 1 (Current)

  • Core bot engine
  • Benzinga news ingestion
  • Keyword matcher
  • SQLite + file logging

โณ Milestone 2

  • Keyword-triggered orders on IBKR via ib_insync
  • Bracket orders, risk controls, Telegram alerts

โณ Milestone 3

  • GUI (PySide6/Qt)
  • Watchlists, keyword lists, live logs

โณ Milestone 4

  • VPS deployment
  • Backtesting + forward testing
  • Full documentation

๐Ÿง  Credits

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท NadirAliOfficial/ibkr_news_bot ยท Updated daily from GitHub