Short, task-focused recipes. Every recipe drives the same Terminal handle; see
the runnable examples for full programs per language.
cargo run -p wickra-terminal -- --source live:binance:BTC/USDTKeys: s add a source · a subscribe a symbol · d unsubscribe · x remove a
source · ←/→ cycle the focused symbol · q quit.
cargo run -p wickra-terminal -- --source synth:1# terminal.toml
timeframe = "1m"
[[sources]]
[sources.Synth]
seed = 1
[[indicators]]
kind = "Sma"
params = [20]
[[indicators]]
kind = "Rsi"
params = [14]
[[layout.panels]]
kind = "Chart"
[layout.panels.rect]
x = 0
y = 0
w = 100
h = 100cargo run -p wickra-terminal -- --config terminal.tomlimport json
from wickra_terminal import Terminal
term = Terminal(json.dumps({
"sources": [{"Synth": {"seed": 1}}],
"layout": {"panels": [{"kind": "Chart", "rect": {"x": 0, "y": 0, "w": 100, "h": 100}}]},
}))
term.command(json.dumps({"type": "Subscribe", "source": 0, "symbol": "BTC/USDT"}))
frame = json.loads(term.command(json.dumps({"type": "Tick"})))
print(frame["panels"][0])The same protocol works from Node.js, Go, C#, Java, R, C/C++ and the browser — see RENDERERS.md.
{"type":"AddSource","spec":{"Synth":{"seed":2}}}
{"type":"Subscribe","source":1,"symbol":"ETH/USDT"}Multiple sources coexist and hot-swap while the terminal runs.
A Replay source records the whole feed, so Seek can rewind it and re-fold
state; playback then resumes forward:
{"type":"Subscribe","source":0,"symbol":"BTC/USDT"}
{"type":"Tick"}
{"type":"Seek","source":0,"index":50}Seek re-folds deterministically from the recorded feed (a market's streaming
indicators are not cloneable, so there is no state snapshot to restore). Seeking
a live or synthetic source is an error.
Add a host-fed Manual source and push events into it; each is folded on the
next Tick:
{"type":"AddSource","spec":"Manual"}
{"type":"Subscribe","source":1,"symbol":"BTC/USDT"}
{"type":"Feed","source":1,"event":{"type":"trade","symbol":{"base":"BTC","quote":"USDT"},"price":"64000","quantity":"0.1","aggressor":"Buy","timestamp":1}}
{"type":"Tick"}This is how any embedder drives the terminal from a feed it already has — the same commands in every language.
The WASM core cannot open sockets, so the browser opens the exchange WebSocket
itself and bridges it into a Manual source through Feed. The web renderer
ships a Binance bridge; type into the "add source" box:
live:binance:BTC/USDT
Public market data only — no API keys. See
web/src/binance.ts and SOURCES.md.
( cd bindings/wasm && wasm-pack build --target web )
( cd web && npm install && npm run dev ) # http://localhost:5173See also: INDICATORS.md · PANELS.md · SOURCES.md · STREAMING.md.