DeepBook CLI
SpotMarginPredict
Welcome to the DeepBook CLI documentation.
DeepBook is Sui’s on-chain central limit order book. deepbook-cli is an operator and agent interface for DeepBook: it combines provider-backed reads, Sui RPC access, and DeepBook SDK transaction builders in one binary.
The CLI has three main surfaces:
- Read data: pools, order books, trades, OHLCV candles, SSE streams, and DeepBook Predict read endpoints.
- Execute spot trades: DeepBook spot market/limit orders using balance managers.
- Execute margin trades: DeepBook margin orders using typed margin managers.
Installation & Config
Install the CLI globally and setup your RPC networks, keys, and default providers.
Spot Trading
Manage your balance managers and execute spot swaps, limits, and market buys.
Margin Trading
Leverage specific token pairs using Margin Managers, managing collaterals and liquidations.
Predict Markets
Read the current prediction vault summaries, oracle performance, and manager PNLs.
Market Data & Strategies
Pull OHLCV candlesticks, orderbooks streams, and run DCA / TWAP scripts locally.