The Taji API
Taji's backend is one local API, the wire: HTTP and WebSockets on your own machine, served by the kernel. Every piece of data and every action in Taji is a route on it, and every client calls the same routes:
- The window draws what it reads and sends every click as a call.
- Your agent calls them through Taji's MCP bridge (Connect your agent).
- Your phone opens the window through Remote Control.
- Your scripts call them directly, as below.
So anything one client can read or do, the others can too. What differs is the token's scope: your agent's cannot open the vault, install a plugin or approve its own live order (Wire).
There is no account, no API key to buy and no server between you and it: the wire listens on 127.0.0.1 and answers only a token Taji writes for you on each launch.
Explore it
- API reference: every route, grouped by area, with its query words, body, answers, refusals and a
curlto copy. - The OpenAPI document: the same routes as OpenAPI 3.1, served on this site as
/wire.jsonand downloadable from the reference. A running Taji serves its own atGET /read/openapi, with the routes its enabled plugins add. - TypeScript types:
@taji/wire(packages/wire/wire.ts) is generated from that document and never edited by hand.
The document is generated from the kernel: the_wire_fixture_is_the_kernels (engine/crates/taji/src/wire/fixture.rs) fails when the file and the kernel differ, so the reference cannot drift from what Taji serves.
Areas
The reference groups every route by area; each link opens its routes.
| Area | What it covers |
|---|---|
| Market data | Bars, quotes, chains and every other data product, what the store holds, and the market socket. |
| Trading | Each account's book, orders, drafts, plans and approvals. |
| Desks and charts | Desks, panes, charts, indicators, drawings, watchlists and alerts. |
| Connections | Linking providers and accounts: the forms, guided flows and keys. |
| Agent | Your agent's sessions, tools and socket. |
| Plugins | Installed plugins, their pages and nodes, and the indicators they register. |
| Phone and channels | Messaging channels and Remote Control. |
| Voice | The realtime voice in front of your agent. |
| Window | The window's page, its state and quitting. |
| Wire | The root, the route catalog, the OpenAPI document, the change feed, the event log and reports. |
What you can call
| You want to | Call | Answer |
|---|---|---|
| Read state: desks, charts, accounts, settings | GET /read/<node> | JSON |
| Read market data: bars, quotes, chains, trades and every other product | GET /get/<product>?... | Apache Arrow |
| Change something: draw, bind an indicator, stage an order | POST /verb/<node>/<verb> | JSON; 202 where the outcome arrives later or waits for your approval |
| Hear what changed | /ws/live | WebSocket frames naming the paths to read again |
| Stream rows: live bars, quotes, trades, the book | /ws/market | WebSocket frames carrying Arrow |
How each kind behaves, the token scopes, refusals and frames: Wire.
Your first call
With Taji running, its port and token are files in its state directory. One read, as Wire shows with its captured answer:
curl -s -H "x-taji-token: $(cat "$TAJI_STATE_DIR/wire-token")" "http://127.0.0.1:$(cat "$TAJI_STATE_DIR/wire-port")/read/ui"
A Taji you can call without touching your own: Build from source runs one headless, with its state in a directory you choose.
Built to be called by code
- Typed end to end. Every body and every JSON answer has a schema in the document; every refusal is
{"error", "reason"}witherrorfrom one closed set of codes, each answered with one status. - Market data as Arrow. A data read is one Arrow IPC stream: decimals stay exact, and the schema's metadata says which source and provider served each item.
- Orders wait for you. While an account's approvals are on, an order sent with a script's or your agent's token waits in the window until you approve it (Security).
- Versioned. Every answer carries
x-taji-version. What may change, and how a client learns of it: Compatibility.
Next
- Read bars over the wire with curl: a full read, its Arrow answer decoded.
- Stream live quotes over the wire: the market socket, frame by frame.
- Connect your agent: the same API through MCP, with what your agent may and may not do.