跳到主要内容

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.

FormResult
buy $100Market buy $100 notional
buy 100$Same — suffix form
buy 50%bal50% of free balance
buy SYMBOL $100Symbol override (leading or trailing)
buy WIF,ENA $100Multi-symbol fan-out (comma list)
buy $100 at 50000Limit at absolute price
buy $100 at +100 / at 1%Limit at relative / percent offset
buy $100 at 50000 reduceReduce-only limit
buy $100 at 50000 poPost-only limit
buy $100 bestLimit at best bid (buy) / best ask (sell)
buy $100 stop 49500Bracketed 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.

FormResult
stop at 18500Market stop for full focused position
stop at -1%Same, relative to entry
stop buy at +100Explicit side (when hedge-mode is ambiguous)
stop $500 at 1%Partial-size stop
stop sell 0.01 at -100 ETHUSDTSymbol override
stop at -1% trigger 18500Limit stop — trigger ≠ limit price

Source: StopCommand.ts.


close   (alias c)

FormResult
closeFull close, focused symbol
close SYM,SYM2Full close, named symbols
close long / shortHedge-side disambiguator
close longs / shortsAll long / short positions globally
close all / allposEvery open position
close 50% / close $100Partial 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.

FormResult
cancelAll orders, focused symbol
cancel ETHUSDTAll orders, named symbol
cancel buys / sellsSide filter
cancel limits / stopsKind filter
cancel ro / xroReduce-only / excluding reduce-only
cancel buys ro ETHUSDTCompose filters
cancel top 3 / bottom 5Sorted by price (top = highest)
cancel first 2 / last 1Sorted by last update
cancel from 49000 to 50000Price-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.

FormResult
bump +10Shift every limit by +10, focused
bump ETHUSDT +10Symbol override
bump buy +10 / sell -5Side filter
bump top 3 +5Top-N price selector
bump 100 --buysLegacy flag form — still accepted

Source: BumpCommand.ts.


move   (alias mv)

Move a specific limit order by ID (full or unique prefix).

FormResult
move <orderId> 50000Absolute
move <orderId> +10 / -5Relative 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]
ModifierEffect
reduceReduce-only
takerDrop the default post-only TIF
cubic / icubicAccepted 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]
ModifierEffect
irregularRandomise slice weights in [0.5x..1.5x]
reduceReduce-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>.

FormResult
chase buy $100Chase on focused symbol
chase sell 50% reduceReduce-only chase
chase buy WIF,ENA $100Multi-symbol fan-out
chase sell %all% 20% reduceAll positions on the implied side
chase buy $100 to 1%Terminate-at distance (price-walk guard)
chase buy $100 to 49500 / to $50Same, abs / dollar form
chase cancelStop newest active chaser + cancel rest order
chase cancel keepStop chaser but leave the order in book

Source: ChaseCommand.ts.


chasers

FormResult
chasersList active + recent chasers
chasers cancel <id>Cancel by id-prefix
chasers cancel allCancel 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].

ManagementResult
twap listList all TWAPs
twap stop <id-prefix>Stop by id-prefix
twap stop allStop all TWAPs

Gotcha: reduce is parsed and gates fatfinger checks, but is not yet threaded through to slice placement. Treat twap … reduce as a fatfinger-bypass marker, not a hard guarantee per slice.

Source: TwapCommand.ts.


nuke

Cancel + close everything. Up to 3 retries internally.

FormResult
nuke / nuke allCancel all orders + close all pos
nuke positionsClose all positions only
nuke ordersCancel all orders only

Source: NukeCommand.ts.


leverage   (alias lev)

FormResult
leverageRead (only if a position is open)
lev 5Set 5x on focused symbol
leverage 10 ETHUSDTSet 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)

FormResult
orders / oOpen + creating orders, focused symbol
orders --all / -aMulti-account view across all symbols

Source: OrdersCommand.ts.


positions   (alias ps)

FormResult
positions / psFocused symbol
positions long / shortSide filter
positions --all / -aMulti-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)

FormResult
margin / balAccount margin / balance
bal --allMulti-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, llast trade
mark-price, mp, mmark
index-price, ip, iindex

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.

FormResult
chart1h, 30 candles, focused
chart 15mTimeframe override
chart 4h 50Timeframe + bar count (capped at 100)
chart 1d ETHUSDTSymbol 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)

FormResult
connWS health, current account
conn --allMulti-account
conn reconnect / ws reconnectForce 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)

FormResult
logsPrint the log file path
logs clear / clearlogsWipe ~/.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)

FormResult
account mybybitSwitch focused account by name
account 1 / account -# 1By 1-indexed number
account enable acc1 acc2Start streaming for named accounts
account enable --allStart streaming for every account
account disable acc1 / --allStop streaming

Source: AccountCommand.ts.

accounts   (alias config)

FormResult
accounts / accounts listList 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> / --allRemove (tombstoned for 30 days)
accounts enable <name…> / disable <name…> / --allBulk streaming control
accounts enabled / streaming / activeList only streaming accounts
accounts helpFull 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)

FormResult
killMost-recent active task
kill lastSame
kill <id-prefix>By id-prefix
kill allEvery running task

Source: KillCommand.ts. fuck / terminate are ichibot-parity aliases.


History

history

FormResult
historyLast 50 commands
history 100Last 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:


Safety

Defined in Safety. Listed here:

  • simulation / sim / dry-run
  • fatfinger / unfatfinger
  • whitelist / unwhitelist

Watch modes   (standalone-only)

AliasLong formsShows
wawatch account, watch accMargin + positions + orders combo
wpwatch positions, watch posLive positions table
wowatch orders, watch ordLive orders table
wmwatch margin, watch balance, watch balLive margin
watch chart   (shorthand watch c …)Live ASCII chart
watch chaseLive 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 show
  • clients / clients list / clients revoke

Recording   (standalone-only)

Detailed in Operations → Recording. REPL surface:

FormResult
record <exchange>Start orderbook recording
record start <exchange>Same — explicit
record stop <exchange>Stop recording
record listList configured recordings
record stats [exchange]DB stats

Alias: rec.


Import / export

FormResult
exportWrite vars + aliases to ~/.tealstreet/cli-export.json
importRead 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

FlagEffect
-v / --versionPrint version and exit
--updateTrigger updater
--check-updateVersion-check only
--disable-allStart REPL with all exchanges disabled

Subcommands

SubcommandAliasesPurpose
interactive (default)iLaunch 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 / stopShorthand wrappers around exec <verb> …. All accept -a / -s
account (group)accountslist / add / remove / default / symbol / exchanges / import / export
tasks list / tasks clearPersisted tasks from ~/.tealstreet/tasks.json (see warning below)
record (group)start / stop / list / stats
update-c / --check for check-only
logslog-c / --clear, -n <N> lines

tealstreet tasks is different from REPL tasks. Top-level reads persisted task records from ~/.tealstreet/tasks.json. REPL tasks lists 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.
  • import payload's binds field — read but discarded (reserved for hotkeys).