Repository navigation
v3.48.1
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.48.1
- An exit plan can carry a cut level. A touch of the level sells nothing: the rest of the position is sold after two five-minute closes in a row under it. A touch of the plan's stop level, which lies beneath the cut level, sells at once. A close back at or above the cut level starts the count again, and so does a five-minute period whose close could not be read. A restart between the two closes resumes the count. A cut plan ends with the session it was set for.
- For a held stock, the market read reports the cut level (
cut): the low of the first 60 minutes, how many five-minute closes in a row are under it, when two closes in a row first held under it, and how often the stock traded under it and closed back above. It is a reading only, and nothing sells on it. canary edge levelsnames, beside each money-weighted figure, the single day that moves it most and the figure without that day (largest_day_money,pct_without_largest_day).
Install
For the standard read-only CLI and local MCP server:
curl -fsSL https://raw.githubusercontent.com/osauer/canary/main/install.sh | shFor Claude Desktop, download canary.mcpb from the assets below. For order submission, choose a canary-trading-v3.48.1-* 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:
go get github.com/osauer/canary/v3@v3.48.1for the daemon client andpkg/ibkr. Install the binary with the signed installer or the release assets above.
Detailed changes
Changed
- Before going back to an earlier version, cancel any cut plan: an earlier version ignores it and will not sell.
Fixed
canary edge levelsvalued a call five sessions on without the time it had left, and valued an expired call as if it still traded. A later value is now modelled with the time left to expiry, an expired call is worth its intrinsic value at the expiry day's close, and a value that cannot be priced is left out, and the number left out is reported.
Security
- An order field too large for the broker's 32-bit wire format is now refused with the field's name before anything is sent. Until now such a value would have been cut down to 32 bits and sent as a different number. This covers the order id, contract ids, combination legs and the order's other whole-number fields, and a negative contract id is refused too. No order within the valid range changes: its bytes on the wire are the same as before.
- An inbound message id outside 32 bits is rejected, and a Futu frame above the 16 MiB limit is refused when it is built. Canary already refused such a frame when sending it.