Extending BrokerBridge with plugins
Add a Python data source to supply research signals. For model selection, use AI Providers. Retail accounts connect Interactive Brokers for market data. You can also connect Unusual Whales for research. EODHD can supply daily history to saved strategies with a configured key. Its Settings field is a developer preview; broader news and fundamentals tools are coming soon.
Implement the DataSourcePlugin class below to provide ranked signals. Plugins supply data; model selection and trade approval stay in BrokerBridge.
Connect market data to your research
Already connected to IBKR? Find option chains and contract quotes without an Unusual Whales subscription.
IBKR option chains and quotes
Find listed expiries and strikes, then check a chosen contract through your Interactive Brokers connection. Contract quotes can include their own IV and Greeks when available.
Before asking Chat, choose a connected AI in Settings, then Models & Credits. Offline Local Demo does not run these market queries.
- Connect TWS or IB Gateway to BrokerBridge. Follow the TWS setup guide or IB Gateway setup guide. Confirm the connection in Settings, then Broker Accounts, Configure Interactive Brokers and Test Connection. Keep the broker API read-only for research.
- For live US-listed option quotes, confirm OPRA coverage and market data API access for your IBKR username. Live Greeks also require the market data subscription for the underlying. Check IBKR market data subscriptions.
- In Chat, ask
Use IBKR to show SPY option expiries and strikes. Research only.
Choose a listed expiry (YYYY-MM-DD) and strike, then include the underlying symbol and call or put when asking for the contract’s bid and ask.
Check the returned source, quote time and live, delayed or frozen status. For indicators, ask about the underlying symbol separately. Unusual Whales is optional for broader IV analytics, options trade flow and event research.
BrokerBridge may earn a referral commission from the Unusual Whales and EODHD links below.
Unusual Whales
Use your own Unusual Whales API subscription for options flow, implied volatility and market events. In BrokerBridge, open Settings, then Options Intelligence. Enter your key, test the connection and save it. Wait for the research tools to show as connected before asking Chat to use them.
The signup link fills the vendor referral code brokerbridge. For an existing account, open your Unusual Whales referrals page. If it shows Use friend’s referral code
, enter brokerbridge and choose Get referred!
. In BrokerBridge, connect your own Unusual Whales API key, not the referral code.
EODHD historical prices
Saved strategies can use EODHD daily price history when your own key is configured. In Settings, open Options Intelligence and find EODHD Historical. If the field is available, enter your EODHD key and choose Save Keys. If it shows Developer Preview and is disabled, your build cannot configure it from Settings yet. Broader EODHD news and fundamentals tools are coming soon.
Get help with EODHD preview access. Include your BrokerBridge version. Keep API keys private.
Open the referral link, then choose Sign up
on EODHD in the same browser. Its signup page has no separate referral-code field. In BrokerBridge, connect your own EODHD API key, not brokerbridge.
Polymarket research
BrokerBridge includes research tools for public Polymarket data, including market prices, order books and price history. Open Chat and ask it to research an event or prediction market, then ask for its order book or price history. Prediction market trading is coming soon.
Download BrokerBridgeArchitecture overview
DataSourcePlugin
Provides trading signals. The pipeline calls fetch_signals() during each scan interval to get ranked signals.
Examples: IBKR market data, custom scanner
DataSourcePlugin supports three auth modes: api_key, oauth, and connection. These credentials are for your own third-party data source, never for an AI provider.
DataSourcePlugin interface
class DataSourcePlugin(ABC):
name: str # Unique plugin identifier
display_name: str # Human-readable name
auth_type: AuthType # "api_key" | "oauth" | "connection"
required: bool = False # System won't start without it if True
async def validate_credentials(self) -> bool: ...
async def fetch_signals(self, symbols: list[str]) -> list[Signal]: ...
async def health_check(self) -> PluginStatus: ...Tutorial: custom data source
from datetime import datetime, timezone
import httpx
from brokerbridge.plugins.base import DataSourcePlugin
from brokerbridge.plugins.types import AuthType, PluginStatus, Signal
class MyScannerPlugin(DataSourcePlugin):
name = "my_scanner"
display_name = "My Custom Scanner"
auth_type: AuthType = "api_key"
def __init__(self, api_key: str):
self._api_key = api_key
async def validate_credentials(self) -> bool:
async with httpx.AsyncClient() as client:
resp = await client.get(
"https://api.example.com/ping",
headers={"Authorization": f"Bearer {self._api_key}"},
)
return resp.status_code == 200
async def fetch_signals(self, symbols: list[str]) -> list[Signal]:
async with httpx.AsyncClient() as client:
resp = await client.post(
"https://api.example.com/scan",
headers={"Authorization": f"Bearer {self._api_key}"},
json={"symbols": symbols},
)
resp.raise_for_status()
data = resp.json()
signals = []
for item in data.get("signals", []):
signals.append(Signal(
symbol=item["symbol"],
direction=item["direction"],
score=item["score"],
timestamp=datetime.now(timezone.utc),
source=self.name,
))
return sorted(signals, key=lambda s: s.score, reverse=True)
async def health_check(self) -> PluginStatus:
try:
valid = await self.validate_credentials()
return PluginStatus(connected=valid)
except Exception as e:
return PluginStatus(connected=False, message=str(e))Available plugins
| Plugin | Type | Status |
|---|---|---|
| IBKR Market Data | DataSource | Available |