Views¶
Every view of the default navigation with its keys and its screenshot. Press ? in the
TUI for the keys of the current view inline.
The screenshots are rendered from the real TUI on a local backend by scripts/docs_screenshots.py
(scripts/docs_screenshot_ai.py for the AI tab), as listed in docs/screenshots.json; they show
the current default layout, below.
The default layout¶
The tabs are the navigation structure in use (see Pages, navigation and custom panes). With the built-in default they are:
Top tab (←/→) |
Sub-tabs (keys 1-9) |
|---|---|
| Home | — |
| Trading | 1 Feeds, 2 Instruments, 3 Order Book, 4 Indicators, 5 Portfolio, 6 P&L, 7 Risk, 8 Compare, 9 Strategy, 0 Scenario |
| Infra | 1 Topology, 2 Workers, 3 Connections, 4 Triggers, 5 States, 6 EventStores, 7 Alerts, 8 Changes, 9 Events, 0 Services (a placeholder: the TUI has no Services view), Resources and Scripts (the eleventh and twelfth: > from Services) |
| Config | 1 Pages, 2 Navigation (the theme and your navigation), 3 AI, 4 Environment variables, 5 Secrets, 6 Contexts |
ctrl+p opens the command palette (Go to <tab> › <pane>, Switch context to
<name>, the current page's keys); ? shows the keys of the current page; K is the
kill switch on every tab.
Global (App level)¶
| Key | Action |
|---|---|
? |
Show help overlay (in a dialog too: its keys) |
q |
Quit: asks first; q again (or Enter) quits, Escape stays |
ctrl+p |
Command palette: type to find a command, Enter runs it. The current page's keys (each with its key, e.g. Mark all (b)), Go to <tab> › <pane> for every pane, the kill switch, the page's keys overview, Switch context to <name> for every other context (as Enter on the Config page: only once its api answers), and Textual's own (theme, keys, screenshot, quit) |
Dashboard navigation¶
| Key | Action |
|---|---|
right |
Next top-level tab (wraps) |
left |
Previous top-level tab (wraps) |
1-9, 0 |
Switch to the Nth sub-tab of the active top-level tab (0 is the tenth; the tab label shows the key) |
< / > |
Previous / next sub-tab, wrapping: reaches panes past the tenth, which have no number |
K |
Kill switch (every tab): stop the context's trading, see below |
Kill switch¶
K halts every registered scenario that is not archived (sc.<S>.trading.halt): its
strategies withhold their orders and its executors refuse them. Then every running executor
(a worker serving a sc.<S>.trading.order.submitted topic) gets cancel-all: it cancels the
open orders the platform placed at its venue (LiveExecutor: the vf- orders at Binance;
orders placed otherwise on the account stay). The TUI first lists what it will do and asks
twice; a protected context does not ask a third time. A report lists the scenarios halted
and, per executor, the orders canceled and what failed. While a scenario is halted the
context row says HALTED: <scenarios> on every tab. Nothing resumes by itself: h on the
Scenario page resumes one scenario (with a confirmation); see
Resume trading after the kill switch.
The tabs are the navigation structure in use (your navigation.json, else the context's
shared one, else the default) -- see Pages, navigation and custom panes. The
tables below assume the default (Home / Trading / Infra / Config).
Beyond navigation, Dashboard forwards a small set of generic keys to
whichever action_* method the currently-mounted pane implements. A key
is hidden from the footer entirely if the current pane doesn't implement
any of its methods; a key listed on several rows runs the first row whose
method the pane has. Every pane's keys go through this table, so the footer
shows them.
One meaning per key. The same key does the same kind of thing on every page:
| Key | Everywhere |
|---|---|
a |
Add: a worker, script, feed, strategy, scenario, trigger, topics, pane |
d |
Delete the highlighted row's thing (asks first where it cannot be undone) |
m |
Actions: the page's actions for the highlighted row (or the one marked row); with two or more rows marked, for them |
space |
Mark the highlighted row and go to the next (on a page that takes bulk actions); Pause on Events |
b |
Mark all: every row the filter shows; again: unmark them |
Enter |
Open the row (its detail), or Use it: make the scenario or context the one in use |
/ |
Filter, o sort, T flat or tree |
Keys that stop something live ask first: X disconnecting a feed, P pausing a
scenario, q quitting, and every d.
Marking and bulk actions¶
Workers, Connections, Feeds, Triggers, Scenario, Strategy and Alerts mark rows (openspec terminal-ui, Marking on Every Table; operator-clients, Bulk Row Actions):
spacemarks or unmarks the highlighted row and goes to the next;bmarks every row the filter shows (again: unmarks them). A marked row shows✓before its first cell; the status line says<n> marked: actions apply to them.- Which rows an action takes: two or more marked rows are a bulk run; exactly one marked
row acts like the selection (
Enter,dand every other key take the one-row path on it, even with the cursor elsewhere); with none marked, the highlighted row. mopens the menu of the page's actions, titled<n> <rows> marked, listing the rows (the first 12, then… and <n> more); each button names the count (Delete (3)). With fewer than two marked it offers the same actions for the one row (Workers and Connections: their row menu). A page's own key for a bulk action (d,C,X,x,h,P,u) opens the same menu with that action only (a toggle with both directions).- An action that cannot simply be undone or that changes live trading (delete, disconnect, archive, halt trading, resume trading) asks once more, naming the count; pause and resume do not. The run does 4 rows at a time
and carries on past a row that fails. A row the action does not apply to is
skipped with its reason (a connected feed on delete,
LIVEon archive, a paused scenario on Pause). - The report's title counts the rows (
Delete: 2 done, 1 skipped, 1 failed); it lists the failed rows first (red), then the skipped (yellow), then the done ones. The rows that were done or skipped are unmarked; the failed ones stay marked for a retry. - On a protected context the run asks once, and the change log lists it once
(
Delete 3 triggers,doneorfailedwith the rows that failed). - While two or more rows are marked, a key that acts on one row (
Enter, detail, tag, edit, use, add) does nothing and saysActs on one row: unmark the others.
| Page | Bulk actions | One row only (off while several are marked) |
|---|---|---|
| Workers | Start, Stop, Delete, Upgrade to latest | Detail, tag, version pick |
| Connections | Stop publishing, Disconnect | Detail, tag, publish |
| Feeds | Connect, Disconnect, Delete (a connected feed is skipped) | Add, Edit (Enter) |
| Triggers | Delete | Schedule |
| Scenario | Pause, Resume, Halt trading, Resume trading, Archive (LIVE skipped where refused) |
Use (Enter), Add, Delete |
| Strategy | Remove | Add, Compose |
| Alerts | Dismiss (local: no question, no report; d dismisses the marked ones at once) |
– |
How-to: Act on many rows at once.
There is no refresh key: every pane updates by itself from events (lists,
counters, registries, new books and indicators, health; tui#31-#37). r is
Run on Scripts only.
| Key | Footer | Dispatches to (first match wins) |
|---|---|---|
r |
Run | action_run_script |
a |
Add | action_new_worker / action_new_script / action_add_atomic / action_add_feed / action_add_scenario / action_schedule / action_add_topic / action_insert_pane |
m |
Actions | action_action |
d |
Delete | action_delete_row / action_disconnect_row / action_delete_topics / action_delete_feed / action_remove_strategy / action_remove_scenario / action_remove_pane |
x |
Archive | action_archive_scenario |
h |
Halt | action_toggle_halt |
enter |
Open | action_detail |
enter |
Use | action_use / action_switch_context |
space |
Pause | action_toggle_pause (Events only) |
space |
Mark | action_toggle_mark |
b |
Mark all | action_mark_shown |
P |
Pause | action_pause_scenario (Scenario only) |
/ |
Filter | action_filter |
T |
Flat/Tree | action_toggle_tree |
c |
Clear | action_clear |
c |
Compose | action_compose |
C |
Connect | action_connect_feed |
X |
Disconnect | action_disconnect_feed |
s |
Save | action_save_script |
w |
Wall Time | action_toggle_wallclock |
z |
Zero balances | action_toggle_zero |
l |
Limits | action_limits |
t |
Msg Time | action_toggle_msgtime |
t |
New tab | action_new_tab |
Ctrl+L |
Clear Chat | action_clear_chat (AI tab only) |
P |
Provider | action_switch_provider (AI tab only) |
p |
Pick page | action_pick_page (a page picker sub-tab only) |
Home¶
No pane-specific bindings.
Trading tab¶
The default Trading panes are Feeds, Instruments, Order Book, Indicators, Portfolio, P&L, Risk, Compare, Strategy and Scenario. Instruments, Portfolio, P&L and Risk were hidden while they had no data (tui#22) and came back in 0.28.0, 0.31.0, 0.32.0 and 0.33.0: an upgrade puts each in its place once.
Feeds¶
The feed definitions shared on the context (cfg.feed.*, the same the web app's
Trading > Feeds shows and edits; openspec feed-definitions). A definition names a
venue preset of market-data-devkit and the topics its WebSocketFeed workers serve:
topics as given, or pairs x families (x intervals for candle.update), named by
the naming library for its world (act or hyp.<NAME>). Each row shows the
definition's status, preset, world, topic count, feeds and messages per second. Its
status is the most severe state of the members of its feed group (market-data-devkit's
feeds.group_id(<name>), a UUID derived from the name), as the
connection state glyph; with no feed it is disconnected. A definition that does not
validate shows its first error. The list follows the registry's change events and the
feeds' lifecycle.
| Key | Action |
|---|---|
Enter |
Open the definition's JSON in an editor that validates as you type (errors at their paths, warnings, the topics); Save shares it |
a |
Add a definition: pick a preset, edit its template |
space / b / m |
Mark rows; m connects, disconnects or deletes the marked ones (bulk); C, X and d with rows marked act on them too. A connected feed is skipped on delete |
C |
Connect: market-data-devkit's resolver plans the feeds (refusing topics over a venue's limits), then the definition's feed group is created if missing and its feeds are created in it (tagged name, managed-by=virtufin-tui, endpoint, world, venue, universe) or told to serve the topics; the group's other feeds are deleted. Connecting again after an edit brings the feeds to the edited topics |
X |
Disconnect: delete the definition's feed group (DeleteGroup): its feeds are deleted unless another group still holds them (asks first: its consumers get no data) |
d |
Delete a definition (refused while connected: disconnect it first) |
Every one of these is a write: on a protected context the TUI asks first, and the
server lets only admins make it. A definition's fields: name (lower-case
identifier, the feeds' owner), description, preset, world, universe, pairs,
families, intervals, topics, reconnect, secrets (feed secret name to a
reference into the worker Secret, e.g. alpacakey = "alpaca-paper-key", never a
value) and feed (further feed config keys, e.g. maxitems). The published schema is
https://app.virtufin.com/schemas/feed-definition.v1.schema.json.
The local World files (~/.config/virtufin/tui/worlds/*.toml) and composite worlds
(cfg.world.*) are gone (tui#53): save a websocket World as a shared definition (the
same fields, without type, topic, ws_url, handshake, subscribe, routing).
Strategy¶
Atomic strategies (strategy workers, one row each) and composite ones (a name over
2+ strategies, saved in cfg.strategy.*). The list follows the workers and the
registry's change events. Columns: Name, the status (an atomic strategy's worker
status glyph, see Item tables; a composite one has none), Kind and
Detail (its worker's id, or its components).
| Key | Action |
|---|---|
a |
Add an atomic strategy: create a strategy worker (code source, MIME type, topic, config); a WebAssembly one takes a .wasm URL, not inline code |
c |
Compose a new strategy from 2+ existing strategies |
d |
Delete the highlighted strategy; with strategies marked, remove them (bulk; an atomic one's worker is deleted too) |
space / b / m |
Mark rows; m removes the marked ones |
Scenario¶
Scenarios (cfg.scenario.*): each a market world, a portfolio and a strategy, with its
status (active, paused, archived). LIVE is the reserved production scenario.
The list follows the registry's change events. Columns: Name (the scenario's id, the
one in use marked ▶), the status glyph (Item tables), Trading,
Market, Portfolio and Strategy.
| Key | Action |
|---|---|
Enter |
Use: set the highlighted scenario as the active one (the Trading context row shows it) |
a |
Add a scenario: its market, portfolio and strategy legs |
P |
Pause an active scenario (asks first), resume a paused one (the registry status; it stops no orders). With scenarios marked: the menu of Pause and Resume for them (a row already in that state, and LIVE, is skipped) |
h |
Halt the highlighted scenario's trading, or resume it (with a confirmation): its strategies withhold their orders and its executors refuse them; the Trading column says HALTED (<reason>). With scenarios marked: Halt trading and Resume trading for them (a row already halted, or not halted, is skipped) |
x |
Archive the highlighted scenario (with confirmation); with scenarios marked, them (LIVE is skipped) |
d |
Delete the highlighted scenario (with confirmation; LIVE cannot be deleted). One row only: refused while several are marked |
space / b / m |
Mark rows (bulk); m offers Pause, Resume, Halt trading, Resume trading and Archive for the marked ones |
Instruments¶
Every instrument the gateway has seen a snapshot topic of, any venue and world, one
row each: world, venue, pair, the venue's symbol, tick size, lot size, the venue's
trading status and when that was last known (UTC). The values come from the instrument
its order-book worker saved in State (BinanceOrderBook 0.12.0 or newer; the status from
0.16.0), then from each new snapshot, the protobuf instrument (BinanceInstruments)
decoded through the payload schema registry with exact sizes. A snapshot is published
once per fetch, so a pair whose worker saved nothing shows –. An instrument that appears later joins the list by itself.
No keys: it updates by itself.
Order Book¶
One order book, live: pick it in the selector (every book the gateway has seen a
topic of, any venue and world, e.g. act binance BTC_USDT). The header shows mid,
spread (and in basis points), the book's update id, its age and where it comes from:
saved (the book its worker saved in State, shown first) or live (the image of the
latest orderbook.changed event). A gap event (the protobuf gap, decoded through the payload schema registry) is a red
banner until the next book: expected <id>, got <id> (<reason>).
The ladder lists the top 15 levels per side, asks above the spread, with each side's
cumulative size. Depth shows each level's size as a bar, scaled to the largest size
shown on either side (eighth-cell blocks; asks red, bids green), so the book's shape reads
at a glance. It is redrawn at most every 250 ms. A new subscription can take a
few seconds to go live, the saved book shows meanwhile. A book that starts publishing later joins
the selector by itself, from the gateway's announcement of new topics. A book listed
from a topic the gateway once saw but that nothing produces now (no saved book, no event
for 10 s) says so in yellow: most likely no order-book worker runs for it (tui#49).
No keys: it updates by itself.
Indicators¶
One indicator's value for every pair, live. Pick a scenario and an indicator (every
sc.<SCENARIO>.indicator.<name>.changed.<PAIR> topic the gateway has seen, named
through virtufin-indicator-devkit). One row per pair; the columns follow the value:
TradeFlow (units, notional, buy share, buy/sell units, trades, window), BookImbalance
(mid, imbalance per level, depth), a single value (SMA, returns), anything else as
JSON. A pair without a value yet shows –. Seeded from State in one bulk read, then
each pair's changed event; redrawn at most twice a second. The header counts the
pairs with a value and the time since the last event. New indicators and pairs appear by
themselves, from the gateway's announcement of new topics.
Each pair's values are a Value Stream: the saved value, then every changed event while
the pane shows the indicator (tui#48). Enter on a row opens it in its representations,
as the States and Events panes do: a line plot over time first (units for TradeFlow,
mid for BookImbalance, value for a single value), then the newest value and a log.
| Key | Action |
|---|---|
Enter |
Open the pair's stream in its representations |
v |
Next representation |
h |
Switch between the stream and its newest value |
Escape |
Back to the table |
Portfolio¶
One venue account, live: pick it in the selector (every account the gateway has seen
an account.snapshot topic of, any venue and world, e.g. testnet (binance,
hyp.TESTNET)). Balances: asset, free, locked and total, zero balances hidden.
Open orders: symbol, side, type, quantity, filled, price, status and time; an
order that ends leaves the list. The header shows the time of the newest change, the
number of open orders and where it comes from: saved (the account its portfolio
worker saved in State, BinancePortfolio 0.2.0 or newer, shown first) or live
(its snapshot and change events). A new account joins the selector by itself. An
account nothing produces now (no saved account, no event for 10 s) says so in yellow:
most likely no portfolio worker runs for it (tui#49).
| Key | Action |
|---|---|
z |
Show or hide the zero balances |
P&L¶
One scenario's P&L, live: pick it in the selector (the scenarios of the registry). One
row per symbol it traded: quantity, average cost, mark (the order book mid), unrealized
and realized P&L, and the fees charged (unknown when a fill's fee was not known). The
header shows the totals in the book's quote asset and when it was last computed. It is
the book the scenario's P&L worker (portfolio-workers PnL) saves; each of its events
reads the book again. A scenario without a P&L worker says so.
No keys: it updates by itself.
Risk¶
One scenario's spot exposure, live: pick it in the selector. One row per symbol: quantity, mark, notional (|quantity| x mark), its share of the gross notional, the scenario's limit per symbol and whether it is breached (the row turns red). The header shows the gross and net notional and the gross limit. It comes from the scenario's P&L worker (its exposure events; before the first one, its saved book with the limits).
The limits (max_notional_per_symbol, max_gross_notional, in the quote asset) live in
the scenario's registry entry. They are shown and reported (risk.limit.breach), never
enforced: orders are placed as before.
| Key | Action |
|---|---|
l |
Set the scenario's limits (an empty field removes that limit) |
Compare¶
Two scenarios side by side, live: pick the first and the second in the two selectors
(LIVE and the first other scenario that is not archived, the first time). Every
section shows the first, the second and the difference, second minus first, as exact
decimals: a positive difference is green, a negative one red. Three sections, one at a
time:
- P&L: per symbol of either scenario's P&L book and in total, the quantity, average cost, mark, unrealized and realized P&L, notional and fees. A symbol only one scenario holds counts as zero in the other. A scenario without a P&L worker shows its own figures only, and the header says so.
- Market: per symbol of either book and each symbol you add, one row per venue with
a book: each scenario's order-book mid and last trade in its market world (
act, orhyp.<NAME>), with the spread in the quote and in basis points. A price that is not there shows as–, never as zero. - Decisions: the two scenarios' orders received since the pane opened, newest first,
matched when they have the same symbol and side and were decided at most
compare_match_window_secondsapart (config.toml, 5 by default). Times are the orders' own (submitted_at), so a replay lines up on its market clock. An order without a match, or a match whose outcomes differ (filled against rejected), is yellow. The header counts each scenario's fills per symbol.
The pair, the section and the added symbols are kept for the next start. The numbers come from domain-devkit's comparison rules, the same as the web app's Compare page.
| Key | Action |
|---|---|
s |
Swap the two scenarios (every difference changes sign) |
tab / shift+tab |
Next / previous section |
a |
Market: add a symbol to compare (any pair with an order book) |
d |
Market: remove the selected symbol, if you added it |
Infra tab¶
Topology¶
How the context's triggers, topics, workers, connections and endpoints depend on each other, grouped by the groups scripts and clients create (openspec topology; the web app's Infra › Topology draws the same as a graph). A tree:
- Groups by parent, each with its health level and its counts (
1 of 14 failing, 13 ok: the worst level among its non-idle members and its descendants' members, then the others). A group under several parents appears under each; a group being deleted saysdeleting. - Members: its child groups, then its workers, then its triggers. An item in
several groups appears in each, marked
(shared). Items in no group are under Ungrouped, last. - A worker expands to
in(the topic families it listens to) andout(the families it is recorded to have published to), and to itsendpoint; a trigger to its target family. A family of several topics (a feed's per-instrument topics) is one row with its count, expanding to the topics; a family that workers listen to but nothing is seen to produce saysno producer seen. - Health levels, as the
healthglyph after each name (Item tables):failing(failed, load-failed, lease lost or a failure status),degraded(degraded, a degraded or disconnected status, an input gap or paced outputs since it came online; a trigger whose topic nobody listens to),idle(stopped or not started, by intent) andok. A worker whose producer fails saysupstream failing: <name>next to its own level, which it does not change.
The rows come from domain-devkit's build_topology over the workers, triggers and
groups the TUI reads once, then follows: the worker lifecycle (transitions, status
reports, gaps, pacing and each first publish to a topic), the trigger events and the
group events (sys.workmanager.group.lifecycle). Nothing is polled, and none of the
shown topics is subscribed to.
| Key | Action |
|---|---|
Enter |
Expand or collapse the row (the expansion stays while the tree updates) |
a |
New group: its name (the name tag), optionally an id (a UUID; generated when empty) and more tags (key=value, comma-separated); under the selected group when a group is selected. Tagged managed-by=virtufin-tui |
d |
Delete the selected group, after a preview: the members deleted (in no other group) and those kept with the groups they keep; with child groups, the children that go with it and those kept under another parent. Then the call's outcome per member: deleted, kept or FAILED with the reason (a partly failed deletion leaves the group deleting: delete it again to finish) |
m |
Membership: on a group, add workers or triggers to it, or put it under a parent group (or take it out of its parent); on a member, remove it from that group (it keeps running, ungrouped if that was its last group) |
/ |
Show one group with its descendants, or every group again |
Every change is a write: asked first on a protected context, listed under Changes.
Workers¶
| Key | Action |
|---|---|
a |
Add a worker: pick a type from the local registry (~/.config/virtufin/tui/workers.toml), fill in its topics (comma-separated, pre-filled where the registry gives them; templates such as …trade.update.{pair} expand from the config, shown before Create), config and secret references, and create it. The list's last item, WebAssembly (a .wasm URL or file), is a worker of your own that is no registry entry: a Name (its name tag) and its Code, an http(s) URL of the .wasm (fetched by the WorkManager) or a local file (read at Create, sent as inline content); then the same form (topics, platform settings), MIME type application/wasm |
Enter |
Open a read-only worker detail popover (Escape to dismiss): its last load or start error, its lifecycle events since the TUI connected (newest first, the last 20, repeats counted; the WorkManager keeps no history of them), for a sharded worker its Shard section (Shard, Shard mode slot, claim or claim retry, and the mode's settings: Slot index and size; Claim TTL; for claim retry Parked at most), the Type as the WorkManager reports it (application/wasm (WebAssembly)), its tags and groups (GetWorker), the topics it is recorded to have published to, config and code history |
o |
Sort by the picked column ([/]), else the first; again: reversed (a header click too) |
m |
Open the action modal: set/clear tag (one UpdateWorkerTags; ctrl+z undoes it for 10 s), add to or remove from groups (AddToGroup / RemoveFromGroup, picked from the context's groups), start, stop, delete. With workers marked: start, stop, delete or upgrade to the latest version all of them (the menu lists them; Delete asks once more; a report lists each worker's result, failures first; the marks of the done ones go) |
d |
Delete worker (with confirmation); with workers marked, the marked ones (listed, asked once more, reported) |
space |
Mark or unmark the selected worker (a ✓ before its name) and go to the next row. While any worker is marked, m, d and u act on the marked ones instead of the selected one |
u |
Upgrade in place: for a worker made from a versioned package of the worker registry, pick a version (the newest preselected; an older one rolls back) and load it with LoadCode. The worker keeps its id, topics, config, secrets and tags; a running one stops, loads the new code and starts again (its in-memory state starts fresh). With workers marked: each to its latest version (a worker at the latest, or one not from the registry, is skipped and said so). The status line counts the workers with a newer version |
b |
Mark every worker the filter shows (/, then b: everything matching it); again: unmark them. Nothing acts on every worker unless they are marked. On a protected context the one confirmation of an action on marked workers covers the run |
/ |
Filter the workers, e.g. by tag: tag:world=act_binance_top10 (see Filtering) |
Registry topics may be topic templates with the naming library's
placeholders, e.g. BinanceTrades' act.exchange.binance.trade.update.{pair}
or BinanceCandles' act.exchange.binance.candle.update.{pair}.{interval}. The
form expands them from the config: each placeholder binds the config key the
entry's topic_params names ({pair} from currencypairs, {interval} from
intervals; without an entry, the key of the placeholder's own name), one topic
per value (pairs x intervals). The template is parsed and every topic rendered
by the naming library, so an unknown template or a pair it rejects
(btcusdt) fails. Topics on create below the form shows the expanded topics
as you type; Create is refused while a placeholder has no value (e.g.
intervals unset), instead of subscribing a topic nothing publishes. Topics
without placeholders (BinanceOrderBook's flat …orderbook.snapshot) pass
through, and {worker_id} is left for WorkManager (the new worker's id). A
feed definition's pairs x families x intervals are the same templates
(feed_definitions.topics_of), so a worker created for a definition's pairs
listens to exactly the topics its feeds serve.
The world is not a placeholder: registry templates are written in act
(the default) and the worker's world config re-binds them (topic_params
world = "<key>" names another key). With world = hyp.TUITEST the form
renders hyp.TUITEST.exchange.binance.trade.update.BTC_USDT; fixed topics and
family stems in a world (…orderbook.snapshot) move with it, topics outside a
world (wrk.…, x.…) keep theirs. The value is read with the naming
library's world pattern, so anything but act or hyp.<NAME> (uppercase,
e.g. hyp.tuitest) is shown in Topics on create and refuses Create. A
feed definition's world binds its topics the same way (its families and its own
topics).
A worker that needs credentials (e.g. WebSocketFeed with the alpaca preset) shows a Secret …
(reference) field per secret. Enter the key of the cluster's worker Secret
(virtufin-worker-secrets), such as alpaca-paper-key, never the secret
itself; the registry pre-fills a suggestion. WorkManager resolves the values in
the Runtime, so no secret passes through the TUI. A missing key leaves the
worker LOAD_FAILED. A worker that reads a context-wide setting shows a Platform
variable … (reference) field per variable (the registry's variables_schema): enter
the name of a platform variable (Environment variables,
Platform scope), such as REGION; it is sent as CreateWorkerRequest.variables and the
Runtime gives the worker its value when it loads (an unknown name: LOAD_FAILED).
The registry is the TUI's shipped catalog (synced from general-workers with each
release) merged with your ~/.config/virtufin/tui/workers.toml: an entry of yours
overrides the fields it sets on the shipped entry of the same name, the versions
of both are offered (newest last), and entries only you have are kept. A new
release's workers and versions therefore reach you although your copy is never
overwritten.
Columns (Item tables): Name, the status glyph (the worker's status),
Source, MIME, Topics, Config, Secrets, Variables, Groups,
Tags and the ID last.
Name is the worker's type tag (an atomic strategy's), else its name
tag (set by New Worker), else the package its code came from (Virtufin.Worker.HttpGet 0.4.0).
Source is where its code comes from, its code URL (empty for inline code).
Topics lists every topic the worker subscribes to, one per line. Tags are its
tags; a worker the TUI creates is tagged name=<registry entry> and
managed-by=virtufin-tui (an atomic strategy's worker type=<STRATEGY>), the standard
keys of worker-devkit and domain-devkit. Groups names the groups it
belongs to.
Config is the worker's config, set at creation. Secrets shows the
worker's secret references (name=<secret>/<key>), never the values; Variables
its platform variable references (region=REGION), never the values.
Connections¶
A connection is a WebSocketFeed worker (one socket per worker,
workmanager#103): the page lists every worker created from the feed package
(a connection is recognized by its code), whoever created it (the Feeds page,
the web app, notebooks, virtufin-worker create WebSocketFeed). Feeds also appear on the
Workers page.
Feed health (tui#21, tui#31): Msg/s is the frames the feed published per second
between its last two metrics events, Subscribed its venue subscriptions against the
topics it serves, Failures its failed publishes. The counters come from the feed's
metrics events (wrk.websocketfeed.metrics, pushed every 5 s while they change), so no
feed is polled. No event for 12 s means the feed published nothing: Msg/s shows 0, and a
rate that stays at 0 on a feed that should flow is a stalled connection.
Latency is how far the feed is behind the venue: per message, when the frame came off
the socket minus the venue's own event time, as p50 and p90 over each metrics interval
(WebSocketFeed 0.6.0+, general-workers#23). The cell shows a sparkline of p50 over the
last 30 intervals (2.5 minutes at the default 5 s), then the latest p50/p90 ms. It
includes the skew between the venue's clock and the cluster's. "–" means the feed reports
none: its venue preset names no event time, or the connection was made before (a worker's
config is fixed at creation: disconnect and connect its feed definition again, X then C on Feeds).
How far it can be trusted (general-workers#24): a feed whose preset names a clock probe
(Binance, WebSocketFeed 0.7.0+) reads the venue's clock every 5 minutes and reports its
offset, give or take half the probe's round trip; the cell then ends in ± that bound.
The cell turns yellow with a ? when the number carries clock skew: p50 below zero, more
than 5 % of the messages stamped in the future, or the venue's clock further off ours
than the round trip explains. Enter on the connection shows the numbers and the reason
(latency p50/p90, latency messages, venue clock, trust). The node clocks
run chrony and are watched (NodeClock* alerts).
| Key | Action |
|---|---|
Enter |
Fetch the feed's full status, then open a read-only connection detail popover: the feed's URL, state (the table's name, with the raw state when it differs: waiting (running)), detail, publish topic, frames published, and its tags (Escape to dismiss) |
m |
Open the action modal: set/clear tag, start/stop publish (by topic), disconnect. With connections marked: stop publishing or disconnect (asks once more) all of them, with a report, as on Workers |
d |
Delete: disconnect (with confirmation): stops and deletes the feed worker; the row is removed on success. With connections marked, the marked ones |
space |
Mark or unmark the selected connection and go to the next row; while any is marked, m and d act on the marked ones |
b |
Mark every connection the filter shows; again: unmark them |
/ |
Filter the connections like workers (see Filtering): source: is the URL, topic: the publish topic |
o |
Sort by the picked column ([/]), else the first; again: reversed (a header click too) |
Columns (Item tables): Name (the feed's name tag), the state glyph
(no header text; Enter names it, ? lists the glyphs), URL, Topic,
Publishing, Published, Msg/s, Latency, Subscribed, Failures,
Groups, Tags and the ID last. The state is the feed's own
report, from its status command when the page opens and then from the feed's lifecycle
status events (no polling), or the worker status in lower case before the feed reports.
Its glyph, color and sort order come from domain-devkit's
connection state table,
which the web app's icons follow too; o on the column sorts the most severe first:
| Glyph | State | Color | Meaning |
|---|---|---|---|
✖ |
failed (load_failed, failed, lease-lost) |
red | could not load or start |
○ |
disconnected | red | socket closed, not retrying |
◐ |
degraded | yellow | open, some items beyond the venue limits not subscribed |
◌ |
connecting | yellow | connecting or logging in |
↻ |
reconnecting | yellow | socket dropped, retrying |
… |
waiting (running, loading) |
grey | the worker loads or runs, the feed has not reported yet |
? |
unknown | grey | a state the table does not know (Enter names it) |
● |
connected | green | socket open, subscribed |
■ |
stopped | grey | stopped by intent, not an error |
⏏ |
releasing | grey | releasing itself, deleting its worker |
Topic is the publish topic, Published the frames published since the feed
started (from its metrics events, or the last status answer before the first one).
Scripts¶
| Key | Action |
|---|---|
↑ / ↓ |
Navigate the script list (and the operations list below it) |
Tab |
Move between the script list, the reflected-operations filter, the operations list, the editor and the output |
Enter (operations list) |
Open or close a group; opening From reflection reads the backends' methods, opening a method its input fields (Calling operations) |
r |
Run the highlighted script (a subprocess of the TUI's own Python, isolated); a script with a form runs from the form's Submit |
s |
Save the edited script (user scripts only) |
a |
Add a user script (from a template, saved to ~/.config/virtufin/tui/examples/) |
e |
Toggle between the form (if the script has a paired .form.json) and the code editor |
f7 |
Select all in the editor |
Ctrl+C / Cmd+C |
Editor focused: copy selection (Textual native). Output log or script list focused: copy the entire output log to clipboard. |
Ctrl+V / Cmd+V |
Paste in the editor (Textual native, terminal bracketed paste) |
Ctrl+X / Cmd+X |
Cut selection in the editor (Textual native) |
Textual's binding chain checks the focused widget first, so
Ctrl+Con the editor copies a selection (nativeTextArea) and on the output log copies the full buffer (ScriptsPage's own binding).qis the global app-quit key --Ctrl+Cnever quits, it copies.
Scripts, and any custom pane built the same way, use
the same script+form convention: a .py file with an optional sibling
.form.json in the shared script form format. See Scripts
for the full write-up, including the env-var contract and the
init_scripts startup mechanism.
Triggers¶
The context's scheduled triggers (the api's Trigger service), read once and again on
sys.api.trigger.scheduled and sys.api.trigger.deleted, never polled; a failed read
keeps the last list, marked stale. A trigger is identified by its ID (a UUID); its
Name is its name tag, else its id.
| Key | Action |
|---|---|
Enter |
Open the trigger's detail (Escape to dismiss): its id, name, status, schedule, target topic and the workers that listen to it, repeats, TTL, owner, groups and tags |
a |
Schedule a new trigger: its name (the name tag), a cron schedule or a due time (RFC 3339 or a duration), the target topic, repeats, TTL, more tags (key=value, comma-separated) and, optionally, a given id (a UUID). Tagged managed-by=virtufin-tui; the new trigger's id is shown. A given id that exists fails with ID_EXISTS |
m |
Open the action modal: set/clear a tag (UpdateTriggerTags: its schedule and next firing stay; ctrl+z undoes it for 10 s), add to or remove from groups (AddToGroup / RemoveFromGroup), delete. With triggers marked: delete them |
d |
Delete the highlighted trigger (by its id); with triggers marked, them (bulk, asked once more) |
space / b |
Mark rows |
/ |
Filter the rows |
Columns (Item tables): Name, the status glyph (its health level:
ok, or degraded while no worker listens to its target topic, as on Topology),
Schedule (or at <due time>), Target Topic, Repeats (∞ for indefinitely),
TTL, Owner (the worker it exists for), Groups, Tags and the ID (its
first characters) last. The status follows the workers too. Every change is a write; a refused one reports
the api's reason (INVALID_FIELD, ID_EXISTS, NOT_FOUND …) and the field or id.
States¶
| Key | Action |
|---|---|
/ |
Filter the keys (see Filtering) |
The pane lists up to 1000 keys (QueryState has no paging); with that many, the status line says the store has more. It reads the store every 2 s while it is shown, and not at all while hidden: most writes (workers' state, order books, accounts) publish no change event, so there is nothing to follow.
| T | Flat or tree: the keys split at ., each node with the number of keys under it, each leaf with its value |
| Enter | Open the key: its value in its representations |
Each value shows in its first representation on one line (an order book as its
mid, spread and update id; a number at full precision). In an opened key v
shows the next representation, h switches to the key's stream (each value read
while the pane is shown, one per change: a number as a line plot over time) and
back, Esc returns to the list.
It updates by itself.
EventStores¶
What each EventStore worker (general-workers' EventStore, events into QuestDB) has
written. Columns (Item tables): Name (its name tag), the status glyph
(its health level: ok, degraded while QuestDB is unreachable, failing, or idle
when stopped), Topics, Events, Rows, Failed, Rules, Fallback,
Last error, Groups, Tags and the ID last. Nothing is polled (tui#31): the
counts come from the worker's metrics events (wrk.eventstore.metrics, pushed every 5 s
while they change), the health from its listed status and its lifecycle status reports. The rules, fallback table and last error come from its
status command, asked when the store is first seen running or comes online, when its
metrics show a new failure, and when its code or config changes. The list follows the workers (added, removed, started, stopped), with no
timer of its own. The header counts the workers and, in red, degraded stores and failed
inputs.
| Key | Action |
|---|---|
Enter |
Open the store's detail (Escape to dismiss): its id, worker status, status, its last status report (why it is degraded), topics, rules, fallback table, last error and tags |
/ |
Filter the rows |
It updates by itself.
Alerts¶
What went wrong, or needs a look, on any context since the TUI started, newest first, instead of toasts that vanish: one row per alert with when it last came, its severity, context, source, subject, text, how often it came and when first. The sources:
- risk: a P&L worker's limit breach (
sc.<S>.risk.limit.breach), one topic per scenario of the registry, followed as scenarios are added; - worker: a worker that failed or failed to load, a
degradedordisconnectedstatus report (a feed, an EventStore), a gap in a worker's input; - halt: a scenario's trading halt set or lifted (the halts found when a context is bound are in the context row, not alerts);
- context: a context's api going down, and answering again;
- tui: every action of the TUI that failed (the same text as its error toast).
A repeat (same context, same alert) counts up in its row and comes back to the top. The context row on every tab says how many alerts are new; showing this pane reads them. The list is the TUI's own, in memory (the last 500): a restart starts empty.
| Key | Action |
|---|---|
d |
Dismiss the selected alert; with alerts marked, the marked ones at once |
space / b / m |
Mark rows; m dismisses the marked ones (local: no question, no report) |
c |
Clear the list |
Changes¶
Every write the TUI sent to a context, newest first: when, the context, the change
(a worker created, started, stopped, deleted or tagged, a worker command other than
status, a state entry saved or deleted, a trigger scheduled, tagged or deleted, a group
created, changed or deleted, a membership added or removed) and what came
of it: done, failed (red, with the reason) or declined (a no on a protected
context). It is kept across restarts in ~/.local/state/virtufin/tui/changes.jsonl
(one JSON object per line; at 4 MB the file moves to changes.jsonl.1), and the last
500 are read back at start. A script's writes through vf are in it; writes over a
script's own client are not (Scripts › Calling operations).
No keys: the log is a record.
Resources¶
How much CPU, memory and disk the active context's backends use (pubsub, state, the event store, the api, the WorkManager) and how much data they hold: the disks the volumes live on, each backend with its pods (CPU and memory as bars against their limit or request) and its volumes with size and growth per day. It reads when shown and every 15 s while shown; the header says when it last read, or why it has nothing (no Resources service, no resources configured). Read only, no keys. Step by step: Check the backends' resources.
Events¶
| Key | Action |
|---|---|
space |
Pause / resume the log (the events received while paused are written on resume) |
c |
Clear the log (a later filter does not bring the cleared events back) |
/ |
Filter the events (see Filtering): the events already received too |
T |
Flat or tree: the topics of the received events as a tree beside the log; Enter on a topic shows its stream, on a node only its events, on the root all |
a |
Add subscription topics |
d |
Delete subscription topics |
w |
Toggle the wallclock timestamp column |
t |
Toggle the message (CloudEvent time) timestamp column |
a opens a picker. Type in the filter box to narrow the list, then
space to select topics (selections survive changing the filter), and Add.
The list holds the presets, the topics connections publish to and workers
listen on, and every topic the api has seen in the last 7 days
(Pubsub.ListTopics; if that call fails the status line says so). Topics
already subscribed are left out. A topic nobody has used yet can still be
typed in the box below the list.
The status bar shows reconnecting... while the stream retries a transient
failure. When the api rejects a topic for good (a state key such as
api||act.exchange... copied from the States page, or a name that collides
with a non-stream key), it shows events: error: <reason> instead and stops
retrying. Remove the topic with d to resubscribe.
Config tab¶
The default Config tab holds Pages, Navigation, AI, Environment variables, Secrets and
Contexts (Scripts is under Infra, 0 then > twice); the AI view is documented at AI,
the others below. Step-by-step tasks are in the
How-to guides.
Pages¶
The pages shared on the context (cfg.page.*, written in the web app's Pages view):
Name, Title, Detail (valid, or the page's first validation error). Enter
previews the highlighted page below the list; the TUI draws Stack, Heading, Text,
WorkerTable and ValueStream, opens a whole-view component's pane in its place and
shows a placeholder for any other. / filters. Step by step:
Make a page.
Navigation¶
| Key | Action |
|---|---|
Enter |
Available panes: add the pane. Tabs & Panes: nothing |
ctrl+up / ctrl+down |
Move the highlighted entry within its tab |
d |
Delete the highlighted entry (the navigation table focused; protected ones stay) |
a |
Add the highlighted available view after the highlighted entry |
t |
A new top-level tab holding the highlighted available view (prompts for id + label) |
The page scrolls as a whole; the panes tables show at most 12 rows each and scroll inside. The contexts table is on Contexts.
See Pages, navigation and custom panes for the navigation structure, how the Navigation section works, pages, and how to write a custom pane.
Scopes: Personal and Platform¶
The Environment variables and Secrets pages show one of two scopes; the line above the
table names it in bold, and S switches:
- Personal: your own entries, for your scripts, in files on this machine. Works without an active context.
- Platform: the active context's entries, for workers (admins). Variables are the
state key
cfg.env(one JSON object, name → value; deleting the last one removes the key); workers get them by reference (CreateWorkerRequest.variables, see Workers). Secrets are the keys of the context's worker Secret, through the WorkManager's Secrets service; workers get them by reference (CreateWorkerRequest.secrets). Without an active context,Ssays the Platform scope needs one.
Every platform write (add, edit, delete, an import, a bulk delete) is one write: on
a protected context it asks once, and the change log lists it once
(Set platform variable REGION, Import 3 platform secrets, Delete 2 platform
variables), naming keys, never a value. The page reads the entries again after each
write. A name is one kind only within a scope: a platform variable cannot share its
name with a platform secret.
A platform secret's value is write-only: the page lists its key, set and when it
was set (empty for a key written some other way, such as the cluster deploy), never a
value, not even its last characters. Platform secret keys follow the Secret's key rule:
letters, digits, ., _ and - (alpaca-paper-key); platform variable names the
entry rule (letters, digits and _).
Right after a WorkManager release that added the Secrets service, the gateway may not
know it yet (it caches a backend's descriptors for up to an hour): the page says
the gateway does not know the Secrets service yet; try again in a few minutes.
Environment variables¶
Your personal variables, for your scripts (vf.env, see
Scripts), kept in
~/.config/virtufin/tui/env.toml (owner read and write only, created on the first
write); in the Platform scope, the context's cfg.env.
Columns: Name, Value.
| Key | Action |
|---|---|
S |
Switch between the Personal and the Platform scope |
a |
Add a variable (name and value). A name that is already a secret is refused. |
e |
Edit the highlighted variable's value |
d |
Delete the highlighted variable (asks first); with rows marked: the marked ones, at once |
i |
Import a .env file: type its path, then the import preview |
space / b / m |
Mark the row / mark all / the actions on the marked rows (Delete) |
Secrets¶
Your personal secrets, for your scripts (vf.secret), kept in
~/.config/virtufin/tui/secrets.toml (owner read and write only). Columns: Name,
Value (… and the last four characters; only … for a value of four or fewer),
Set at. A saved value is never shown again: e asks for a new value that replaces
it (typed hidden), and the import preview lists names only. In the
Platform scope: the context's worker Secret, Value
showing only set.
| Key | Action |
|---|---|
S |
Switch between the Personal and the Platform scope |
a |
Add a secret (the value is typed hidden). A name that is already a variable is refused. |
e |
Replace the highlighted secret's value |
d |
Delete the highlighted secret (asks first); with rows marked: the marked ones, at once |
i |
Import a .env file: only the names matching a secret pattern, through the import preview |
space / b / m |
Mark the row / mark all / the actions on the marked rows (Delete) |
Tab, then a / d |
In the Secret patterns table: add a pattern, delete the highlighted one |
Secret patterns decide which .env names are secrets: regular expressions matched
anywhere in the name, ignoring case; TOKEN and KEY to start with. A pattern that is
not a regular expression is refused with the reason. They are kept in config.toml
([secrets] patterns, Settings).
Contexts¶
Every context of ~/.config/virtufin/api/contexts.toml (or the --config file):
Name (the active one marked ▶), the status glyph (its api's health: ok when it
answers, failing with why it is down, unknown before it is checked; see
Item tables), Description, Host, Port, TLS, Protected, Key
(set, env for the VIRTUFIN_API_KEY fallback, or --; never the key) and Topics. The highlighted context
stays highlighted when a context goes up or down. Without an active context the TUI
opens here.
| Key | Action |
|---|---|
Enter |
Use (switch to) the highlighted context, once its api answers |
i |
Import a TOML file in the contexts.toml format: type its path, then the import preview |
d |
Delete the highlighted context from the file (asks first; not the active one) |
See Contexts and the write gate.
The import preview¶
An import writes nothing until you press Import. The preview lists:
- New: names the import adds.
- Changed: names whose value differs, ticked to be replaced;
spaceon a name unticks it, and it keeps its value. A variable showsold → new; a secret only its name (values are compared, never shown); a platform secret that existsvalue not readable(its value cannot be read back, so it is offered as a replacement, never as unchanged); a context its new endpoint. - Unchanged: names with the same value.
- Left out, with the reason:
a secret pattern(on Environment variables),not a secret pattern(on Secrets),already a secret/already a variable(a name is one kind only),not a valid name(letters, digits and_, not starting with a digit). - Problems (contexts): an entry without
name,api_hostorapi_port, or given twice, with what is wrong; it is left out.
A .env file is read as NAME=value lines, optionally after export, with #
comments and unquoted, single-quoted or double-quoted values (\n is a newline in
double quotes). A name given twice is refused: NAME on lines X and Y. A context
imported without api_key keeps the key it has; the file keeps its comments and a new
context goes after the existing ones. Escape or Cancel closes the preview without
writing.
AI¶
A chat assistant that drives the control plane via tool calls (Config › AI in the default layout).
| Key | Action |
|---|---|
Enter |
Send the typed message |
Ctrl+L |
Clear the transcript and start a fresh conversation |
P |
Switch the active LLM provider |
See AI for provider setup (llm_providers.toml,
DEEPSEEK_API_KEY / MINIMAX_API_KEY / OPENAI_API_KEY).
Action modal¶
Opened via m from Workers or Connections.
| Key | Action |
|---|---|
Tab / Shift+Tab |
Move between fields |
Enter |
Submit |
Escape |
Cancel |
Ctrl+Z |
Undo (tag changes only, 10-second grace period after submit) |
Detail popovers¶
| Key | Action |
|---|---|
Escape |
Close the worker, connection, trigger or EventStore detail popover |
Tables¶
Every table bounds its cells (tui#44). A cell wider than table_max_column_width
(default 60) wraps inside its column; a row is at most table_max_row_height lines
(default 5). A taller cell shows that many lines and a scrollbar at its right edge (│
track, ┃ thumb). Both are set in ~/.config/virtufin/tui/config.toml and apply from
the next start.
| Key | Action |
|---|---|
Shift+↓ |
Scroll the selected row's cells one line down |
Shift+↑ |
Scroll the selected row's cells one line up |
[ / ] |
Pick the previous / next column (its header is highlighted, and it is scrolled into view) |
Shift+← / Shift+→ |
Scroll a wide table sideways (16 cells; ←/→ switch tabs) |
- / + |
Make the picked column one character narrower / wider |
= |
Give the picked column back its automatic width |
o |
Sort by the picked column, again reversed (Workers and Connections; a header click too). Numbers sort as numbers, text without case, empty cells last; the status line says sorted: <column> ▲ |
A refresh of the table keeps a row's position; the mouse wheel scrolls the table.
With the mouse, drag a column boundary: each one is marked │ in the header and
highlighted while the pointer is within two cells of it; it can be dragged from any row
(tui#47). A width you set replaces the column's automatic width (its cells wrap at it) and is
remembered per table and column in ~/.local/state/virtufin/tui/state.json
(column_widths); = forgets it (tui#46).
Item tables¶
Every table of items lists its columns in one order (openspec operator-clients, Table Columns; the web app does the same):
- Name: the
nametag, or the item's natural name (a feed definition's or strategy's name, a scenario's id); - the status, one glyph in its tone's color (no header text);
- the pane's own columns;
- Groups (where the item has groups), then Tags;
- the ID last.
The glyphs, colors and sort order come from domain-devkit's
status symbol tables,
one per kind of item, never a table of the TUI's own. o on the column sorts the most
severe first, / filters it by the status's name (status:degraded), ? lists the
pane's glyphs, and a row's detail names its status.
| Kind | Panes | Glyphs |
|---|---|---|
connection |
Connections, Feeds | the connection states |
worker |
Workers, Strategy | ✖ load-failed (red), ◌ loading (yellow), ? unknown, ● running (green), ■ stopped (grey) |
health |
Triggers, EventStores, Topology, Contexts | ✖ failing (red), ◐ degraded (yellow), ? unknown, ● ok (green), ○ idle (grey) |
scenario |
Scenario | ✖ unreadable (red), ‖ paused (yellow), ? unknown, ● active (green), ▪ archived (grey) |
Enter on a row opens its detail where the pane has one: Workers, Connections, Triggers
and EventStores (a popover), Feeds (the definition's editor). On Scenario and Contexts
Enter makes the row the one in use; on Topology it expands the row. Strategy rows
have no detail. While several rows are marked, Enter refuses and says to unmark the
others.
Filtering¶
/ on States, Events, Workers and every table pane (see Tables) opens a filter line. The list filters as you type;
Enter keeps the filter and goes back to the list, Esc clears it. The status
line shows the filter and how many entries pass (3/54). The same expression
means the same on both panes, and in the web app (value-presentation spec).
| Term | Keeps |
|---|---|
word |
the entries whose key or topic, or value, contains word |
name:pattern |
key or topic |
kind:pattern |
what the value is: number, text, json.object, json.array, orderbook, tradeflow |
type:pattern |
ce-type (events) |
source:pattern |
state service, or ce-source |
subject:pattern |
ce-subject (events) |
value:pattern |
the value as one line of text |
-term |
the entries the term does not keep |
"two words" |
a term with spaces |
Every term must hold. Case does not matter. A pattern with * or ? matches
the whole field (name:cfg.*), any other is a substring (name:world). A field
an entry does not have never matches: type:*.gap keeps no state entry. An
expression that does not parse turns the line red, says why in the status line,
and filters nothing.
Examples: name:cfg.* -name:*.index, kind:orderbook BTC_USDT,
type:*.gap -name:sys.*.
Tables¶
Feeds, Pages, Instruments, Indicators, Portfolio, P&L, Risk, Strategy, Scenario, Triggers,
EventStores, Alerts and Changes filter their rows with the same line. A word keeps
the rows with it in any cell; a field is a column, its header in lower case with
other characters as _: pair:BTC*, tick_size:0.01, updated_utc:2026-11-15*,
outcome:failed. The header or status line shows the filter and shown/total.
Portfolio filters both tables, each by its own columns (asset:BTC keeps no open
order: the orders have no Asset column). The Order Book is a price ladder, not a
list, and has no filter.
Workers¶
/ on Workers (and Connections, each feed as a worker: source: its URL, topic:
its publish topic) filters the workers with the same language over the workers'
own fields (value-presentation Worker Filter):
| Term | Keeps |
|---|---|
word |
the workers whose name, id, topics or tags contain word |
tag:pattern |
a tag, as key=value: tag:world=act_binance_top10, tag:world=* (has a world tag), -tag:world=* (has none), tag:"owner=ops team" |
name:pattern |
the worker's name (its type tag, else its name tag, else the package) |
id:pattern |
the worker id |
type:pattern |
the MIME type: type:*python |
status:pattern |
status:running, -status:running |
topic:pattern |
any of its topics: topic:*.orderbook.* |
source:pattern |
its code URL (where its code comes from) |
Example: binance status:running -tag:type=* (Binance workers that run and were
not created by the TUI).
The kinds come from the presentation fragments the devkits ship (market-data-devkit's
orderbook, indicator-devkit's indicator kinds, domain-devkit's generic kinds; see
domain-devkit Presentation). Your own
~/.config/virtufin/tui/representations.json adds kinds, matched first:
A match can test json_type, has_keys, dataschema, content_type,
ce_type, name (globs for the last three and name), source (state or
event) and decoder (orderbook.image). A rule the TUI cannot read is logged
once and ignored.
Representations¶
A value (a state entry or an event) and a stream (a key's values or a topic's
events, as received) show in the representations of their kinds, the first by
default. In an opened key (States, Enter) or topic (Events, T then Enter on a
topic) v shows the next one, h switches between the stream and its newest value,
Esc goes back. The value shown follows the stream.
| Kind | Value | Stream |
|---|---|---|
orderbook |
ladder (top 10 levels per side, size bars, cumulative sizes, mid, spread, update id), JSON tree | latest, log |
tradeflow |
the Indicators pane's row, JSON tree | plot of units, latest, log |
bookimbalance |
the Indicators pane's row, JSON tree | plot of mid, latest, log |
indicator.value |
the Indicators pane's row, JSON tree | plot of value, latest, log |
number |
the number | line plot, log |
text |
the text | log, latest |
json.object, json.array |
JSON tree, indented JSON | log, latest |
| anything else | the text (<N bytes> for binary) |
log, latest |
A stream's representations are those of its newest value. log is one line per value, newest last; latest is the newest value, redrawn; plot is a line plot over the values' time. A representation that cannot show a value is skipped.
The lists are data, in the same fragments. Your own representations.json replaces the
list of each kind it names and can give your own kinds lists:
{
"version": 1,
"kinds": [{"kind": "limit", "match": {"name": "cfg.*", "json_type": "number"}}],
"values": {"limit": ["number.text"], "orderbook": [{"name": "orderbook.ladder", "levels": 20}]},
"streams": {"limit": ["log", "plot.line"]}
}
Value representations: number.text, text, json.text, json.tree,
orderbook.ladder (levels), indicator.table. Stream representations:
plot.line (field: the JSON path of the number, e.g. units), log, latest.
An unknown name or kind is logged once and ignored. The file is read at start.