tplus stream commands open a persistent WebSocket connection and print every incoming event to stdout until you press Ctrl-C. This makes them ideal for monitoring live activity, debugging integrations, and feeding data into downstream processes. Two services provide streaming data: the orderbook service (--orderbook-base-url) handles order and user-trade streams, while the market-data service (--market-data-base-url) handles finalized trades, depth, and klines.
Stream subcommands
Orders stream
Subscribe to all order lifecycle events (new, filled, cancelled) for the authenticated account:Trades stream
Subscribe to a feed of finalized public trades across all markets:Order book depth
Stream incremental order book depth updates for a specific asset. Each message contains price-level changes since the previous snapshot:Klines (candlestick) stream
Stream real-time OHLCV candle updates as they close for a specific asset:User trades stream
Subscribe to a feed of trades executed by a specific user. If--user is omitted, the stream defaults to the authenticated account’s public key:
Quick reference
| Subcommand | Service | Description |
|---|---|---|
tplus stream orders | Orderbook | Order lifecycle events for the authenticated account |
tplus stream trades | Market data | Finalized public trades (all markets) |
tplus stream depth <asset_id> | Market data | Incremental order book depth updates |
tplus stream klines <asset_id> | Market data | Real-time OHLCV candle updates |
tplus stream user-trades [--user <pubkey>] | Orderbook | Fill events for a specific user |
Machine-readable output
By default, stream events are printed as formatted tables. Switch to JSON for programmatic consumption:Stopping a stream
Press Ctrl-C to disconnect from the WebSocket and exit the command cleanly. The CLI will log the disconnection to~/.tplus/cli/logs/tplus.log.
Streams reconnect automatically if the underlying WebSocket is interrupted. If you need to capture only a fixed number of events, pipe the JSON output into a script that exits after receiving enough messages.