Skip to content

v3.21.0

Choose a tag to compare

@osauer osauer released this 11 Oct 07:26
· 65 commits to main since this release

Canary — portfolio, risk and order tools for Interactive Brokers

Canary runs locally with TWS or IB Gateway, providing portfolio monitoring, market analysis, risk checks, performance review and order management. Order submission requires the trading build and its approval checks. Standard downloads and MCP remain read-only.

New in v3.21.0

Approved order queues, Adaptive priority, trailing stops that follow the whole
position, corrected volume readings and API settings diagnostics.

These changes address TWS / IB Gateway 10.50 compatibility. Live checks passed
on TWS; Gateway 10.50 still needs end-to-end validation.

Install

For the standard read-only CLI and local MCP server:

curl -fsSL https://raw.githubusercontent.com/osauer/canary/main/install.sh | sh

For Claude Desktop, download canary.mcpb from the assets below. For order submission, choose a canary-trading-v3.21.0-* archive and follow the trading guide and security guidance.

Requires a local TWS or IB Gateway session on macOS, Linux or Windows through WSL. See the installation guide for setup, signature verification and other MCP clients.

  • Go module and source-built CLI: product v3 and later ship through the signed installer and release assets above. The public Go module remains on its maintained v2 line; go install github.com/osauer/canary/v2/cmd/canary@latest installs the newest v2 release, not this product release.

Detailed changes

Added

  • Read-only broker API settings diagnostics with canary status --gateway-diagnostics, including protocol capabilities, volume units and reconnect order retention. The main TWS connection keeps its tested protocol.
  • Owner-confirmed queues for exact stock and single-leg option purchases and sales, priced at the send-time midpoint within an approved maximum buy price or minimum sell price.
  • Explicit Adaptive priority on stock/option limit previews and stock Add previews, bound to the same exact-order confirmation.
  • Whole-position stock trailing-stop mandates that wait for broker acceptance and follow position increases and reductions without resetting or loosening the broker trail. Confirmed closure ends the mandate.

Fixed

  • Large market-data volumes retain their broker-reported decimal value instead of being divided by one million. Invalid and overflowing sizes are rejected. Fixes #56.
  • Deactivated orders remain visible, block competing orders and do not count as active protection; reactivation happens outside Canary. Reconnect recovery keeps retained orders and lost acknowledgements from causing duplicate submissions.
  • Queued purchases check fresh shared capacity at execution; attempted and uncertain orders remain commitments, and ambiguous sends are reconciled before another attempt.
  • Gamma calculations retain valid model ticks arriving late within the existing collection window, even when open interest arrived first.