Products / AI integrations
AI integrationsAssistants, APIs, data feeds and agent workflows, connected without losing control
An AI integration is three layers, not a button: data into a model, the model's output back into a workflow, and a record of every step. This page separates the four ways to connect, the permission tiers, the verification loop, latency and cost, then prices 1,000 queries at $0.02 each.
- InterfaceChat, reports, alertsWhere people look
- ToolsRead, compute, submitWhat is allowed
- DataQuotes, positions, newsSource of truth
- PermissionsKeys, scopes, confirmationWho may act
- RecordsRequest, output, approverCan be rebuilt
Lower layers change hardest.
1. Four ways to connect
AI integration covers four things: an assistant, an API, a data feed and an agent workflow. Their cost, latency and risk differ enough that one budget line gets the number wrong.
| Way | You get | Latency | Main risk |
|---|---|---|---|
| Assistant | Lookups, order drafts | 2 to 8 s | Fluent but wrong numbers |
| API | Quotes, positions, orders in your system | 0.2 to 0.8 s | Leaked keys, duplicate orders |
| Data feed | Real-time or delayed quotes, news | Ms to seconds | Stale prices from missing subscriptions |
| Agent | Model calls tools for multi-step tasks | 5 to 20 s | Write actions without confirmation |
They coexist, but order matters: feed and API first, assistant next, agent near an order button last.
2. Assistants, APIs and agents
An assistant turns a question into a query, an API executes it, an agent chains steps. Blur the three and the assistant starts producing answers instead of facts.
| Role | Input | Output | Owns correctness |
|---|---|---|---|
| Assistant | A question | Draft, explanation | The user |
| API | Structured parameters | Fields, status codes | The system |
| Agent | Goal and tool list | Multi-step result | Workflow designer |
| Verification | Output and source data | Pass or return | Risk control |
The model proposes queries, the API supplies numbers, a verification layer compares both. A wrong sentence then cannot become a wrong order.
3. MCP and tool calling
Tool calling lets a model read data or trigger actions. Protocols such as MCP standardize the tool descriptions, which speeds wiring and leaves the permission boundary to you.
Split tools three ways: read-only, drafting, writes. The first two can be permissive; the third needs a person.
| Group | Examples | Auto-run | Control |
|---|---|---|---|
| Read-only | Quotes, positions, fills | Yes | Rate limits, masking |
| Drafting | P&L estimates, order drafts | Yes | Show assumptions, data time |
| Writes | Amend, cancel, transfer | No | Human confirmation, dual review |
| Config | Keys, permissions | No | Audit trail, alerts |
Put prohibitions in the system, not the prompt. Prompts can be talked around; permissions cannot.
4. Permissions in four tiers
Permission is not one switch: credential, scope, action, confirmation. All four, or the risk moves to the next person.
| Tier | Covers | Mistake | Recommended |
|---|---|---|---|
| Credential | API key, OAuth | Key in the front end | Server side, rotated |
| Scope | Read, trade, transfer | One key, everything open | Separate keys per purpose |
| Action | Query, draft, submit | Assistant submits directly | Human confirmation |
| Confirmation | 2FA, dual review | Single approver | Two approvers for size |
The skipped control is de-identification. Full account numbers and tax IDs sent to a model are personal data handed to a third party. Mask first.
5. Hallucination and verification
Errors cluster: numbers, dates, and identity, the three places trading cannot afford one.
| Error | Example | Check |
|---|---|---|
| Number | Per-share fee read as per-trade | Fee table, API fields |
| Time | Wrong expiry or earnings date | Calendar, contract spec |
| Identity | Symbol or exchange mixed up | Match symbol and exchange |
| Citation | Source claimed, field unnamed | Demand field and time |
Do not ask the model again; a second pass returns another fluent answer. Compare against API fields, fee tables and contract specs instead.
1,000 queries, 5% error
1,000 queries at $0.02 is $20. A 5% error rate leaves 50 answers for review; at two minutes each that is 100 minutes, or $41.67 at $25 per hour, for $61.67 total, about three times the model fee.
Skip review and the cost moves after the error, where it is larger.
6. Latency by scenario
An average hides the case that matters. Judge each scenario.
- Quote lookup: under one second, or the price has moved.
- Assistant draft: under five seconds, or users go back to manual.
- Multi-step agent: under twenty seconds, or it needs a background job.
Tool calls, data-source response and retries stack up. Log every call.
7. Cost: three lines
Model, data and review. Most teams count the first and underestimate by half.
| Item | How to count | 1,000 queries |
|---|---|---|
| Model | $0.02 per query | $20 |
| Data | Monthly subscription | Separate |
| Review | 50 x 2 min x $25 per hour | $41.67 |
| Total | Model plus review | $61.67 |
Cut review volume before switching to a cheaper model. Verifiable fields and field names in the output lower the error rate.
8. Records you can rebuild
The question is whether you can show who decided what, when, and on which data.
- Request: time, user, original question.
- Tools: name, parameters, response summary.
- Approval: who released the order.
- Output: response and model version.
Also: no personalized investment advice, no client data in unreviewed services, and keep model versions, since a version change is a behaviour change.
9. Build order
- Wire the dataAPI and feed, fields and timestamps aligned.
- Read-only assistantQuery only, collect error samples.
- Draft and verifyField comparison and a return path.
- AgentsLow-risk, reversible actions only.
- Records and drillsSample often, rehearse failure.
Each step assumes a rollback. Integrations you can roll back are the ones people use.
10. FAQ
Does this mean automatic order entry?
No. AI queries and drafts; a person confirms. Automation stays with reversible actions.
Do we need our own model?
Usually not. Data quality, tool lists and checks matter more than size.
What if a number is wrong?
Compare it to API fields. If it cannot be compared, mark it unverified and keep it out.
Where do API keys live?
Server side, rotated, split by purpose, never in a prompt.
Is MCP safe?
The protocol does not decide. Your tool list, scopes and confirmation do.
How much latency is acceptable?
One second for a quote, five for a draft, twenty for an agent.
Can cost run away?
Without rate limits and caching, yes. Set a cap before launch.
How do regulators see it?
Through records: who approved, on which data, rebuildable afterwards.
Sources: Interactive Brokers API and market data documentation, the public MCP specification, and local test notes. Reviewed 2026-11. Figures are illustrative estimates.