icli

Interactive command-line interface for Interactive Brokers TWS/Gateway with real-time trading and account management.

Verified

Install

pip install icli

TL;DR: icli is an interactive terminal interface for Interactive Brokers that provides real-time trading, account monitoring, and order management through TWS or IB Gateway.

icli connects to Interactive Brokers’ Trader Workstation or IB Gateway and provides a command-line interface for account management and order execution. You can view real-time positions, monitor profit and loss, submit orders, and manage your portfolio without using the IB desktop application. The interface is interactive, with keyboard shortcuts for common operations and a prompt-based workflow for order entry.

The tool exposes a substantial portion of the Interactive Brokers API through terminal commands. This includes market data subscriptions, order types (market, limit, stop, and more complex order types), account summaries, and position management. Because it runs in the terminal, it integrates naturally with screen/tmux sessions and can be used over SSH for remote account monitoring.

icli is built for active Interactive Brokers users who want faster, keyboard-driven access to their accounts. It is particularly useful for traders who already work primarily in the terminal and want to avoid context-switching to a GUI. A working IB account and running TWS or Gateway instance are prerequisites.