Skip to content

BollyBuzz/mav-bridge

Repository files navigation

mav-bridge

An independent, open-source bridge that reads signals from a running TradeMAV instance and optionally forwards them to a broker or webhook.

Not affiliated with TradeMAV LLC. This is a community project.


How It Works

TradeMAV (running locally) └── trademav.db ← mav-bridge reads this (read-only, never writes) └── bridge.py evaluates thresholds └── fires order to broker / webhook

mav-bridge never modifies TradeMAV. It opens the SQLite database in read-only mode and tails new signal rows as they appear.


Quick Start

1. Install dependencies

pip install -r requirements.txt

2. Configure

cp config.example.json config.json

Edit config.json:

  • Set trademav_db_path — use a relative path (e.g. ./data/ultimate_options_trading.db) if mav-bridge and TradeMAV share the same machine, or an absolute path for a USB/external drive (e.g. D:/TradeMAV/TradeMAV/data/ultimate_options_trading.db)
  • Set your broker credentials
  • Leave dry_run: true until you are confident

3. Run

python bridge.py

Configuration Reference

See config.example.json for all fields with comments.

Field Description
trademav_db_path Relative or absolute path to TradeMAV's .db file
poll_interval Seconds between DB checks (default: 60)
min_strength Minimum signal strength to act on, 0.0–1.0 (default: 0.70)
min_aligned Minimum fired signal types to act on (default: 3). Count of items in TradeMAV's signals_fired array.
dry_run If true, logs orders but does not place them (default: true)
broker "alpaca" or "webhook"
excluded_tickers List of tickers to never trade
default_qty Default share quantity when ticker not in quantities
quantities Per-ticker quantity overrides

Supported Brokers

Broker Status Notes
Alpaca ✅ Working Paper + live. US stocks and crypto. Free API.
Webhook ✅ Working POST signal JSON to any URL. Use for Discord, n8n, Zapier, TradingView alerts.
Interactive Brokers 🔧 Stub See brokers/ibkr.py — contributions welcome
TD Ameritrade / Schwab 🔧 Stub See CONTRIBUTING.md
Tradier 🔧 Stub See CONTRIBUTING.md

Database Schema

See SCHEMA.md for the full table and column reference for TradeMAV's SQLite database.


Disclaimer

See DISCLAIMER.md. You are solely responsible for any trades executed using this software.


Contributing

See CONTRIBUTING.md. All broker adapters beyond Alpaca and Webhook need contributors.

About

Turns TradeMAV's on-screen signals into automated trade executions or notifications — without requiring any modification to TradeMAV itself.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages