Commands
Every command available at the REPL, alphabetical. For the size/price grammar
that fills the <size> / <price> slots below, see
Sizing & prices. For chain operators (; / &),
loops, and conditionals, see Workflow.
Web vs standalone — most commands run identically in the in-app web CLI and the standalone binary. Exceptions are flagged with standalone-only. See Web CLI subset for the full split.
Trading
buy / sell (aliases b, s)
Place a market, limit, or best-priced order on the focused symbol, with
optional reduce-only / post-only / bracket stop.
| Form | Result |
|---|---|
buy $100 | Market buy $100 notional |
buy 100$ | Same — suffix form |
buy 50%bal | 50% of free balance |
buy SYMBOL $100 | Symbol override (leading or trailing) |
buy WIF,ENA $100 | Multi-symbol fan-out (comma list) |
buy $100 at 50000 | Limit at absolute price |
buy $100 at +100 / at 1% | Limit at relative / percent offset |
buy $100 at 50000 reduce | Reduce-only limit |
buy $100 at 50000 po | Post-only limit |
buy $100 best | Limit at best bid (buy) / best ask (sell) |
buy $100 stop 49500 | Bracketed entry with attached stop loss |
Safety: Bare numbers ≥ 100 with no at are rejected — the parser asks
"did you mean at <price>?" so a typo can't coerce to market silently.
fatfinger checks fire per-order.
Source: packages/cli-core/src/commands/trading/BuyCommand.ts, SellCommand.ts.
stop
Reduce-only stop loss or take-profit. Decided by trigger price vs mark.
| Form | Result |
|---|---|
stop at 18500 | Market stop for full focused position |
stop at -1% | Same, relative to entry |
stop buy at +100 | Explicit side (when hedge-mode is ambiguous) |
stop $500 at 1% | Partial-size stop |
stop sell 0.01 at -100 ETHUSDT | Symbol override |
stop at -1% trigger 18500 | Limit stop — trigger ≠ limit price |
Source: StopCommand.ts.
close (alias c)
| Form | Result |
|---|---|
close | Full close, focused symbol |
close SYM,SYM2 | Full close, named symbols |
close long / short | Hedge-side disambiguator |
close longs / shorts | All long / short positions globally |
close all / allpos | Every open position |
close 50% / close $100 | Partial close of focused |
close longs 50% | Partial close of every long globally |
Global variants (longs, shorts, all, allpos) honor the
whitelist. Source: CloseCommand.ts.
cancel (alias x)
Filters compose: side × kind × reduce-only × position-selector × range × id.
| Form | Result |
|---|---|
cancel | All orders, focused symbol |
cancel ETHUSDT | All orders, named symbol |
cancel buys / sells | Side filter |
cancel limits / stops | Kind filter |
cancel ro / xro | Reduce-only / excluding reduce-only |
cancel buys ro ETHUSDT | Compose filters |
cancel top 3 / bottom 5 | Sorted by price (top = highest) |
cancel first 2 / last 1 | Sorted by last update |
cancel from 49000 to 50000 | Price-range, limits only |
cancel <id> / <id-prefix> | Specific order (prefix ≥ 3 chars) |
cancel <id1>,<id2>,… | Comma list — what cancel @capturedVar becomes |
Source: CancelCommand.ts.
bump
Shift open limit orders by a price delta. Stops are untouched.
| Form | Result |
|---|---|
bump +10 | Shift every limit by +10, focused |
bump ETHUSDT +10 | Symbol override |
bump buy +10 / sell -5 | Side filter |
bump top 3 +5 | Top-N price selector |
bump 100 --buys | Legacy flag form — still accepted |
Source: BumpCommand.ts.
move (alias mv)
Move a specific limit order by ID (full or unique prefix).
| Form | Result |
|---|---|
move <orderId> 50000 | Absolute |
move <orderId> +10 / -5 | Relative offset |
Source: MoveCommand.ts.
scale
Ladder N limit orders between two prices, split evenly.
scale <buy|sell> <size> into <N> from <p1> to <p2> [reduce] [taker] [SYMBOL]
| Modifier | Effect |
|---|---|
reduce | Reduce-only |
taker | Drop the default post-only TIF |
cubic / icubic | Accepted but distribution is still even (no-op today). |
Examples:
scale buy 10 into 10 from 31000 to 32000
scale sell $1000 into 25 from 50000 to 48500 reduce
scale buy $1000 into 10 from -0.25% to -1% ETHUSDT
Source: ScaleCommand.ts.
swarm
Fire N concurrent market orders summing to <size>.
swarm <buy|sell> <size> into <N> [reduce] [irregular] [SYMBOL]
| Modifier | Effect |
|---|---|
irregular | Randomise slice weights in [0.5x..1.5x] |
reduce | Reduce-only |
Errors before any order is sent if a slice would round to zero.
Source: SwarmCommand.ts.
chase
Passive limit at top of book that re-pegs to best bid / ask. Runs as a
background task — list with chasers, kill with kill <id>.
| Form | Result |
|---|---|
chase buy $100 | Chase on focused symbol |
chase sell 50% reduce | Reduce-only chase |
chase buy WIF,ENA $100 | Multi-symbol fan-out |
chase sell %all% 20% reduce | All positions on the implied side |
chase buy $100 to 1% | Terminate-at distance (price-walk guard) |
chase buy $100 to 49500 / to $50 | Same, abs / dollar form |
chase cancel | Stop newest active chaser + cancel rest order |
chase cancel keep | Stop chaser but leave the order in book |
Source: ChaseCommand.ts.
chasers
| Form | Result |
|---|---|
chasers | List active + recent chasers |
chasers cancel <id> | Cancel by id-prefix |
chasers cancel all | Cancel all chasers |
Source: ChasersCommand.ts.
twap
Spread an order over time. Three forms accepted.
twap buy <size> [SYMBOL] into <N> over <minutes> [reduce] [chaser]
twap chase buy <size> into <N> over <M> [reduce] [timeout <pct> <action>] [fail <action>]
twap buy <size> duration=1h slices=10 # legacy key=value form
twap chase runs a chaser per slice. Defaults: timeout 50% market, fail market.
Action ∈ {market, next}. <pct> ∈ (0, 100].
| Management | Result |
|---|---|
twap list | List all TWAPs |
twap stop <id-prefix> | Stop by id-prefix |
twap stop all | Stop all TWAPs |
Gotcha:
reduceis parsed and gates fatfinger checks, but is not yet threaded through to slice placement. Treattwap … reduceas a fatfinger-bypass marker, not a hard guarantee per slice.
Source: TwapCommand.ts.
nuke
Cancel + close everything. Up to 3 retries internally.
| Form | Result |
|---|---|
nuke / nuke all | Cancel all orders + close all pos |
nuke positions | Close all positions only |
nuke orders | Cancel all orders only |
Source: NukeCommand.ts.
leverage (alias lev)
| Form | Result |
|---|---|
leverage | Read (only if a position is open) |
lev 5 | Set 5x on focused symbol |
leverage 10 ETHUSDT | Set 10x on named symbol |
Strings like -5, 5x, 2..5 are rejected loudly. Source: LeverageCommand.ts.
max
Largest possible order size given free balance × current leverage.
Falls back to 1x with a note if no position is open. Source: MaxCommand.ts.
orders (alias o)
| Form | Result |
|---|---|
orders / o | Open + creating orders, focused symbol |
orders --all / -a | Multi-account view across all symbols |
Source: OrdersCommand.ts.
positions (alias ps)
| Form | Result |
|---|---|
positions / ps | Focused symbol |
positions long / short | Side filter |
positions --all / -a | Multi-account view, all symbols |
Source: PositionsCommand.ts.
position (aliases p, pos)
Card-style display for a single position (size, entry → mark, uPnL, liq,
leverage). pos btc accepts fuzzy symbol match. show modifier is a no-op.
Source: PositionCommand.ts.
margin (aliases balance, bal)
| Form | Result |
|---|---|
margin / bal | Account margin / balance |
bal --all | Multi-account view |
Source: MarginCommand.ts.
spot
Spot balances when the exchange exposes them. spot --all for multi-account.
Source: SpotCommand.ts.
last-price / mark-price / index-price
Read live price from the focused or named ticker(s).
| Aliases (in order) | Reads |
|---|---|
last-price, lp, l | last trade |
mark-price, mp, m | mark |
index-price, ip, i | index |
All accept a trailing comma-separated symbol list. Source: PriceCommand.ts.
echo (alias say)
Print args after variable substitution. echo @hi does
ratchet a tracker on read; print @hi does not. Source: EchoCommand.ts.
chart (standalone-only)
ASCII candlestick chart with position + open-order overlays.
| Form | Result |
|---|---|
chart | 1h, 30 candles, focused |
chart 15m | Timeframe override |
chart 4h 50 | Timeframe + bar count (capped at 100) |
chart 1d ETHUSDT | Symbol override |
Source: ChartCommand.ts.
Session
symbol (aliases sym, switch)
Change the focused symbol: switch BTCUSDT. Bare instrument typed at the
prompt (BTCUSDT<enter>) is shorthand for this. Source: SymbolCommand.ts.
markets (aliases mkt, m)
List available markets in a 4-column grid. Source: MarketsCommand.ts.
status (alias st)
Account / exchange / symbol of the current session. Source: StatusCommand.ts.
connection (aliases conn, ws)
| Form | Result |
|---|---|
conn | WS health, current account |
conn --all | Multi-account |
conn reconnect / ws reconnect | Force a fresh WS connection |
Source: ConnectionCommand.ts.
help (aliases ?, h)
help for general index, help <cmd> for a specific command.
prompt (alias ps)
Configure the REPL prompt format. See Output → Prompt.
Source: PromptCommand.ts.
clear (alias cls)
Clear screen.
login, logout, auth (standalone-only)
OAuth flow. whoami shows the current logged-in user. Listens on port 9876
for the OAuth callback.
logs / log / clearlogs (standalone-only)
| Form | Result |
|---|---|
logs | Print the log file path |
logs clear / clearlogs | Wipe ~/.tealstreet/cli.log |
update (standalone-only)
update runs the binary updater. update --check / -c does a version check only.
exit / quit (standalone-only)
Stops monitors, listener, exchanges, then process.exit(0).
Accounts
account (aliases acc, use)
| Form | Result |
|---|---|
account mybybit | Switch focused account by name |
account 1 / account -# 1 | By 1-indexed number |
account enable acc1 acc2 | Start streaming for named accounts |
account enable --all | Start streaming for every account |
account disable acc1 / --all | Stop streaming |
Source: AccountCommand.ts.
accounts (alias config)
| Form | Result |
|---|---|
accounts / accounts list | List all configured accounts |
accounts add -n <name> -e <ex> -k <key> -s <secret> | Add — full flag list in accounts help |
accounts import <json> | Import from web export JSON |
accounts remove <name> / --all | Remove (tombstoned for 30 days) |
accounts enable <name…> / disable <name…> / --all | Bulk streaming control |
accounts enabled / streaming / active | List only streaming accounts |
accounts help | Full reference |
Source: AccountsCommand.ts.
exchanges (alias ex)
List supported exchanges with required credential fields.
Source: ExchangesCommand.ts.
Tasks (in-process)
tasks
Unified list of in-process chasers + TWAPs, insertion order.
kill (aliases fuck, terminate)
| Form | Result |
|---|---|
kill | Most-recent active task |
kill last | Same |
kill <id-prefix> | By id-prefix |
kill all | Every running task |
Source: KillCommand.ts. fuck / terminate are ichibot-parity aliases.
History
history
| Form | Result |
|---|---|
history | Last 50 commands |
history 100 | Last N — capped at 200 |
Source: HistoryCommand.ts.
Persisted to ~/.tealstreet/cli_history (standalone) or a jotai atom (web).
Variables, aliases, workflow
Defined and detailed in their own pages — listed here for completeness:
set/sets/track/untrack/unset/print/varsalias/unaliassleep,wait,loop,repeat,if/else/end,retry,set ec/set ro/set po
Safety
Defined in Safety. Listed here:
simulation/sim/dry-runfatfinger/unfatfingerwhitelist/unwhitelist
Watch modes (standalone-only)
| Alias | Long forms | Shows |
|---|---|---|
wa | watch account, watch acc | Margin + positions + orders combo |
wp | watch positions, watch pos | Live positions table |
wo | watch orders, watch ord | Live orders table |
wm | watch margin, watch balance, watch bal | Live margin |
| — | watch chart (shorthand watch c …) | Live ASCII chart |
| — | watch chase | Live chaser status panel |
All of wa/wp/wo/wm accept --all / -a for multi-account view.
Exit: Escape or Ctrl+X. Refresh: 1000 ms.
See Output → Watch modes for terminal-recovery quirks.
Listener subsystem (standalone-only)
Detailed in Operations → Listener and Hooks & webhooks. Listed here:
hook/hooks/hook create/hook revoke/hook rotate/hook showclients/clients list/clients revoke
Recording (standalone-only)
Detailed in Operations → Recording. REPL surface:
| Form | Result |
|---|---|
record <exchange> | Start orderbook recording |
record start <exchange> | Same — explicit |
record stop <exchange> | Stop recording |
record list | List configured recordings |
record stats [exchange] | DB stats |
Alias: rec.
Import / export
| Form | Result |
|---|---|
export | Write vars + aliases to ~/.tealstreet/cli-export.json |
import | Read same — replaces current vars + aliases |
Distinct from
tealstreet account export/import, which dumps credentials.
The tealstreet binary
The CLI is also a standard command-line tool. With no args, it starts the REPL. With a subcommand, it runs one-shot.
Top-level flags
| Flag | Effect |
|---|---|
-v / --version | Print version and exit |
--update | Trigger updater |
--check-update | Version-check only |
--disable-all | Start REPL with all exchanges disabled |
Subcommands
| Subcommand | Aliases | Purpose |
|---|---|---|
interactive (default) | i | Launch REPL. -a <name>, --simple, --disable-all accepted |
exec <command…> | — | One-shot. -a <account>, -s <symbol> for context scoping |
buy / sell / close / cancel / scale / chase / nuke / balance / stop | — | Shorthand wrappers around exec <verb> …. All accept -a / -s |
account (group) | accounts | list / add / remove / default / symbol / exchanges / import / export |
tasks list / tasks clear | — | Persisted tasks from ~/.tealstreet/tasks.json (see warning below) |
record (group) | — | start / stop / list / stats |
update | — | -c / --check for check-only |
logs | log | -c / --clear, -n <N> lines |
tealstreet tasksis different from REPLtasks. Top-level reads persisted task records from~/.tealstreet/tasks.json. REPLtaskslists live chasers + TWAPs from memory. Don't conflate them.
Source: apps/cli/src/index.ts.
Multi-symbol fan-out
Most trading commands accept a leading comma-separated symbol list:
buy WIFUSDT,ENAUSDT $100
chase sell %all% 20% reduce
last-price BTC,ETH,SOL
%all% (in chase … reduce only) expands to every position on the implied
side. See Recipes → Fan out across symbols.
Notes on accepted-but-no-op surface
A few keywords are accepted by the parser but don't yet have runtime effect. Treat them as "doesn't break the command":
scale … cubic/… icubic— accepted, distribution still even.twap … reduce— accepted; gates fatfinger but not slice placement.importpayload'sbindsfield — read but discarded (reserved for hotkeys).