文档
如何安装、操作及理解 Canary,并连接你自己的 Interactive Brokers 账户。初次接触 Canary 请由顶部开始;后面的章节逐步贴近代码。尚未翻译的页面以英文显示,并标示 EN。
开始使用
安装 Canary,连接网关与 MCP 主机,并确认交易台已上线。
- 安装与首次运行先决条件、各种安装方式,以及证明网关可达的第一批命令。
- Set up broker reportingENCreate the shared IBKR Activity Flex Query, store its token safely, and prove statement-backed features are current.
- Connect an MCP hostENWiring Claude Desktop, Claude Code, Cursor, and Zed to the local server, and checking the connection.
- 接入你惯用的 AI把盈透证券账户接入 Claude、Cursor 或其他 MCP 主机,在对话中直接查询持仓和风险。
- AI 智能体交易AI 智能体在盈透证券账户上可以做什么、不可以做什么,以及一张订单要过哪些关才会发出。
- 首次使用有指引的半小时:读取账户、执行简报、查看规则手册,并解读回传的内容。
- 香港及新加坡账户相同的网关步骤、以港元、新加坡元或日元计的基础货币、亚洲交易所日历,以及何时执行简报。
- UpdatingENUpdate the binary, the Desktop extension, S&P 500 membership, calendars, and local process state.
- 故障排除网关无法连接、报价过时、守护进程无法启动,以及解答每个问题的日志。
日常操作
每日流程:简报、智能体会话、配对应用程序、订单预览、保护与对账。
- The daily deskENA working routine from the morning brief through discipline and protection to the after-close read.
- Working with agentsENWorkflows, limits, and worked examples for driving Canary from an MCP host.
- The paired appENRunning canary app, pairing a phone, the event stream, and opt-in push notifications.
- Alerts and notificationsENWhat raises an alert, where it is delivered, how delivery is proven, and how to tune the noise down.
- Constrained orders and the trading buildENThe read-only default, the constrained order lifecycle that remains, and the separate opt-in trading build.
- Protection and risk reductionENTrailing-stop and risk-reduction proposals, per-row blockers, and how a proposal becomes an order.
- Cash managementENThe cash sweep and currency leveling: their own policy section, their own authority, and how each order is bounded.
- ReconciliationENMatching broker statement flows against the declared capital ledger, and handling the lines that will not match.
理解数据
各项数字量度什么、何时可信,以及由谁设置衡量所用的上限。
- ConceptsENCalendars, regime, stress, market events, protective stops, gamma, and breadth in one mental model.
- Canary EdgeENBroker-truth account P/L, fixed-horizon decision price impact, option actuals, and the coverage that bounds every result.
- SensorsENHow each measurement establishes authority and freshness, and how a gap fails closed instead of guessing.
- Trading policyENWho decides the risk boundaries, what the daemon evaluates, and what never becomes submit authority.
- The rulebookENThe advisory rules, what each one is protecting against, and how a breach is reported.
- Writing a risk policyENTurning a personal risk mandate into the policy file: limits, drawdown ladder, overrides, and review.
- Market data and entitlementsENWhich subscriptions produce real-time data, what delayed and frozen mean, and how freshness is reported.
- GlossaryENOne place for the terms the other pages assume: NLV, R-multiple, zero gamma, last-good, fingerprint.
参考资料
命令、工具与设置的查阅资料,大部分由所记录的代码产生。
- CLIENEvery Canary subcommand with its flags and usage, generated from the command registry in the binary.
- MCP toolsENEvery tool exposed by canary mcp, with parameters and invocation guidance. Generated from the registry.
- ConfigurationENTOML configuration, policy files, runtime platform settings, and environment variables.
- Reporting Flex queryENThe exact shared Flex sections and fields Canary validates, generated from the parser manifest.
- Releases and supportENVersion scheme, what a release contains, how signatures are verified, and which versions are supported.
内部设计
给想了解设计的读者:进程、类型化契约、存储、线路协议与打包。
- ArchitectureENRuntime processes, typed contracts, external data flows, state ownership, and deployment boundaries.
- StorageENWhy the daemon uses SQLite, how the data model follows from its job, and how state survives a restart.
- TWS wire protocolENCoverage and semantic fingerprints for the clean-room Go implementation of the TWS protocol.
- Regime dashboard contractENSource quality, cluster logic, lifecycle decisions, and the evidence required before policy changes ship.
- Gamma cache persistenceENDesign and invalidation semantics for the daemon's persistent dealer zero-gamma cache.
- Packaging and distributionENWhat each published artifact contains, how it is signed, and the boundary every channel ships with.