Skip to main content

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 curl to copy.
  • The OpenAPI document: the same routes as OpenAPI 3.1, served on this site as /wire.json and downloadable from the reference. A running Taji serves its own at GET /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.

AreaWhat it covers
Market dataBars, quotes, chains and every other data product, what the store holds, and the market socket.
TradingEach account's book, orders, drafts, plans and approvals.
Desks and chartsDesks, panes, charts, indicators, drawings, watchlists and alerts.
ConnectionsLinking providers and accounts: the forms, guided flows and keys.
AgentYour agent's sessions, tools and socket.
PluginsInstalled plugins, their pages and nodes, and the indicators they register.
Phone and channelsMessaging channels and Remote Control.
VoiceThe realtime voice in front of your agent.
WindowThe window's page, its state and quitting.
WireThe root, the route catalog, the OpenAPI document, the change feed, the event log and reports.

What you can call​

You want toCallAnswer
Read state: desks, charts, accounts, settingsGET /read/<node>JSON
Read market data: bars, quotes, chains, trades and every other productGET /get/<product>?...Apache Arrow
Change something: draw, bind an indicator, stage an orderPOST /verb/<node>/<verb>JSON; 202 where the outcome arrives later or waits for your approval
Hear what changed/ws/liveWebSocket frames naming the paths to read again
Stream rows: live bars, quotes, trades, the book/ws/marketWebSocket 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"} with error from 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​