A shared repository for trading tools, scripts, and utilities developed for the Blohm Proptrading Group trade desk.
This repository is owned by jb (CEO) and maintained by Bob (Software Developer). Testing is performed by Mike and Scott. It provides tools that Linda, Paul, and Tom use in daily trading operations.
trading-tools/
├── README.md # This file
├── requirements.txt # Python dependencies
├── .gitignore
├── tools/ # Trading tools and scripts
│ ├── cancel_order.py
│ ├── flatten_position.py
│ ├── get_exposure.py
│ ├── get_greeks.py
│ ├── get_liquidity_metrics.py
│ ├── get_margin_usage.py
│ ├── get_open_orders.py
│ ├── get_order_status.py
│ ├── get_pnl.py
│ ├── get_positions.py
│ ├── get_quote_snapshot.py
│ ├── get_risk_breaches.py
│ ├── get_risk_limits.py
│ ├── modify_order.py
│ ├── monitor_stops.py
│ ├── place_order.py
│ ├── pretrade_risk_check.py
│ ├── run_pretrade_stress.py
│ ├── trade_proposal.py
│ ├── connection_ids.json # Broker connection configuration
│ └── risk_limits.json # Risk limit parameters
├── docs/ # Documentation and guides
│ ├── cancel_order.md
│ ├── get_greeks.md
│ ├── get_margin_usage.md
│ ├── get_open_orders.md
│ ├── get_positions.md
│ ├── get_quote_snapshot.md
│ └── place_order.md
├── tests/ # Automated test suite
│ ├── test_cancel_order.py
│ ├── test_flatten_position.py
│ ├── test_get_greeks.py
│ ├── test_get_margin_usage.py
│ ├── test_get_open_orders.py
│ ├── test_get_order_status.py
│ ├── test_get_positions.py
│ ├── test_get_quote_snapshot.py
│ ├── test_get_risk_breaches.py
│ ├── test_modify_order.py
│ ├── test_monitor_stops.py
│ ├── test_place_order.py
│ ├── test_pretrade_risk_check.py
│ └── test_trade_proposal.py
├── option-trading-strategies/ # Option strategy playbooks
│ ├── README.md
│ ├── calendar_spread.md
│ ├── cash_secured_put.md
│ ├── covered_call.md
│ ├── diagonal_spread_pmcc.md
│ ├── iron_butterfly.md
│ ├── iron_condor.md
│ ├── long_call_vertical_spread.md
│ ├── long_put_vertical_spread.md
│ ├── short_call_vertical_spread.md
│ ├── short_put_vertical_spread.md
│ ├── short_straddle.md
│ ├── short_strangle.md
│ └── wheel_strategy.md
└── general-trading-strategies/ # Macro and general strategy playbooks
├── README.md
├── ptj_crash_playbook_liquidity_breakdown.md
├── ptj_macro_breakout_with_asymmetric_risk.md
├── ptj_rates_fx_policy_divergence.md
├── ptj_risk_overlay_for_all_strategies.md
└── ptj_trader_execution_layer.md
Mike needs a GitHub account with write access and a Personal Access Token.
- Go to https://github.com/settings/tokens/new
- Token name:
trading-tools-contribute, scope:repo - Clone the repository:
git clone https://github.com/JBlohm/trading-tools.git cd trading-tools - When prompted for a password, use the PAT (not your GitHub password)
- Optional: save credentials so you don't have to re-enter:
git config --global credential.helper store
Note for jb: You'll need to add Mike as a collaborator on GitHub. Go to
https://github.com/JBlohm/trading-tools/settings/access → "Add people" → enter Mike's GitHub username.
git checkout -b feature/your-feature-name
# make your changes
git add .
git commit -m "Short description of change"
git push origin feature/your-feature-nameThen open a Pull Request on GitHub so the changes can be reviewed before merging.
No GitHub account is needed — the repository is public. You only need git and Python installed.
git clone https://github.com/JBlohm/trading-tools.git
cd trading-tools
pip install -r requirements.txt # run once requirements.txt existscd trading-tools
git pullThat's all you need. No credentials, no GitHub account required.
| Tool | Description | Read-only |
|---|---|---|
get_positions.py |
Current TWS positions | ✓ |
get_greeks.py |
Portfolio-level option Greeks | ✓ |
get_margin_usage.py |
Account margin usage | ✓ |
get_open_orders.py |
Open/pending orders | ✓ |
get_quote_snapshot.py |
Pre-trade quote, session, and liquidity snapshot | ✓ |
get_risk_breaches.py |
Portfolio risk limit breach detector | ✓ |
get_order_status.py |
Order lifecycle status and fill details | ✓ |
monitor_stops.py |
Stop and target order monitor | ✓ |
detect_crash_liquidity_breakdown.py |
PTJ Crash Playbook / Liquidity Breakdown signal detector | ✓ |
trade_proposal.py |
Structured trade proposal with pre-trade checks | — |
place_order.py |
Place orders with pre-trade risk gate | — |
cancel_order.py |
Cancel open orders | — |
modify_order.py |
Modify existing orders | — |
flatten_position.py |
Emergency position flatten | — |
| Document | Covers |
|---|---|
docs/get_positions.md |
Position reader |
docs/get_greeks.md |
Greeks reader |
docs/get_margin_usage.md |
Margin usage reader |
docs/get_open_orders.md |
Open orders reader |
docs/get_quote_snapshot.md |
Quote snapshot |
docs/place_order.md |
Order placement |
docs/cancel_order.md |
Order cancellation |
docs/detect_crash_liquidity_breakdown.md |
Crash playbook detector — thresholds, JSON schema, failure modes |
| Person | Role | Access needed |
|---|---|---|
| jb | Owner | Full admin access (already set up) |
| Bob | Developer | Push access via PAT (configured) |
| Mike | Contributor | GitHub account + PAT (scope: repo) + added by jb |
| Scott | Tester | GitHub account + PAT (scope: repo) + added by jb |
| Linda | User | git + Python, no GitHub account needed |
| Paul | User | git + Python, no GitHub account needed |
| Tom | User | git + Python, no GitHub account needed |